What is CVE-2026-21621?A high-severity flaw in Hexpm, explained.

High severity1 affected product
The short answer

CVE-2026-21621 is a high-severity flaw (CVSS 7.0) in Hexpm, published on 5 March 2026. It is not on the list of flaws known to be exploited today. The latest forecast puts its chance of use in the next 30 days at 0.5%. If you run an affected version, plan in the vendor’s fix.

Published 5 March 2026. Record last updated 20 November 2026. We keep this page's data up to date.

What it does

What is CVE-2026-21621? In plain terms.

It can be attacked from anywhere on the internet with an ordinary user account, and nobody has to click anything.

The official description

Incorrect Authorization vulnerability in hexpm hexpm/hexpm (HexpmWeb.API.OAuthController module) allows Privilege Escalation.

An API key created with read-only permissions (domain: "api", resource: "read") can be escalated to full write access under specific conditions.

When exchanging a read-only API key via the OAuth client_credentials grant, the resource qualifier is ignored. The resulting JWT receives the broad "api" scope instead of the expected "api:read" scope. This token is therefore treated as having full API access.

If an attacker is able to obtain a victim's read-only API key and a valid 2FA (TOTP) code for the victim account, they can use the incorrectly scoped JWT to create a new full-access API key with unrestricted API permissions that does not expire by default and can perform write operations such as publishing, retiring, or modifying packages.

This vulnerability is associated with program files lib/hexpm_web/controllers/api/oauth_controller.ex and program routines HexpmWeb.API.OAuthController.validate_scopes_against_key/2.

This issue affects hex.pm: from 2025-08-18 before 2026-03-05; hexpm/hexpm: from 71829cb6f6559bcceb1ef4e43a2fb8cdd3af654b before 71c127afebb7ed7cc637eb231b98feb802d62999.

What kind of flaw is it?

  • CWE-863Incorrect Authorization
CVSS 4.0 scoreHigh · 7.0

How an attack on it works

Read straight from its severity rating, translated out of the shorthand.

  • Where an attacker can beAnywhere on the internet
  • How hard it is to pull offEasy: no special conditions
  • Login needed firstAn ordinary user account
  • Does someone have to clickNo, nobody has to do anything

Severity vector: CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:L/SC:N/SI:H/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Exploitation

Is CVE-2026-21621 being exploited? Not that we know of.

It is not on the list of flaws known to be exploited today. The latest forecast puts the chance of it being used in the next 30 days at 0.5%. That can change at any time, which is why we keep watching.

Known to be exploitedNoNot on the list of exploited flaws today
Chance of use in the next 30 days0.5%Its EPSS score, from the latest forecast

Timeline

  1. Published
  2. Record last updated
How EdgeProtect ranks it
48out of 100Medium

CVE-2026-21621 scores 48. Action: Plan remediation.

We keep the score of every published flaw up to date as the evidence changes. Four things go into the score, and evidence that criminals are actually using it counts most. In order:

  • Evidence it is being exploitedBiggest factor
  • How severe it isStrong factor
  • How widely exposed it isKey context
  • Real threat activity around itKey context

85 and above is Critical. Anything confirmed as exploited is always marked for an emergency patch, whatever its score.

When CVE-2026-21621 matches software you track, it lands in your list with its score and the reasons behind it.

See your own ranked list →
Affected products

Who is affected by CVE-2026-21621? One product.

The published record lists 1 product from 1 vendor. Versions are shown as published: "2025-10-17 to before 2026-03-05" means from 2025-10-17 up to, but not including, 2026-03-05. If you run one of these, check your version, then go to the fix below.

  • Application

    Hexpm

    by Hex

    Affected versions
    2025-10-17 to before 2026-03-05
Remediation

How do I fix CVE-2026-21621? Four steps.

  1. Check whether you run itCompare your versions with the affected products above. Not sure what you run? EdgeProtect can work it out from your public website, or you can pick it from a list.
  2. Apply the vendor’s fixInstall the update named in the vendor’s advisory. We’ve put the advisories and patch notes first in the list.
  3. If you can’t patch todayFollow any mitigation the vendor publishes, and limit who can reach the affected system from the internet until the update is in.
  4. Keep an eye on itTrack the product and we tell you as soon as we spot this flaw on the list of exploited flaws, or a jump in its exploit likelihood.
EdgeProtect

Does CVE-2026-21621 affect you? We'll keep checking.

Looking flaws up one at a time doesn't scale. Tell us what you run once, and we tell you which flaws matter to you, in what order, and keep watching for new ones.

  1. Tell us what you runPick your software from a list, or let us work it out from your website.
  2. We match it to every flawOver 400,000 published flaws, checked against your list.
  3. Ranked by real-world riskA 0 to 100 score, led by evidence criminals are using it.
  4. Told as soon as we knowAn alert by email, in the app or by webhook to your own tools.

Free plan, no card needed. Nothing to install.

FAQ

Common questions, answered plainly.

Something else? Talk to the team →

CVE-2026-21621 is a high-severity flaw in Hexpm, published on 5 March 2026. It can be attacked from anywhere on the internet with an ordinary user account, and nobody has to click anything.

It scores 7.0 out of 10 on the CVSS severity scale, which is high. Our risk score for CVE-2026-21621 is 48 out of 100, which is Medium. Its action is "Plan remediation". No sign of exploitation and a low forecast. Patch it in your normal update cycle.

It is not on the list of flaws known to be exploited today. The latest forecast puts the chance of it being used in the next 30 days at 0.5%. That can change at any time, which is why we keep watching.

For Hexpm: 2025-10-17 to before 2026-03-05.

Install the update the vendor names in its advisory, linked first under "How do I fix" on this page. If you can't patch today, follow the vendor's mitigation and limit who can reach the affected system from the internet.