Bouncy Castle: Lazy ASN.1 sequence forcing resets nesting-depth guard
CVE-2026-13506 (GitHub advisory GHSA-qp49-qgx5-5m26) is a high-severity vulnerability with a CVSS 4.0 base score of 8.7, classed as Uncontrolled Recursion (CWE-674), in 4 packages, including org.bouncycastle:bcprov-jdk18on (Maven) and org.bouncycastle:bc-fips (Maven). Fixed versions: org.bouncycastle:bcprov-jdk18on 1.85; org.bouncycastle:bc-fips 1.0.2.7, 2.0.2 or 2.1.3; and 2 more packages.
Published 3 Aug 2026Updated 18 Sept 2026
- CVE ID
- CVE-2026-13506
- GHSA ID
- GHSA-qp49-qgx5-5m26
- EPSS
- 0.44%higher than 35% of CVEs
- Weakness (CWE)
- CWE-674Uncontrolled Recursion
- KEV status
- Not in KEV
- Published
- 3 Aug 2026
- Updated
- 18 Sept 2026
- Ecosystem
- Maven
- Assigned by (CNA)
- bcorg
Summary
Source: OSV (GitHub advisory)
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).
Technical details
Source: GitHub Advisory Database
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:AmberHigh8.7Base score from GitHub Advisory Database
- Attack Vector AV
- Network
- Attack Complexity AC
- Low
- Attack Requirements AT
- None
- Privileges Required PR
- None
- User Interaction UI
- None
- Confidentiality (Vulnerable System) VC
- None
- Integrity (Vulnerable System) VI
- None
- Availability (Vulnerable System) VA
- High
- Confidentiality (Subsequent Systems) SC
- None
- Integrity (Subsequent Systems) SI
- None
- Availability (Subsequent Systems) SA
- None
- Provider Urgency U
- Amber
CISA SSVC decision points
- Exploitation
- none
- No public exploitation evidence
- Automatable
- yes
- Attackers can automate this at scale
- Technical impact
- partial
- Limited control of the affected system
CISA Coordinator assessment (SSVC 2.0.3) via CVE.org.
Affected packages
Source: OSV (GitHub advisory)
- org.bouncycastle:bcprov-jdk18onMaven
pkg:maven/org.bouncycastle/bcprov-jdk18on- Affected versions
- < 1.85
- Fixed in
- 1.85
Show 18 listed versions
- 1.71
- 1.71.1
- 1.72
- 1.73
- 1.74
- 1.75
- 1.76
- 1.77
- 1.78
- 1.78.1
- 1.79
- 1.80
- org.bouncycastle:bc-fipsMaven
pkg:maven/org.bouncycastle/bc-fips- Affected versions
- < 1.0.2.7>= 2.0.0, < 2.0.2>= 2.1.0, < 2.1.3
- Fixed in
- 1.0.2.72.0.22.1.3
Show 13 listed versions
- 1.0.0
- 1.0.1
- 1.0.2
- 1.0.2.1
- 1.0.2.3
- 1.0.2.4
- 1.0.2.5
- 1.0.2.6
- 2.0.0
- 2.0.1
- 2.1.0
- 2.1.1
- org.bouncycastle:bcprov-lts8onMaven
pkg:maven/org.bouncycastle/bcprov-lts8on- Affected versions
- < 2.73.12
- Fixed in
- 2.73.12
Show 12 listed versions
- 2.73.0
- 2.73.1
- 2.73.10
- 2.73.11
- 2.73.2
- 2.73.3
- 2.73.4
- 2.73.5
- 2.73.6
- 2.73.7
- 2.73.8
- 2.73.9
- org.bouncycastle:bcprov-jdk15to18Maven
pkg:maven/org.bouncycastle/bcprov-jdk15to18- Affected versions
- < 1.85
- Fixed in
- 1.85
Show 23 listed versions
- 1.63
- 1.64
- 1.65
- 1.66
- 1.67
- 1.68
- 1.69
- 1.70
- 1.71
- 1.72
- 1.73
- 1.74
| Package | Affected versions | Fixed in |
|---|---|---|
org.bouncycastle:bcprov-jdk18on Maven pkg:maven/org.bouncycastle/bcprov-jdk18on |
Show 18 listed versions
|
|
org.bouncycastle:bc-fips Maven pkg:maven/org.bouncycastle/bc-fips |
Show 13 listed versions
|
|
org.bouncycastle:bcprov-lts8on Maven pkg:maven/org.bouncycastle/bcprov-lts8on |
Show 12 listed versions
|
|
org.bouncycastle:bcprov-jdk15to18 Maven pkg:maven/org.bouncycastle/bcprov-jdk15to18 |
Show 23 listed versions
|
|
Fix
Source: OSV (GitHub advisory)
Fix available
- org.bouncycastle:bcprov-jdk18on: upgrade to
1.85or later - org.bouncycastle:bc-fips: upgrade to
1.0.2.7,2.0.2or2.1.3, depending on your release line - org.bouncycastle:bcprov-lts8on: upgrade to
2.73.12or later - org.bouncycastle:bcprov-jdk15to18: upgrade to
1.85or later
Patch commits
Enforce nested-construction depth guard on the lazy ASN.1 sequence parse path
+58 −6 across 4 files
- core/src/main/java/org/bouncycastle/asn1/ASN1InputStream.java+17 −1
- core/src/main/java/org/bouncycastle/asn1/LazyConstructionEnumeration.java+2 −2
- core/src/main/java/org/bouncycastle/asn1/LazyEncodedSequence.java+5 −3
- core/src/test/java/org/bouncycastle/asn1/test/ASN1SequenceParserTest.java+34 −0
Release commits
The commits each fixed release tag points at. They usually bump the version rather than contain the fix itself.
Vulnerability intelligence
Root cause analysis
Vulnerable functions
References
Advisories 4
Credits
- Ytfinder
- Alex Gaynor in collaboration with Claude and Anthropic Researchreporter
Questions about CVE-2026-13506
- What is the GHSA ID for CVE-2026-13506?
- GitHub tracks CVE-2026-13506 as GHSA-qp49-qgx5-5m26.
- What is the CVSS score of CVE-2026-13506?
- CVE-2026-13506 has a CVSS 4.0 base score of 8.7 (High), 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. Other published scores: CVSS 3.1 7.5.
- Which versions are affected by CVE-2026-13506?
- org.bouncycastle:bcprov-jdk18on (Maven): < 1.85. org.bouncycastle:bc-fips (Maven): < 1.0.2.7; >= 2.0.0, < 2.0.2; >= 2.1.0, < 2.1.3. org.bouncycastle:bcprov-lts8on (Maven): < 2.73.12. org.bouncycastle:bcprov-jdk15to18 (Maven): < 1.85.
- How do I fix CVE-2026-13506?
- Upgrade each package to its fixed version: org.bouncycastle:bcprov-jdk18on 1.85; org.bouncycastle:bc-fips 1.0.2.7, 2.0.2 or 2.1.3; org.bouncycastle:bcprov-lts8on 2.73.12; org.bouncycastle:bcprov-jdk15to18 1.85. The fix is in commit 77454da.
- What is the Package URL (PURL) for CVE-2026-13506?
- The affected packages' PURLs are pkg:maven/org.bouncycastle/bcprov-jdk18on, pkg:maven/org.bouncycastle/bc-fips, pkg:maven/org.bouncycastle/bcprov-lts8on and pkg:maven/org.bouncycastle/bcprov-jdk15to18.
- Is CVE-2026-13506 exploited in the wild?
- CISA's Known Exploited Vulnerabilities catalog doesn't list CVE-2026-13506. That means no confirmed exploitation has been catalogued, not that it is safe to leave unpatched. CISA's SSVC assessment rates exploitation as "none". EPSS estimates a 0.44% chance of exploitation in the next 30 days, higher than 35% of CVEs.
Data sources
Upstream records
- OSV (GitHub advisory)LoadedRaw JSON
- GitHub Advisory DatabaseLoadedRaw JSON
- OSV (CVE record)LoadedRaw JSON
- CVE.orgLoaded
- CISA KEV catalogLoaded
Fetched 5 days ago (9 Oct 2026, 06:34 UTC). Records refresh automatically after 24 hours.
Where each part of this page came from
- Title and description
- OSV (GitHub advisory)
- Severity score
- GitHub Advisory Database
- Weakness (CWE)
- GitHub Advisory Database
- Affected packages
- OSV (GitHub advisory)
- Fix
- OSV (GitHub advisory)
- References
- Computed by CVEminer
- SSVC
- CVE.org
- KEV status
- CISA KEV catalog
- EPSS
- GitHub Advisory Database
OSV and GitHub Advisory Database content is licensed CC BY 4.0. Values marked as computed or derived were calculated by CVEminer from the upstream data.