JOSE vulnerable to resource exhaustion via specifically crafted JWE
JOSE is "JSON Web Almost Everything" - JWA, JWS, JWE, JWT, JWK, JWKS with no dependencies using runtime's native crypto in Node.js, Browser, Cloudflare Workers, Electron, and Deno. The PBKDF2-based JWE key management algorithms expect a JOSE Header Parameter named `p2c` PBES2 Count, which determines how many PBKDF2 iterations must be executed in order to derive a CEK wrapping key. The purpose of this parameter is to intentionally slow down the key derivation function in order to make password brute-force and dictionary attacks more expensive. This makes the PBES2 algorithms unsuitable for situations where the JWE is coming from an untrusted source: an adversary can intentionally pick an extremely high PBES2 Count value, that will initiate a CPU-bound computation that may take an unreasonable amount of time to finish. Under certain conditions, it is possible to have the user's environment consume unreasonable amount of CPU time. The impact is limited only to users utilizing the JWE decryption APIs with symmetric secrets to decrypt JWEs from untrusted parties who do not limit the accepted JWE Key Management Algorithms (`alg` Header Parameter) using the `keyManagementAlgorithms` (or `algorithms` in v1.x) decryption option or through other means. The `v1.28.2`, `v2.0.6`, `v3.20.4`, and `v4.9.2` releases limit the maximum PBKDF2 iteration count to `10000` by default. It is possible to adjust this limit with a newly introduced `maxPBES2Count` decryption option. If users are unable to upgrade their required library version, they have two options depending on whether they expect to receive JWEs using any of the three PBKDF2-based JWE key management algorithms. They can use the `keyManagementAlgorithms` decryption option to disable accepting PBKDF2 altogether, or they can inspect the JOSE Header prior to using the decryption API and limit the PBKDF2 iteration count (`p2c` Header Parameter).
- Published
- Sep 7, 2022
- Updated
- Jun 21, 2026
- EPSS
- 1.5% · 74th percentile
- CWE
- CWE-400
Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.
Report tools
Action score
21
Monitor
Low priority for now.
- CVSS
- 21 / 40 · 5.3 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 1.5%
CISA SSVC decision
- Exploitation
- proof of concept
- Automatable
- yes
- Technical impact
- partial
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- 5.3
- CNA · GitHub_M
- 5.3
- agree
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Noroxi analysis
No Noroxi analysis for this record yet
We don't hand-write analysis for the hundreds of thousands of vulnerabilities in the database; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.
We use this product, ask for helpAffected systems
| Vendor | Product | CPE |
|---|---|---|
| panva | jose | cpe:2.3:a:panva:jose |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- panva jose1.0.0 and later · before 1.28.2
- panva jose2.0.0 and later · before 2.0.6
- panva jose3.0.0 and later · before 3.20.4
- panva jose4.0.0 and later · before 4.9.2
Versions reported by the vendor
Affected version ranges reported by the assigning authority (GitHub_M). Independent of NVD's CPE analysis and usually ahead of it.
panva jose
- >= 1.0, < 1.28.2, >= 2.0, < 2.0.6, >= 3.0, < 3.20.4, >= 4.0, < 4.9.2affected
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Debian:12 | node-jose | before 4.9.2-1 | 4.9.2-1 |
| npm | jose | from 1.0.0 · before 1.28.2 | 1.28.2 |
| npm | jose | from 2.0.0 · before 2.0.6 | 2.0.6 |
| npm | jose | from 3.0.0 · before 3.20.4 | 3.20.4 |
| npm | jose | from 4.0.0 · before 4.9.2 | 4.9.2 |
| npm | jose-browser-runtime | from 3.0.0 · before 3.20.4 | 3.20.4 |
| npm | jose-browser-runtime | from 4.0.0 · before 4.9.2 | 4.9.2 |
| npm | jose-node-cjs-runtime | from 3.0.0 · before 3.20.4 | 3.20.4 |
| npm | jose-node-cjs-runtime | from 4.0.0 · before 4.9.2 | 4.9.2 |
| npm | jose-node-esm-runtime | from 3.0.0 · before 3.20.4 | 3.20.4 |
| npm | jose-node-esm-runtime | from 4.0.0 · before 4.9.2 | 4.9.2 |
Same product
panva: all recordsOther highest-scoring records for the same primary product.
- CVE-2021-29443Padding Oracle Attack due to Observable Timing Discrepancy in jose23Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| debian:node-jose | 4.9.2-1 · Debian:12 | Package registry (OSV) |
| npm:jose | 1.28.2 | Package registry (OSV) |
| npm:jose | 2.0.6 | Package registry (OSV) |
| npm:jose | 3.20.4 | Package registry (OSV) |
| npm:jose | 4.9.2 | Package registry (OSV) |
| npm:jose-browser-runtime | 3.20.4 | Package registry (OSV) |
| npm:jose-browser-runtime | 4.9.2 | Package registry (OSV) |
| npm:jose-node-cjs-runtime | 3.20.4 | Package registry (OSV) |
| npm:jose-node-cjs-runtime | 4.9.2 | Package registry (OSV) |
| npm:jose-node-esm-runtime | 3.20.4 | Package registry (OSV) |
| npm:jose-node-esm-runtime | 4.9.2 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- none
- Integrity
- none
- Availability
- low · the service can be disrupted
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- None
- Integrity impact
- None
- Availability impact
- Low
Weakness class (CWE)
CWE-400 · Uncontrolled Resource ConsumptionCVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
nvd-primary
Root cause
Code that parses nested structures sets no depth or size limit. A small input can turn into a disproportionate processing load.
The bug in code
The whole CWE-400 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
function expand(node) { return node.children.map(expand);}Fixed
const MAX_DEPTH = 32;function expand(node, depth = 0) { if (depth > MAX_DEPTH) throw new Error("too deep"); return node.children.map((c) => expand(c, depth + 1));}Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Change log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
- github.com/panva/jose/commit/03d6d013bf6e070e85adfe5731f526978e3e8e4d
- github.com/panva/jose/releases/tag/v4.9.2
Vendor advisories and official records. Exploit/PoC links are deliberately left out.