CVE-2026-27932

joserfc PBES2 p2c Unbounded Iteration Count enables Denial of Service (DoS)

Published Mar 3, 2026 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
Description
joserfc is a Python library that provides an implementation of several JSON Object Signing and Encryption (JOSE) standards. In 1.6.2 and earlier, a resource exhaustion vulnerability in joserfc allows an unauthenticated attacker to cause a Denial of Service (DoS) via CPU exhaustion. When the library decrypts a JSON Web Encryption (JWE) token using Password-Based Encryption (PBES2) algorithms, it reads the p2c (PBES2 Count) parameter directly from the token's protected header. This parameter defines the number of iterations for the PBKDF2 key derivation function. Because joserfc does not validate or bound this value, an attacker can specify an extremely large iteration count (e.g., 2^31 - 1), forcing the server to expend massive CPU resources processing a single token. This vulnerability exists at the JWA layer and impacts all high-level JWE and JWT decryption interfaces if PBES2 algorithms are allowed by the application's policy.

Analysis

AI-generated

Technical impact

A resource exhaustion vulnerability exists in the Python library joserfc, which implements JSON Object Signing and Encryption standards. When decrypting a JWE token that uses Password-Based Encryption (PBES2) algorithms, the library reads the PBES2 Count (p2c) value directly from the token’s protected header without validating or bounding it. Because this count defines the number of PBKDF2 iterations, an attacker can supply an astronomically large iteration count, such as 2^31‑1, thereby forcing the server to perform intensive CPU work for a single token, resulting in a denial of service.

Affected Systems

The affected product is joserfc from authlib, version 1.6.2 and all earlier releases. Any deployment that processes JWE or JWT tokens with PBES2 algorithms and relies on this library is susceptible, especially applications that allow such algorithms without stricter policy enforcement.

Risk and Exploitability

The CVSS score of 7.5 indicates a high impact, while the EPSS score of less than 1% suggests a very low probability of widespread exploitation as of the current data. The vulnerability is not presently listed in CISA’s KEV catalog. The most likely attack vector is an unauthenticated malicious actor crafting a specially formed JWE token containing a large PBES2 Count value and sending it to the target application; the server then expends disproportionate CPU resources during decryption. Because no privileged state or remote code execution is required, the attack’s success depends on the application’s allowance of PBES2 algorithms and the absence of input validation on the p2c field.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade joserfc to version 1.6.3 or later. This release includes a bound check that limits the PBES2 Count (p2c) to a reasonable maximum to prevent CPU exhaustion.
  • Disable PBES2 algorithms in your JWT/JWE processing policy or enforce a stricter policy that only allows approved algorithms. This removes the risk entirely if your application can function without these algorithms.
  • Add custom input validation or a rate limiter to bound or sanitize the p2c parameter before it is passed to the library, ensuring that unusually large iteration counts cannot trigger excessive CPU usage.

Generated by OpenCVE AI on April 17, 2026 at 13:18 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-w5r5-m38g-f9f9 joserfc's PBES2 p2c Unbounded Iteration Count enables Denial of Service (DoS)
History
Type Values Removed Values Added
First Time appeared Hsiaoming
Hsiaoming joserfc
CPEs cpe:2.3:a:hsiaoming:joserfc:*:*:*:*:*:python:*:*
Vendors & Products Hsiaoming
Hsiaoming joserfc
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Authlib
Authlib joserfc
Vendors & Products Authlib
Authlib joserfc
Type Values Removed Values Added
Description joserfc is a Python library that provides an implementation of several JSON Object Signing and Encryption (JOSE) standards. In 1.6.2 and earlier, a resource exhaustion vulnerability in joserfc allows an unauthenticated attacker to cause a Denial of Service (DoS) via CPU exhaustion. When the library decrypts a JSON Web Encryption (JWE) token using Password-Based Encryption (PBES2) algorithms, it reads the p2c (PBES2 Count) parameter directly from the token's protected header. This parameter defines the number of iterations for the PBKDF2 key derivation function. Because joserfc does not validate or bound this value, an attacker can specify an extremely large iteration count (e.g., 2^31 - 1), forcing the server to expend massive CPU resources processing a single token. This vulnerability exists at the JWA layer and impacts all high-level JWE and JWT decryption interfaces if PBES2 algorithms are allowed by the application's policy.
Title joserfc PBES2 p2c Unbounded Iteration Count enables Denial of Service (DoS)
Weaknesses CWE-770
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

Weaknesses
  • CWE-770

    Allocation of Resources Without Limits or Throttling

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Mar 4, 2026, 9:20 PM
Reserved
Feb 25, 2026, 3:11 AM
Status
Analyzed
Published
Mar 3, 2026, 11:15 PM
Modified
Jun 17, 2026, 10:27 AM