Skip to main content
EPSS 0.3%top 77%

CVE-2026-17507: CWE-195 Signed to Unsigned Conversion Error in Legion of the Bouncy Castle Inc. BC-JAVA

0
High
Published: 10/02/2026 (10/02/2026, 07:26:34 UTC)
Source: GCVE Database
Vendor/Project: Legion of the Bouncy Castle Inc.
Product: BC-JAVA

Description

In Bouncy Castle for Java before 1.86, the MLS implementation (org.bouncycastle.mls) holds RFC 9420's uint32 leaf_index in a signed int, so a wire value with the top bit set decodes to a negative number. That is a legitimate encoding rather than malformed input, and it must still decode, since the MLS interop test vectors round-trip the full range. GroupKeySet.SecretTree.hasLeaf and Group.validateRemove compared the decoded value directly against the tree's leaf count, and a signed comparison treats any negative int as less than a positive bound, so an out-of-range sender passed the membership check. In the hasLeaf case the SenderData of an unprotected PrivateMessage could then drive LeafIndex.directPath through NodeIndex.parent() arithmetic that never reaches the tree root, growing the resulting node list without bound until the JVM exhausted its heap. A single small message from any current group member could therefore deny service to every other member of the group. Both comparisons now interpret the value as unsigned via Integer.toUnsignedLong, rejecting an out-of-range sender however it was encoded; well-formed leaf indices are unaffected.

CVSS v4.0

Score 8.7high

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/U:Amber

Affected software

org.bouncycastle/bc-java
pkg:maven/org.bouncycastle/bc-java
Affected versions
<1.86

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/02/2026, 18:20:49 UTC

Technical Analysis

In Bouncy Castle for Java versions prior to 1.86, the MLS implementation (org.bouncycastle.mls) incorrectly stores the RFC 9420 uint32 leaf_index as a signed int. When the wire value has the top bit set, it decodes to a negative number, which is a valid encoding but mishandled by membership checks (GroupKeySet.SecretTree.hasLeaf and Group.validateRemove). These checks compare the signed decoded value directly against the tree's leaf count, allowing out-of-range senders to pass. This flaw enables a crafted unprotected PrivateMessage to cause LeafIndex.directPath to perform NodeIndex.parent() arithmetic that never reaches the tree root, causing unbounded growth of the node list and eventual JVM heap exhaustion, resulting in denial of service to all group members. The fix involves interpreting the leaf index as unsigned using Integer.toUnsignedLong, thereby rejecting out-of-range senders without affecting well-formed leaf indices.

Potential Impact

An attacker who is a current member of an MLS group can send a specially crafted small message that triggers unbounded memory growth in the JVM of all other group members, causing a denial of service. This affects availability but does not indicate compromise of confidentiality or integrity. No known exploits in the wild have been reported.

Mitigation Recommendations

A fix is available in Bouncy Castle for Java version 1.86, which correctly interprets the leaf_index as unsigned and rejects out-of-range sender values. Users should upgrade to version 1.86 or later to remediate this vulnerability. No other mitigation is required as the issue is fixed in the official release.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-x7w3-c4mv-whm4
Osv Schema Version
1.4.0
Aliases
["CVE-2026-17507"]
Database Specific Severity
HIGH
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6abfeeb7a43b0b3b89e5609e

Added to database: 10/02/2026, 17:49:43 UTC

Last enriched: 10/02/2026, 18:20:49 UTC

Last updated: 10/03/2026, 04:45:56 UTC

Views: 8

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses