Skip to main content

pyasn1 EUVDEUVD-2026-113353

| CVE-2026-119197 HIGH
Inefficient Algorithmic Complexity (CWE-407)
2026-10-29 GitHub_M GHSA-mm57-4v3p-rchx
7.5
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach application endpoint accepting ASN.1
  2. Delivery
    Craft small binary REAL with huge mantissa
  3. Exploit
    Submit to BER/CER/DER decode()
  4. Execution
    Quadratic mantissa loop pins CPU core
  5. Impact
    Worker 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
1 PoC candidate (unverified) Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

pyasn1 < 0.6.5

Affected Packages

pypi pyasn1 fix: 0.6.5

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

Vendor (GitHub_M) PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 7.5 HIGH

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).

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

2
Patch available
Oct 29, 2026 - 20:18 EUVD
CVE Published
Oct 29, 2026 - 19:48 cve.org
HIGH 7.5

DescriptionCVE.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
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 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

Why It Matters

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.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.4%
Top 63% exploitable
Prevalence
High
widely used Python ASN.1 library, common transitive dependency in crypto/LDAP tooling
Threat Intel
1
1 sources
Social Media
2
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA MSRC CIRCL GitHub VulDB

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

58
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy