CVE-2022-36083 Details
Description
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).
A resource exhaustion vulnerability has been identified in the Panva JOSE library, specifically in versions 1.28.1 prior to 1.28.2, 2.0.5, 3.20.3, and 4.9.1. The issue arises in the PBKDF2-based JWE key management algorithms, which require a JOSE Header Parameter named 'p2c' (PBES2 Count). This parameter dictates the number of PBKDF2 iterations to be performed when deriving a CEK wrapping key. While the 'p2c' parameter is intended to slow down key derivation and make password brute-force attacks more challenging, it creates a vulnerability when JWEs are received from untrusted sources. An adversary can exploit this by selecting a very high 'p2c' value, causing a CPU-bound operation that consumes excessive processing time. The vulnerability affects users who decrypt JWEs from untrusted parties using symmetric secrets, without properly managing the accepted JWE Key Management Algorithms.
Users can upgrade to JOSE versions 1.28.2, 2.0.6, 3.20.4, or 4.9.2, all of which limit the maximum PBKDF2 iteration count to 10,000 by default. For those unable to upgrade, the 'keyManagementAlgorithms' decryption option can be used to disable PBKDF2 acceptance, or the JOSE Header can be inspected to manually limit the 'p2c' value.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Apr 22, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/panva/jose/commit/03d6d013bf6e070e85adfe5731f526978e3e8e4d | CVE | PatchThird Party Advisory |
| https://github.com/panva/jose/releases/tag/v4.9.2 | CVE | Third Party Advisory |
| https://github.com/panva/jose/security/advisories/GHSA-jv3g-j58f-9mq9 | CVE | ExploitThird Party Advisory |
| https://github.com/panva/jose/commit/03d6d013bf6e070e85adfe5731f526978e3e8e4d | [email protected] | PatchThird Party Advisory |
| https://github.com/panva/jose/releases/tag/v4.9.2 | [email protected] | Third Party Advisory |
| https://github.com/panva/jose/security/advisories/GHSA-jv3g-j58f-9mq9 | [email protected] | ExploitThird Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-834 | Excessive Iteration | [email protected] |
| CWE-400 | Uncontrolled Resource Consumption | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| panva jose | >= 1.0.0, < 1.28.2 >= 2.0.0, < 2.0.6 >= 3.0.0, < 3.20.4 >= 4.0.0, < 4.9.2 |
CPE
Remediation
| |
Change History
10 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 22, 2026 | CPE Deprecation Remap | [email protected] |
| Jun 22, 2026 | CPE Deprecation Remap | [email protected] |
| Jun 22, 2026 | CPE Deprecation Remap | [email protected] |
| Jun 22, 2026 | CPE Deprecation Remap | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Nov 21, 2024 | CVE Modified | CVE |
| May 14, 2024 | CVE Modified | [email protected] |
| Jul 21, 2023 | Reanalysis | [email protected] |
| Sep 13, 2022 | Initial Analysis | [email protected] |