Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit crafted OpenPGP key/signature to parser
-
DeliverySubpacket uses five-octet length header
-
ExploitDeclared length sizes unbounded buffer
-
Execution~2 GB allocation before body read
-
ImpactOutOfMemoryException / memory exhaustion DoS
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory allocation limits
|
| Exploitation Conditions | Exploitable whenever an application uses bc-csharp before 2.7.0 to parse attacker-supplied OpenPGP material (public keys, certificates, or signatures) through SignatureSubpacketsParser.ReadPacket or UserAttributeSubpacketsParser.ReadPacket - common in PGP key-import, signature-verification, or keyserver features. The specific trigger is a subpacket header using the five-octet (0xFF) length form declaring a body up to ~4 GB, which is used to size the buffer with no upper bound. No authentication, user interaction, or non-default configuration is required; the only prerequisite is that the service accepts and parses untrusted OpenPGP data. Limiting factor: impact is confined to availability (process crash/memory exhaustion) with no data disclosure or code execution, and services that never parse untrusted OpenPGP input are not exposed. |
| Impact | This is a genuine, easy-to-trigger denial-of-service rather than a critical system-compromise issue, and the signals are internally consistent. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) confirms a remote, unauthenticated, low-complexity trigger with no user interaction, and the impact profile (VC:N/VI:N/VA:H) correctly scopes this to availability only - no confidentiality or integrity loss, matching CWE-789 (memory allocation with excessive size value). The 8.7 'High' score is driven almost entirely by the availability impact being reachable pre-authentication; it should NOT be read as a code-execution threat. Exploitation is trivially reliable per the source evidence (a few header bytes using the five-octet length form force an allocation of up to ~2 GB before any body is read), which realistically explains the low attack complexity. No EPSS score, KEV listing, or public POC was provided in the input; absence of these means exploitation is not confirmed in the wild, but the fix commit ships a regression test that effectively demonstrates the trigger, lowering the bar to reproduce. Net priority: patch promptly for any service that parses untrusted OpenPGP material, but treat this as availability hardening, not an emergency compromise scenario. |
| Exploit ScenarioDerived | An attacker submits a crafted OpenPGP public key, certificate, or signature to a .NET service that parses it with bc-csharp (for example an email/PGP verification endpoint or a key-upload feature). A single subpacket whose five-octet length header declares a near-4 GB body causes the signature or user-attribute subpacket parser to attempt a multi-gigabyte buffer allocation before reading any data, throwing OutOfMemoryException or exhausting process memory. No public exploit was identified at time of analysis, though the vendor fix includes a regression test that constructs the triggering packet. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 02, 2026
Denial of service in Legion of the Bouncy Castle Inc. bc-csharp before 2.7.0 allows unauthenticated remote attackers to exhaust process memory by supplying crafted OpenPGP public keys, certificates, or signatures, because a subpacket header using the five-octet (0xFF) length form declares an oversized body length that is used directly to size a buffer before any subpacket data is read. The flaw lives in SignatureSubpacketsParser.ReadPacket and UserAttributeSubpacketsParser.ReadPacket (CWE-789, memory allocation with excessive size value) and is rated CVSS 4.0 8.7 (AV:N/AC:L/AT:N/PR:N/UI:N/VA:H) and an independently assessed CVSS 3.1 of A:H with no confidentiality or integrity impact; a handful of input bytes can demand an allocation of up to roughly 2 GB (the 32-bit length field permits up to ~4 GB in principle), so any service that imports or verifies untrusted PGP material is exposed. Vendor patches are available (bc-csharp 2.7.0) and no public exploit code has been identified at time of analysis, though the upstream regression test does illustrate the malicious packet format.
RemediationAI
Upgrade bc-csharp to version 2.7.0 or later, which is the vendor-released fix: both commits introduce a 2 MiB MaxSubpacketLength cap and reject oversized subpacket headers with an EndOfStreamException before any buffer is allocated (see the advisory at https://github.com/bcgit/bc-csharp/wiki/CVE-2026-63574). Since the flaw is only reachable through parsing of untrusted OpenPGP material, the most effective compensating control if you cannot upgrade immediately is to stop feeding attacker-controlled keys, certificates, or signatures into the library - for example, require administrator approval or out-of-band verification before key import. If untrusted parsing must continue, pre-scan the raw OpenPGP packets in your own code and reject any subpacket header using the five-octet 0xFF length form (or any declared body larger than a few MiB) before handing bytes to bc-csharp; note the trade-off that some legitimate artifacts, such as signatures with large embedded keys or oversized image user attributes, may legitimately exceed that threshold and will be rejected. Additionally, run the PGP parsing workload in a sandboxed, memory-limited child process or container so that an induced OutOfMemoryException crashes only that isolated component rather than the whole service, and apply process memory ceilings (for example, .NET GC heap hard limits) as a backstop; this reduces, but does not eliminate, the availability impact of a successful allocation attempt.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
OpenPGP signature and user-attribute subpacket areas are TLV structures: each subpacket begins with a length header that can use a one-, two-, or five-octet form, where the five-octet form is a 0xFF marker followed by a 32-bit big-endian body length. In bc-csharp before 2.7.0, Org.BouncyCastle.Bcpg.SignatureSubpacketsReader and Org.BouncyCastle.Bcpg.UserAttributeSubpacketsReader validated the declared length only against the trivial bounds bodyLen < 1U || bodyLen > int.MaxValue and then allocated a new byte[] of that declared size, without comparing it against the remaining size of the enclosing subpacket area or packet. This is the classic CWE-789 pattern: an attacker-controlled size value is trusted for allocation before any corresponding data is read, so a few header bytes force a multi-megabyte-to-multi-gigabyte allocation and an OutOfMemoryException. The upstream fix (commits f51dacf4 and 986fb489) introduces a private const MaxSubpacketLength = 2 * 1024 * 1024 (2 MiB) in both parser classes and rejects any body over that cap before the buffer is created, mirroring bc-java's SignaturePacket.MAX_SUBPACKET_LEN and the sibling bc-java fix at commit a43c40dc12 (tracked as CVE-2026-3505). The accompanying regression test builds a subpacket with a 0xFF five-octet header declaring MaxSubpacketLength + 2 bytes and asserts an EndOfStreamException is thrown by both parsers, confirming the cap rather than a read failure is what stops the attack. The affected ecosystem is the C
Bouncy Castle crypto library (CPE cpe:2.3:a:legion_of_the_bouncy_castle_inc.:bc-csharp), commonly embedded in PGP key-import, signature-verification, and keyserver functionality.
Know when Openpgp 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
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
Remote unauthenticated parsing of attacker-supplied data with no interaction gives AV:N/AC:L/PR:N/UI:N; impact is availability-only (A:H), so C:N/I:N and scope unchanged.
Primary rating from Vendor (bcorg).
CVSS VectorVendor: bcorg
DescriptionCVE.org
Memory allocation with excessive size value in the OpenPGP signature and user attribute subpacket parsers (SignatureSubpacketsParser.ReadPacket, UserAttributeSubpacketsParser.ReadPacket) in Legion of the Bouncy Castle Inc. bc-csharp before 2.7.0 allows a remote, unauthenticated attacker who can supply a crafted OpenPGP public key, certificate or signature to cause a denial of service (OutOfMemoryException or memory exhaustion in the parsing process) via a subpacket header using the five-octet length form, because the declared length was used to size the subpacket buffer with no upper bound and without being compared with the size of the enclosing subpacket area or packet, so a few bytes of input could demand an allocation of up to about 2 GB before any subpacket data was read.
Executive ViewAI
Legion of the Bouncy Castle Inc. bc-csharp before 2.7.0 exposes services that import or verify untrusted OpenPGP material to a high-severity, unauthenticated remote denial-of-service condition that can exhaust process memory. This creates an availability risk for any application, gateway, or processing pipeline relying on this library, potentially causing process crashes or outages without affecting data confidentiality or integrity. Vendor-released patch: bc-csharp 2.7.0 is available, and no public exploit identified at time of analysis.
Apply vendor patch.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Truncated OpenPGP messages are silently accepted by Bouncy Castle for Java's OpenPGP decryption streams, letting an atta
Signature misattribution in the high-level OpenPGP API of Bouncy Castle for Java before 1.86 lets an attacker who holds
EUVD-2026-91225
GHSA-576x-9vpc-g3jj
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB