Skip to content
Noroxi
CVE-2022-36083· NVD / CVE Program· CNA GitHub_M

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).

MediumCVSS 5.3 · v3.1—No exploit Fix available
Published
Sep 7, 2022
Updated
Jun 21, 2026
EPSS
1.5% · 74th percentile
Follow this CVE

Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.

Report tools

JSON

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 help

Affected systems

VendorProduct
panvajose

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.

EcosystemPackageAffected rangeFix
Debian:12node-josebefore 4.9.2-14.9.2-1
npmjosefrom 1.0.0 · before 1.28.21.28.2
npmjosefrom 2.0.0 · before 2.0.62.0.6
npmjosefrom 3.0.0 · before 3.20.43.20.4
npmjosefrom 4.0.0 · before 4.9.24.9.2
npmjose-browser-runtimefrom 3.0.0 · before 3.20.43.20.4
npmjose-browser-runtimefrom 4.0.0 · before 4.9.24.9.2
npmjose-node-cjs-runtimefrom 3.0.0 · before 3.20.43.20.4
npmjose-node-cjs-runtimefrom 4.0.0 · before 4.9.24.9.2
npmjose-node-esm-runtimefrom 3.0.0 · before 3.20.43.20.4
npmjose-node-esm-runtimefrom 4.0.0 · before 4.9.24.9.2

Other highest-scoring records for the same primary product.

  • CVE-2021-29443Padding Oracle Attack due to Observable Timing Discrepancy in jose
    23Monitor

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
debian:node-jose4.9.2-1 · Debian:12Package registry (OSV)
npm:jose1.28.2Package registry (OSV)
npm:jose2.0.6Package registry (OSV)
npm:jose3.20.4Package registry (OSV)
npm:jose4.9.2Package registry (OSV)
npm:jose-browser-runtime3.20.4Package registry (OSV)
npm:jose-browser-runtime4.9.2Package registry (OSV)
npm:jose-node-cjs-runtime3.20.4Package registry (OSV)
npm:jose-node-cjs-runtime4.9.2Package registry (OSV)
npm:jose-node-esm-runtime3.20.4Package registry (OSV)
npm:jose-node-esm-runtime4.9.2Package 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.

EPSS, last 120 days

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.

Finders, 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

CVSS 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.

A representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.

Vulnerable

ts
function expand(node) {  return node.children.map(expand);}

Fixed

ts
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

  1. Fix✗ → ✓

For records you follow, these changes also arrive as notifications. →

References

Vendor advisories and official records. Exploit/PoC links are deliberately left out.

All records