CVE-2026-27932: joserfc Denial of Service via Unbounded PBES2 Iteration Count

joserfc Updated 04 Mar 2026

Summary

02/03/2026
Yes i
High
7.5

CVE-2026-27932: joserfc's PBES2 p2c Unbounded Iteration Count enables Denial of Service (DoS). Affects joserfc versions < 1.6.3. Fixed in 1.6.3. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

joserfc is a Python library designed for handling JSON Web Encryption (JWE) and JSON Web Tokens (JWT). It provides functionalities for encrypting and decrypting tokens using various algorithms, including Password-Based Encryption (PBES2). The library is widely used in applications that require secure transmission of data. However, it has a vulnerability that allows attackers to exploit the PBES2 iteration count parameter, leading to potential Denial of Service (DoS) attacks.

Vulnerability Detail

The vulnerability arises from an unbounded iteration count (p2c) in the PBES2 decryption process. When joserfc decrypts a JWE token, it reads the p2c parameter directly from the token's protected header without validating its value. An attacker can specify an extremely high p2c value, causing the server to consume excessive CPU resources during the decryption process. This can lead to a Denial of Service, as legitimate users may be unable to access the service while the server is overwhelmed by the resource-intensive operation.

How To Fix

Minimum fixed version

1.6.3

This is the first release that contains the fix.

pip install --upgrade "joserfc==1.6.3"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can limit the allowed PBES2 algorithms in your JWT policies to prevent the use of PBES2 key management algorithms. This can be done by enforcing a strict allowlist of algorithms in your application settings. Here is an example of how to implement a check for the p2c parameter:

MAX_P2C = 300000 # Example security bound

if not isinstance(p2c, int) or p2c > MAX_P2C: raise DecodeError(f"p2c iteration count too high (max {MAX_P2C})")

Conclusion

The joserfc library has a critical vulnerability that can lead to Denial of Service attacks due to an unbounded PBES2 iteration count. It is essential to update to the patched version and implement additional checks to secure your application against potential attacks.

See every vulnerability recorded for joserfc →

Share this vulnerability

FAQ

CVE-2026-27932 is a vulnerability in the joserfc library that allows an attacker to cause a Denial of Service by exploiting an unbounded PBES2 iteration count.

If your application uses the joserfc library for JWT or JWE decryption and allows PBES2 algorithms, it may be vulnerable to DoS attacks, potentially rendering your service unavailable.

The CVSS score of this vulnerability is 7.5, indicating a high severity level.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check if your application is affected without needing to sign up.

If you cannot update the package, enforce a strict algorithm allowlist in your JWT policies and implement checks for the p2c parameter to mitigate the risk of exploitation.

Related vulnerabilities

Recent vulnerabilities recorded for joserfc.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

1.6.3

This is the first release that contains the fix.

pip install --upgrade "joserfc==1.6.3"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback