Denial of Service Vulnerability in libjose4j-java: Large PBES2 Count Value

libjose4j-java Updated 02 Oct 2025

Summary

29/02/2024
N/A
Yes i
Unrated
Not published

CVE-2023-51775: The jose4j component before 0.9.4 for Java allows attackers to cause a denial of service (CPU consumption) via a large p2c (aka PBES2 Count) value. Affects libjose4j-java across 2 version ranges.

< 0.9.6-1 < 055225eae37ff00b9636376de292bd5848219a31

Fixed in 0.9.6-1. 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 Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

libjose4j-java is a Java library that provides support for JSON Web Encryption (JWE) and JSON Web Signature (JWS). It is widely used for secure data transmission and authentication in Java applications. The library allows developers to implement cryptographic operations easily, but it has been found to be vulnerable to a denial of service attack due to improper handling of large PBES2 Count values, which can lead to excessive CPU consumption.

Vulnerability Detail

The vulnerability identified as CVE-2023-51775 affects the jose4j component before version 0.9.4. Attackers can exploit this vulnerability by providing a large PBES2 Count value, which causes the application to consume an excessive amount of CPU resources. This can lead to a denial of service, making the application unresponsive and potentially affecting other services running on the same server. The issue arises from the way the library processes these large values without adequate validation or limits.

How To Fix

Minimum fixed version

0.9.6-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade libjose4j-java

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

Workaround

If an immediate update is not possible, consider implementing input validation in your application to restrict the PBES2 Count values to a safe range. This can be done by checking the input before passing it to the jose4j library. For example, you can add a check like this in your code: if (pbes2Count < MIN_VALUE || pbes2Count > MAX_VALUE) { throw new

IllegalArgumentException('Invalid PBES2 Count value');

}

Conclusion

The CVE-2023-51775 vulnerability in libjose4j-java poses a significant risk of denial of service due to improper handling of large PBES2 Count values. It is crucial for developers using this library to update to version 0.9.4 or later to mitigate this risk. Implementing input validation can serve as a temporary workaround until an update can be applied.

See every vulnerability recorded for libjose4j-java →

Share this vulnerability

FAQ

CVE-2023-51775 is a vulnerability in the jose4j component that allows attackers to cause a denial of service by providing a large PBES2 Count value.

If you are using a version of libjose4j-java prior to 0.9.4, your application may be vulnerable. You can check your package version or use tools like Vulert to monitor for vulnerabilities.

The primary consequence is denial of service, where the application may become unresponsive due to excessive CPU consumption caused by large PBES2 Count values.

Yes, you can implement input validation to restrict PBES2 Count values to a safe range as a temporary workaround.

More information can be found in the official CVE database or by visiting the Vulert website, which provides real-time monitoring for open-source vulnerabilities.

Related vulnerabilities

Recent vulnerabilities recorded for libjose4j-java.

How To Fix

Minimum fixed version

0.9.6-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade libjose4j-java

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