CVE-2026-13506

Lazy ASN.1 sequence forcing resets nesting-depth guard

Published Aug 3, 2026 CVSS 4.0 · 8.7 High EPSS < 1% KEV · Not listed
Description
In Bouncy Castle for Java before 1.85, Lazy ASN.1 sequence forcing resets nesting-depth guard. This issue also affects Bouncy Castle for Java LTS before 2.73.12, and Bouncy Castle for Java FIPS (BC-FJA) before bc-fips 1.0.2.7 (1.0.X series), 2.0.2 (2.0.X series) and 2.1.3 (2.1.X series).

Analysis

AI-generated

Technical impact

In Bouncy Castle for Java before version 1.85, the ASN.1 parser contains a flaw that allows a lazily constructed sequence to reset the internal nesting‑depth guard. This behavior represents a CWE‑674 vulnerability, as it permits uncontrolled recursion and resource consumption. When a deeply nested or malformed ASN.1 structure is parsed, the guard can be bypassed, leading to uncontrolled recursion. The resulting excessive memory or stack usage can cause the application to become unresponsive or crash, effectively denying service to legitimate users.

Affected Systems

Affected products include Legion of the Bouncy Castle Inc.’s BC‑JAVA libraries for Java, the LTS releases prior to 2.73.12, and the Bouncy Castle for Java FIPS (BC‑FJA) before bc‑fips 1.0.2.7, 2.0.2 or 2.1.3.

Risk and Exploitability

The CVSS score of 8.7 marks this vulnerability as high severity. The EPSS score is 0.00263 and it is not listed in CISA’s KEV catalog, indicating no known widespread exploitation yet. The likely attack vector is from any entity that can supply or influence ASN.1 data processed by the library, which could be remote (e.g., via network) or local depending on the application context. If untrusted data is parsed, a malformed ASN.1 structure could trigger the recursion loop, exhausting resources and bringing the system down.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Bouncy Castle to version 1.85 or newer (BC‑JAVA), LTS 2.73.12 or newer, or FIPS 1.0.2.7/2.0.2/2.1.3 or newer.
  • Restrict ASN.1 parsing to data streams that are authenticated, authorized, and trusted to avoid processing untrusted inputs.
  • Instrument applications to monitor memory and stack usage during ASN.1 parsing, log any abnormal recursion depth or resource consumption, and apply defensive limits if the parser provides them.

Generated by OpenCVE AI on August 4, 2026 at 22:02 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-qp49-qgx5-5m26 Bouncy Castle: Lazy ASN.1 sequence forcing resets nesting-depth guard
History
Type Values Removed Values Added
First Time appeared Bouncycastle
Bouncycastle bc-java
Bouncycastle bouncy Castle For Java Lts
Bouncycastle fips Java Api
CPEs cpe:2.3:a:bouncycastle:bc-java:*:*:*:*:*:*:*:*
cpe:2.3:a:bouncycastle:bouncy_castle_for_java_lts:*:*:*:*:*:*:*:*
cpe:2.3:a:bouncycastle:fips_java_api:*:*:*:*:*:*:*:*
Vendors & Products Bouncycastle
Bouncycastle bc-java
Bouncycastle bouncy Castle For Java Lts
Bouncycastle fips Java Api
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'}

Type Values Removed Values Added
First Time appeared Legion Of The Bouncy Castle Inc.
Legion Of The Bouncy Castle Inc. bc-fja
Legion Of The Bouncy Castle Inc. bc-java
Legion Of The Bouncy Castle Inc. bc-lts-java
Vendors & Products Legion Of The Bouncy Castle Inc.
Legion Of The Bouncy Castle Inc. bc-fja
Legion Of The Bouncy Castle Inc. bc-java
Legion Of The Bouncy Castle Inc. bc-lts-java
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
Description In Bouncy Castle for Java before 1.85, Lazy ASN.1 sequence forcing resets nesting-depth guard. This issue also affects Bouncy Castle for Java LTS before 2.73.12, and Bouncy Castle for Java FIPS (BC-FJA) before bc-fips 1.0.2.7 (1.0.X series), 2.0.2 (2.0.X series) and 2.1.3 (2.1.X series).
Title Lazy ASN.1 sequence forcing resets nesting-depth guard
Weaknesses CWE-674
References
Metrics cvssV4_0

{'score': 8.7, 'vector': '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'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
bcorg
Published
Updated
Aug 3, 2026, 3:09 PM
Reserved
Jun 28, 2026, 4:39 AM
Status
Analyzed
Published
Aug 3, 2026, 4:16 AM
Modified
Aug 28, 2026, 4:41 PM