Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach application endpoint accepting ASN.1
-
DeliveryCraft small binary REAL with huge mantissa
-
ExploitSubmit to BER/CER/DER decode()
-
ExecutionQuadratic mantissa loop pins CPU core
-
ImpactWorker starved, availability loss
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V2 - Validation and Business Logic Algorithmic complexity limits
|
| Exploitation Conditions | The application must pass attacker-controlled ASN.1 to pyasn1's BER, CER, or DER decode(), either with no asn1Spec or with a schema that includes REAL; the input must contain a binary-encoded REAL (tag 0x09, binary/base flag set) with a large mantissa. The expensive work occurs entirely inside decode() - the application does NOT need to convert the REAL to float, print, or otherwise use it (this distinguishes it from CVE-2026-59886, which required float() conversion). Limiting factors that reduce real-world risk: exploitation requires that untrusted ASN.1 actually reaches an affected decoder, and any application-level input size limit on the REAL/mantissa directly caps the achievable CPU cost; the advisory does not assert network reachability or unauthenticated access on its own, so exposure is deployment-dependent. The only complete fix stated by the vendor is upgrading to 0.6.5; until then the stated workaround is to reject or strictly size-limit attacker-controlled ASN.1 that may contain REAL values before decoding. |
| Impact | This is a CWE-407 quadratic-complexity denial-of-service in pyasn1's binary REAL decoder, scored CVSS 7.5 with vector AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - a pure availability impact (C:N/I:N) with no confidentiality or integrity consequence. The vendor priority label is 'this_week', not act_now or emergency, which is consistent with a resource-exhaustion bug rather than code execution. No EPSS score and no CISA KEV entry are present in the input, and there is no indication of active exploitation, so by the precision rules this is 'no public exploit identified' in the KEV sense; however, the GHSA advisory itself publishes working reproduction code and reporter CPU-time measurements, so a public proof-of-concept clearly exists. The CVSS network vector and PR:N should be read with caution: the vendor advisory explicitly states it 'does not assert a network endpoint, unauthenticated access, or an affected downstream application by itself' - exposure depends entirely on whether a given application feeds attacker-controlled ASN.1 to BER/CER/DER decode(). Net assessment: a credible, easy-to-trigger single-core CPU-exhaustion issue affecting a very widely used library, but the real-world severity is bounded by application-level input limits and by whether the decoder is actually reachable with untrusted input. Prioritize patching where pyasn1 parses external ASN.1, but this is not a critical RCE-class emergency. |
| Exploit ScenarioDerived | An attacker submits a small ASN.1 message containing a binary-encoded REAL value with a large mantissa (e.g., a few hundred thousand octets) to any application that passes untrusted input to pyasn1's BER, CER, or DER decode(). Decoding alone - no float conversion, printing, or use of the result - consumes CPU time quadratic in mantissa length, pinning one worker on one CPU core for seconds or longer per request and causing availability loss. Working reproduction code and timing measurements (e.g., ~6 s for a 200,000-octet mantissa, ~24 s for 400,000) are published in the GHSA advisory. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 29, 2026
Quadratic-time denial of service in pyasn1 0.6.4 and earlier lets an attacker who can feed ASN.1 data into the library's BER, CER, or DER decoders pin a worker process on one CPU core for seconds or longer, scored CVSS 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) with availability-only impact. The trigger is a binary-encoded REAL value (tag 0x09 with the binary/base-2 flag set) carrying a large mantissa; the cost is incurred entirely inside decode(), so the application never has to convert, print, or otherwise touch the decoded REAL - this is what separates it from the earlier float-conversion issue CVE-2026-59886 fixed in 0.6.4. Exposure is deployment-dependent: the advisory does not assert a network endpoint or unauthenticated access by itself, and any application-level cap on ASN.1 or mantissa size directly bounds the achievable CPU cost. No public exploit toolkit is confirmed and the issue is not in CISA KEV; the vendor advisory does publish a working reproduction script, and the fix ships in pyasn1 0.6.5.
RemediationAI
Vendor-released patch: pyasn1 0.6.5 (released 26-10-2026), which replaces the quadratic per-octet mantissa loop with a single int.from_bytes conversion in the shared BER REAL payload decoder, covering BER, CER, and DER; upgrade with 'pip install --upgrade pyasn1>=0.6.5' and confirm pyasn1.__version__ reports 0.6.5, per https://github.com/pyasn1/pyasn1/releases/tag/v0.6.5, the commit https://github.com/pyasn1/pyasn1/commit/ce3ec3390784780a530047e0e77be5ff457636a4 and PR https://github.com/pyasn1/pyasn1/pull/132. The vendor states that upgrading is the fix and that until then the workaround is to reject or strictly size-limit attacker-controlled ASN.1 input that may contain REAL values before it reaches pyasn1; the practical trade-off is that any REAL-bearing protocol or message must be screened by a pre-parse length check or a tag-level reject rule, and picking the limit requires knowing the service's available CPU time and request volume, since a limit set too tightly can break legitimate traffic while a limit set too loosely still permits multi-second stalls. Applications that already enforce a hard cap on total request or TLV size inherit a corresponding ceiling on decode cost and should verify the cap actually applies to nested REAL content. Note that 0.6.5 also carries fixes for GHSA-2qm8-x737-gmw5, GHSA-9m75-vc3g-4x39 and GHSA-fm9c-5rcf-2q5p, so the upgrade should be taken as a bundle.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
pyasn1 is a pure-Python ASN.1 implementation whose BER decoder is reused by the CER and DER decoders, so a single defect in the shared binary REAL payload path is reachable from all three codecs. ASN.1 REAL values can be encoded in binary form, where the content octets carry a control byte (sign and base, base-2 here), a one- or more-octet exponent, and then a mantissa of arbitrary length. In v0.6.4, RealPayloadDecoder.valueDecoder assembled that mantissa in a loop that left-shifts a growing Python integer by 8, ORs in the next octet, and slices the remaining byte string to advance. Both operations scale with the size of the accumulated integer/suffix, so repeating them per octet makes total decode time quadratic in mantissa length - the classic CWE-407 inefficient-algorithm-complexity pattern. The decoder's eight-octet length-field limit does not impose a practical bound on mantissa size, and the vulnerable loop is present in every inspected repository tag from v0.2.1 through v0.6.4. The 0.6.5 fix replaces the per-octet shift/slice loop with a single int.from_bytes(bytes(chunk), 'big') conversion, giving linear time while preserving sign, scale, exponent, and the decoded REAL tuple; because the change is in the shared BER payload decoder it covers BER, CER, and DER. Version 0.6.5 additionally linearizes constructed BIT STRING and OCTET STRING/character-string reassembly and bounds schemaless container tag tracking (GHSA-2qm8-x737-gmw5, GHSA-9m75-vc3g-4x39, GHSA-fm9c-5rcf-2q5p).
Know when Pyasn1 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
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
A single crafted REAL triggers the quadratic loop with no special conditions or auth (AC:L/PR:N/UI:N), decoding is commonly reachable over the network (AV:N), and the only impact is CPU-exhaustion availability loss (C:N/I:N/A:H).
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
pyasn1 is a generic ASN.1 library for Python. Prior to 0.6.5, binary REAL decoding builds a large mantissa one octet at a time by shifting a growing integer and slicing the remaining byte string. Attacker-controlled ASN.1 includes a binary-encoded REAL with a large mantissa and reaches BER, CER, or DER decode(), with or without a schema containing REAL. RealPayloadDecoder.valueDecoder repeatedly performs a left shift, OR, and suffix copy for every mantissa octet, making decode time quadratic in mantissa length. A comparatively small REAL value can hold a decoding worker on one CPU core for seconds or longer and cause availability loss. This issue is fixed in version 0.6.5.
Blast Radius
ecosystem impact- 22,721 pypi packages depend on pyasn1 (501 direct, 22,344 indirect)
Ecosystem-wide dependent count for version 0.6.5.
Technical POC Analysis
CWE-407, inefficient algorithmic complexity, in RealPayloadDecoder.valueDecoder in pyasn1's shared BER payload decoder.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Latest POC
1 PoC candidate from github (unverified)
Sign in to open the public PoC links collected for this CVE.
Executive ViewAI
A high-severity denial-of-service vulnerability in pyasn1 (0.6.4 and earlier) can allow an attacker to stall worker processes by submitting specially crafted ASN.1 data, potentially disrupting services that parse such input. This affects any product or internal system using the library for BER, CER, or DER decoding, and leadership should care because successful exploitation can degrade availability and cause operational outages.
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
Quadratic CPU consumption in pyasn1's schemaless BER/CER/DER container decoder (versions 0.3.3 through 0.6.4) lets remot
pyasn1 is a generic ASN.1 library for Python. versions up to 0.6.2 is affected by allocation of resources without limits
Quadratic-time CPU exhaustion in pyasn1 0.6.4 and earlier allows remote, unauthenticated attackers to tie up decoding wo
Quadratic CPU consumption in pyasn1 through 0.6.4 lets an attacker who controls ASN.1 input keep a decoder worker busy f
Denial of service in the pyasn1 Python ASN.1 library (versions prior to 0.6.4) allows a remote attacker to exhaust CPU a
Denial of service in the pyasn1 Python ASN.1 library (all versions prior to 0.6.4) allows remote attackers to exhaust CP
Uncontrolled resource consumption in the pyasn1 Python ASN.1 library (versions prior to 0.6.4) lets remote attackers han
EUVD-2026-113353
GHSA-mm57-4v3p-rchx
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB