CVE-2022-36083JOSE 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).
What to do
Fixed builds are available from Debian, npm: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | jose | Fix pending | UBUNTU-CVE-2022-36083 | |
| Ubuntu 26.04 | jose | Under investigation | UBUNTU-CVE-2022-36083 | |
| Ubuntu 25.10 | jose | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2022-36083 | |
| Ubuntu 25.10 | node-jose | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | jose | Under investigation | UBUNTU-CVE-2022-36083 | |
| Ubuntu 24.04 | node-jose | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | jose | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | node-jose | Fix pending | UBUNTU-CVE-2022-36083 | |
| Ubuntu 20.04 | jose | Not affected vulnerable_code_not_present | ||
| Ubuntu 18.04 | jose | Not affected vulnerable_code_not_present | ||
| Debian 13 | node-jose | Fixed | 4.9.2-1 | DEBIAN-CVE-2022-36083 |
| Debian 12 | node-jose | Fixed | 4.9.2-1 | DEBIAN-CVE-2022-36083 |
| npm library | jose | Fixed | 4.9.2 | GHSA-jv3g-j58f-9mq9 |
| npm library | jose-browser-runtime | Fixed | 3.20.4 | GHSA-jv3g-j58f-9mq9 |
| npm library | jose-node-cjs-runtime | Fixed | 4.9.2 | GHSA-jv3g-j58f-9mq9 |
| npm library | jose-node-esm-runtime | Fixed | 3.20.4 | GHSA-jv3g-j58f-9mq9 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- panva jose: affected: >= 1.0, < 1.28.2, >= 2.0, < 2.0.6, >= 3.0, < 3.20.4, >= 4.0, < 4.9.2
References
- https://github.com/panva/jose/security/advisories/GHSA-jv3g-j58f-9mq9
- https://github.com/panva/jose/commit/03d6d013bf6e070e85adfe5731f526978e3e8e4d
- https://github.com/panva/jose/releases/tag/v4.9.2
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.