Skip to main content

pyasn1 EUVDEUVD-2026-113352

| CVE-2026-119196 HIGH
Inefficient Algorithmic Complexity (CWE-407)
2026-10-29 GitHub_M GHSA-2qm8-x737-gmw5
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
    Submit crafted ASN.1 to app endpoint
  2. Delivery
    Payload carries many constructed BIT STRING fragments
  3. Exploit
    pyasn1 decode() shifts growing SizedInteger per fragment
  4. Execution
    Quadratic CPU work exhausts decoder worker
  5. Impact
    Denial of service while attack continues

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V2 - Validation and Business Logic Algorithmic complexity limits
Exploitation Conditions

The affected application must pass untrusted, attacker-sized ASN.1 to a pyasn1 decoder path that reaches constructed BIT STRING assembly: the BER and CER decoders reach it with or without an asn1Spec; the DER decoder is exposed ONLY on its schema-driven path when given asn1Spec=univ.BitString() and fed a definite-length constructed BIT STRING (constructed BIT STRING is not valid DER - this is decoder permissiveness). Conforming CER with indefinite-length outer framing and 1000-octet primitive fragments also triggers the indefinite-length loop. Limiting factors: schema-less DER decoding REJECTS the constructed value and is not vulnerable; the attacker needs enough fragments that the application's input limits still admit (a pre-decode input-size cap bounds, though does not eliminate, exposure); and actual network reachability and authentication requirement are determined by the calling application, not by pyasn1 itself. Impact is CPU exhaustion only - no data exposure or modification.

Impact

This is a genuine but conditional availability risk, not a top-tier emergency. The library-level CVSS of 7.5 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) reflects a worst-case assumption stated explicitly in the GHSA advisory: a 'reasonable application that automatically decodes attacker-supplied ASN.1 from unauthenticated network input.' The CWE-407 (quadratic/algorithmic complexity) classification and the confirmed O(n²) behavior - benchmarked at 7.4 s CPU for a 0.8 MB BER input on v0.6.4, with an independent report of 21.1 s for 1.28 MB - substantiate the A:H impact. However, the real-world risk is entirely gated by the calling application: the advisory states 'Whether the input is network-accessible or unauthenticated depends on the calling application' and 'makes no claim that every application using pyasn1 ... accepts such input.' The vuln.today Decision label is 'this_week' (not act_now/emergency), consistent with a serious issue that is not under active mass exploitation. There is NO CISA KEV listing and NO EPSS score provided, so exploitation is not confirmed in the wild - appropriate for a DoS primitive that has no confidentiality or integrity impact and must be chained through a specific application entry point. Confidentiality and integrity are N, so this cannot be escalated beyond denial of service. Net: prioritize patching where pyasn1 decodes untrusted ASN.1 from the network, but the raw 7.5 overstates risk for deployments that only decode trusted/bounded input.

Exploit ScenarioDerived

An attacker who can submit ASN.1 data to an application that automatically decodes it with pyasn1's BER or CER decoder sends a small (sub-megabyte) payload containing tens of thousands of constructed BIT STRING fragments. During decode(), pyasn1 repeatedly shifts and copies an ever-growing integer per fragment, consuming quadratically increasing CPU time and tying up the decoding thread or worker pool; repeated requests sustain a denial of service. A working reproducer is published in the GHSA advisory demonstrating the quadratic cost on v0.6.4.

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 CPU consumption in pyasn1 through 0.6.4 lets an attacker who controls ASN.1 input keep a decoder worker busy far longer than the payload size justifies: a 0.8 MB BER value split into 200,000 constructed BIT STRING fragments costs about 7.4 seconds of CPU in the upstream benchmark, and a 4 MB conforming CER value costs about 2.6 seconds. The BER and CER decoders hit the path with or without an asn1Spec, while the DER decoder is exposed only through its schema-driven route when given asn1Spec=univ.BitString() and a definite-length constructed BIT STRING - schema-less DER rejects the same input. Impact is availability only (CPU exhaustion; no confidentiality or integrity effect), and exposure depends entirely on whether the calling application feeds unbounded untrusted ASN.1 to these decoders; no active exploitation is reported, and the upstream advisory publishes working reproducer code that demonstrates the cost growth.

RemediationAI

Vendor-released patch: pyasn1 0.6.5 (https://github.com/pyasn1/pyasn1/releases/tag/v0.6.5), implemented by PR https://github.com/pyasn1/pyasn1/pull/132 and commit 73ba7b043cc7e92cb37f16f2c955bff93b0e6f6c; upgrade from <= 0.6.4 to 0.6.5 and regenerate dependency pins, since the advisory notes the release also fixes several sibling quadratic-decoding issues that may affect the same code paths. Deployments that cannot upgrade immediately have two documented compensating controls, both partial: enforce an application-appropriate bound on untrusted ASN.1 input size before the data reaches pyasn1, which caps the number of fragments and therefore the worst-case CPU cost but does not remove the quadratic growth, and carries the side effect that legitimate large encodings may be rejected; or, where the protocol forbids constructed BIT STRING, reject that encoding before decoding, which closes the BER/CER and permissive schema-driven DER paths but breaks interoperability with peers that legitimately send constructed BIT STRING (normal CER traffic in particular). Note that the report identifies schema-less DER decoding as already rejecting the constructed value, so no exemption should be assumed for schema-driven DER. Reachability and authentication exposure are determined by the calling application, not by pyasn1, so applications that never decode untrusted ASN.1 faces lower urgency.

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

This is CWE-407 (inefficient algorithmic complexity) in pyasn1's constructed BIT STRING handling. In v0.6.4, BitStringPayloadDecoder's definite-length and indefinite-length fragment loops each call BitString.fromOctetString(component[1:], internalFormat=True, prepend=bitString, padding=trailingBits); fromOctetString left-shifts the growing SizedInteger by the fragment's bit length and ORs in the new bits, so assembling n fixed-size sibling fragments performs O(n^2) work in total. Because fragments are siblings rather than nested children, the decoder's recursion-depth limit does not bound them, and its limit on length-octet count does not block the demonstrated payloads. Per X.690, a conforming CER constructed BIT STRING uses indefinite-length outer framing with 1000-content-octet primitive fragments, which drives the indefinite-length loop; DER requires primitive string encoding, but pyasn1's tag-driven DER map only disables constructed BIT STRING on the schema-less path while the schema-driven type map retains the permissive inherited decoder - hence the DER exposure is decoder permissiveness, not valid DER. The fix in 0.6.5 appends fragments into a bytearray via a new _appendFragment helper, preserving intermediate padding bits, and converts once with padding=(-bitLength) % 8. Note that one third-party tag attached to this CVE says 'Information Disclosure'; the upstream advisory demonstrates only CPU exhaustion and explicitly states no confidentiality or integrity impact, so that tag is not supported by the source data. The same 0.6.5 release also removes analogous quadratic behavior from constructed OCTET STRING/character-string reassembly, binary REAL mantissa decoding, and schemaless tag tracking (GHSA-9m75-vc3g-4x39, GHSA-mm57-4v3p-rchx, 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

Library-level worst case where untrusted ASN.1 arrives over the network unauthenticated (AV:N/AC:L/PR:N/UI:N); quadratic decode causes CPU-exhaustion DoS with no C/I impact (A:H only).

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:44 cve.org
HIGH 7.5

DescriptionCVE.org

pyasn1 is a generic ASN.1 library for Python. Prior to 0.6.5, constructed BIT STRING decoding repeatedly shifts and copies the complete bit value accumulated from earlier fragments. Attacker-controlled BER or CER input contains many constructed BIT STRING fragments; schema-driven DER also accepts a definite-length constructed BIT STRING. BitStringPayloadDecoder repeatedly calls BitString.fromOctetString with the prior bitString as prepend, shifting an ever-growing SizedInteger for each fragment and causing quadratic work. Large fragmented values can exhaust CPU during decode() without requiring later conversion or formatting. 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: quadratic CPU cost in constructed BIT STRING decoding.

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

CVE-2026-119196 is a high-severity availability flaw in the pyasn1 library, a dependency used to parse ASN.1-encoded data in many applications. The organization is exposed only where applications feed untrusted, unbounded ASN.1 input into pyasn1's BER/CER decoders or schema-driven DER decoding, where an attacker can force disproportionate CPU consumption and degrade service. Leadership should care because affected externally facing services could be slowed or denied by low-cost inputs, though there is no confidentiality or integrity risk.

Business Impact: Medium
Compensating Controls

Vendor-released patch: upgrade pyasn1 to the fixed version specified in the upstream advisory.

Threat Intelligence Overview

EPSS Score
0.4%
Top 63% exploitable
Prevalence
High
foundational Python ASN.1 library, transitive dependency of many security/crypto packages
Threat Intel
1
1 sources
Social Media
2
Sightings
Data Quality
5 sources
Confidence: Medium

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· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
Medium

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