Skip to main content

Bouncy Castle CVE-2026-17508

| EUVDEUVD-2026-91236 MEDIUM
Allocation of Resources Without Limits or Throttling (CWE-770)
2026-10-02 bcorg GHSA-m3x3-p27c-whhp
5.3
CVSS 4.0 · Vendor: bcorg
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft input with inflated KDF cost parameters
  2. Delivery
    Deliver PKCS#12/CMP/OpenSSH blob to target
  3. Exploit
    Application runs unbounded PBKDF2/scrypt/bcrypt derivation
  4. Execution
    CPU/memory exhausted before integrity check
  5. Impact
    Denial of service

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource allocation limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the vulnerable application accept and process an attacker-influenced cryptographic structure through one of the specific affected entry points: the RFC 9579 PBMAC1 MAC calculator builders (JcePBMac1CalculatorBuilder and PKCS12PBEUtils.createPBMac1Calculator, reached via PKCS12PfxPdu.isMacValid), where the PBKDF2 iteration count and derived-key length come straight from PBMAC1Params; the PKCS#8/PKCS#12 scrypt cost guards, where the parallelization parameter p was unbounded even though scratch memory scales with r*p; the raw JCA PBKDF2 provider (org.bouncycastle.jcajce.provider.symmetric.PBEPBKDF2); or the bcrypt round count taken from an encrypted OpenSSH v1 private key's kdfoptions. The limiting factor is that the attacker must get the malicious blob to a code path that performs the derivation (vendor marks UI:P, passive processing of the supplied data), and only affects versions before the patched releases; there is no auth requirement (PR:N) and default configurations are affected since the parameters were read without any bound. Impact is confined to availability - the derivation runs before the password/MAC check, so no key material or data is exposed.

Impact

This is a genuine but modest-severity availability issue (CWE-770, uncontrolled resource consumption), not a high-impact priority. The vendor CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L) yields 5.3 (Medium) with impact limited strictly to availability (VA:L) - no confidentiality or integrity exposure. The core risk is a pre-authentication CPU/memory denial-of-service: KDF cost parameters (PBKDF2 iteration count and key length, scrypt parallelization p, bcrypt rounds) are read from the untrusted input itself and run before any password or integrity check, so a tiny crafted input can force arbitrary work. No EPSS score was provided; the CVE is not in CISA KEV; and no public exploit was supplied (the GitHub commit includes a regression unit test, which is not a weaponized POC). Signals are therefore consistent and low-to-moderate: a real, patchable weakness in a very widely deployed crypto library, but one that degrades availability rather than enabling compromise, and with no evidence of active exploitation. Note a cross-vector consistency point to verify: the vendor marks UI:P (passive interaction, i.e. the victim application must process attacker-supplied data), yet server-side paths such as PKCS12PfxPdu.isMacValid or CMP PBMAC1 verification may run with no user interaction at all - real-world exposure depends on whether the input reaches the parser automatically.

Exploit ScenarioDerived

An attacker submits a crafted PKCS#12 PFX, PKCS#8/PBES2 blob, CMP PBMAC1-protected message, or OpenSSH v1 private key in which the embedded KDF cost parameters (e.g. a PBKDF2 iteration count above 10,000,000, or an inflated scrypt p) are set absurdly high. When the vulnerable Bouncy Castle application parses and attempts to verify or decrypt it, the library runs the key derivation with those attacker-dictated parameters before rejecting the wrong password, consuming large amounts of CPU and memory. No public exploit is identified, but the flaw is trivially triggered by hand-editing the cost fields of a sample structure.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 02, 2026

Unbounded key-derivation cost parameters in Bouncy Castle for Java before 1.86 allow a denial of service against applications that parse attacker-influenced cryptographic structures: PBKDF2 iteration counts, derived-key lengths, scrypt parallelization factor p, and OpenSSH v1 bcrypt round counts were read straight from untrusted input and used to drive the KDF before any password or MAC verification could reject the data. Affected code paths include the RFC 9579 PBMAC1 MAC calculator builders (JcePBMac1CalculatorBuilder, PKCS12PBEUtils.createPBMac1Calculator reached via PKCS12PfxPdu.isMacValid), the PKCS#8/PKCS#12 scrypt cost guards, the raw JCA PBKDF2 provider, and OpenSSH v1 private-key parsing in Bouncy Castle for Java, LTS (before 2.73.13) and FIPS (bcpkix-fips before 1.0.13 / 2.0.13 / 2.1.13). Impact is availability-only (CVSS:4.0 5.3; assessed CVSS:3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L): exploitation requires the victim application to passively process a malicious blob and is unauthenticated (PR:N), but no key material or data is exposed, and there is no public exploit identified at time of analysis.

RemediationAI

Vendor-released patch: upgrade Bouncy Castle for Java to 1.86 or later, Bouncy Castle for Java LTS to 2.73.13, and Bouncy Castle for Java FIPS (bcpkix-fips) to 1.0.13, 2.0.13 or 2.1.13 depending on the series in use; see the vendor advisory at https://github.com/bcgit/bc-java/wiki/CVE%E2%80%902026%E2%80%9017508 and the upstream fix commits (for example https://github.com/bcgit/bc-java/commit/882fdab53f6c4c150a5d6a4e6ef1fc05d382385a for the PBMAC1 iteration-count cap). Because the patch is available, patching is strongly preferred over workarounds; the fixes are implemented as bounded-parameter checks plus two configurable properties, Properties.PBE_MAX_ITERATION_COUNT (default 10,000,000) for PBKDF2/PBMAC1 and org.bouncycastle.openssh.max_rounds for OpenSSH v1 bcrypt keys, so operators can tighten these ceilings further if their workloads permit - with the trade-off that legitimate high-cost or legacy files exceeding the lowered limit will be rejected. If immediate upgrade is not possible, keep untrusted PKCS#12/PFX, PKCS#8, CMP PBMAC1 and OpenSSH v1 private-key blobs away from PKCS12PfxPdu.isMacValid, JcePBMac1CalculatorBuilder and the raw JCA PBKDF2/scrypt paths, enforce input size limits and per-request CPU/memory quotas (thread-pool isolation, timeouts, container memory caps) in the service that parses these structures, and validate scrypt N, r and p as well as PBKDF2 iteration counts against application-defined maxima before handing any data to the provider; these are compensating controls only and do not remove the underlying unbounded-derivation behaviour, so they leave residual exposure on unpatched builds.

Affected VersionsENISA

BC-FJA 2.1.0 <2.1.13
BC-FJA 1.0.0 <1.0.13
BC-FJA 2.0.0 <2.0.13
BC-JAVA 0 <1.86
BC-LTS-JAVA 2.73.0 <2.73.13

Affected Packages

euvd bc_fja fix: 1.0.13, 2.0.13, 2.1.13
euvd bc_java fix: 1.86
euvd bc_lts_java fix: 2.73.13

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 3 packages in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The root cause is CWE-770 (Allocation of Resources Without Limits or Throttling) applied to password-based key derivation functions. Bouncy Castle's PBE machinery accepted cost parameters from the AlgorithmIdentifier being parsed rather than from trusted configuration: PBMAC1Params supplied the PBKDF2 iteration count and derived-key length directly to JcePBMac1CalculatorBuilder (and through PKCS12PBEUtils.createPBMac1Calculator, which is reached from PKCS12PfxPdu.isMacValid - the routine used to validate the MAC on a PKCS#12 PFX file), so a small crafted blob could force an arbitrarily long PBKDF2 run before the MAC check could fail. In the PKCS#8/PKCS#12 scrypt guards, only the CPU/memory cost N and block size r were bounded; the parallelization parameter p was not, even though scrypt's scratch buffer scales with r*p, letting an attacker evade the configured memory ceiling entirely. The same pattern appeared in the raw JCA PBKDF2 provider (org.bouncycastle.jcajce.provider.symmetric.PBEPBKDF2) and in the bcrypt round count read from an encrypted OpenSSH v1 private key's own kdfoptions. The fix adds explicit caps to every one of these entry points, in line with bounds already applied elsewhere in the tree (notably Properties.PBE_MAX_ITERATION_COUNT, default 10,000,000, used by the new PBMAC1 check per the upstream commit and test), and introduces the org.bouncycastle.openssh.max_rounds property to control the OpenSSH bcrypt round ceiling. This work completes the bounding begun in 1.85 for the PKCS#8/PBES2 decryptors under CVE-2026-15055, indicating a systematic hardening effort across the PBE surface rather than an isolated defect. CPE data confirms the affected packages as bc-java, bc-lts-java and bc-fja from Legion of the Bouncy Castle Inc.

Know when Java gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (bcorg) PRIMARY 5.3 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/U:Amber
vuln.today AI 4.3 MEDIUM

Remote, low-complexity, unauthenticated, but the victim must process the attacker-supplied blob (UI:R), and impact is availability-only (A:L) with no C/I effect.

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (bcorg).

CVSS VectorVendor: bcorg

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

In Bouncy Castle for Java before 1.86, several password-based key derivation entry points ran the KDF with cost parameters taken from the untrusted input being processed, without bounding them, so a small input could dictate an arbitrary amount of work before any password or integrity check could reject it. The affected paths are the RFC 9579 PBMAC1 MAC calculator builders, which took the PBKDF2 iteration count and derived-key length straight out of PBMAC1Params (JcePBMac1CalculatorBuilder, and PKCS12PBEUtils.createPBMac1Calculator reached from PKCS12PfxPdu.isMacValid); the scrypt parallelization parameter p in the PKCS#8 and PKCS#12 cost guards, which bounded only the cost parameter N and the block size r even though the scratch buffer scales with r times p, so the configured memory ceiling could be evaded entirely; the raw JCA PBKDF2 provider (org.bouncycastle.jcajce.provider.symmetric.PBEPBKDF2); and the bcrypt round count read from an encrypted OpenSSH v1 private key's own kdfoptions. Each now bounds the parameter before deriving, in line with the caps already applied elsewhere in the tree, with the OpenSSH round count configurable through the new org.bouncycastle.openssh.max_rounds property. This completes the bounding begun in 1.85 for the PKCS#8 / PBES2 decryptors (CVE-2026-15055). This issue also affects Bouncy Castle for Java LTS before 2.73.13, and Bouncy Castle for Java FIPS (BC-FJA) before bcpkix-fips 1.0.13 (1.0.X series), 2.0.13 (2.0.X series) and 2.1.13 (2.1.X series).

Threat Intelligence Overview

EPSS Score
0.4%
Top 64% exploitable
Prevalence
High
Bouncy Castle is one of the most widely deployed Java cryptography libraries
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

More in Java

View all
CVE-2012-4681 CRITICAL POC
9.8 Aug 28

Oracle Java SE 7 Update 6 and earlier contains multiple sandbox bypass vulnerabilities via the ClassFinder and forName m

CVE-2015-7450 CRITICAL POC
9.8 Jan 02

Remote code execution in IBM Sterling B2B Integrator, Sterling Integrator, and Tivoli Common Reporting allows unauthenti

CVE-2013-2465 CRITICAL POC
9.8 Jun 18

Java Runtime Environment sandbox bypass via incorrect image channel verification in 2D component allows remote unauthent

CVE-2011-3544 CRITICAL POC
9.8 Oct 19

Oracle Java SE JDK/JRE 7 and 6 Update 27 and earlier allows remote code execution with complete system compromise throug

CVE-2010-1871 HIGH POC
8.8 Aug 05

JBoss Seam 2 in Red Hat JBoss EAP 4.3.0 fails to sanitize JBoss Expression Language inputs, allowing remote attackers to

CVE-2012-1723 CRITICAL POC
9.8 Jun 16

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 update 4 and earlier, 6 up

CVE-2013-0422 CRITICAL POC
9.8 Jan 10

Multiple vulnerabilities in Oracle Java 7 before Update 11 allow remote attackers to execute arbitrary code by (1) using

CVE-2012-0507 CRITICAL POC
9.8 Jun 07

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 2 and earlier, 6 Up

CVE-2015-4852 CRITICAL POC
9.8 Nov 18

The WLS Security component in Oracle WebLogic Server 10.3.6.0, 12.1.2.0, 12.1.3.0, and 12.2.1.0 allows remote attackers

CVE-2012-5076 CRITICAL POC
9.8 Oct 16

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 7 and earlier allow

CVE-2017-3066 CRITICAL POC
9.8 Apr 27

Remote unauthenticated attackers can execute arbitrary code on Adobe ColdFusion servers through Java deserialization fla

CVE-2012-0391 CRITICAL POC
9.8 Jan 08

The ExceptionDelegator component in Apache Struts before 2.2.3.1 interprets parameter values as OGNL expressions during

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy