Skip to main content

pyasn1 CVE-2026-119195

| EUVDEUVD-2026-113351 HIGH
Inefficient Algorithmic Complexity (CWE-407)
2026-10-29 GitHub_M GHSA-9m75-vc3g-4x39
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
    Send crafted fragmented BER/CER ASN.1 to decoder
  2. Exploit
    Trigger quadratic constructed-string or indefinite-ANY reassembly
  3. Execution
    Consume seconds of CPU per decode worker
  4. Impact
    Repeat to exhaust CPU and deny service

Vulnerability Assessment

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

The affected application must pass attacker-controlled ASN.1 into pyasn1's decode() or StreamingDecoder path without enforcing input-size or decoder CPU limits. Concrete trigger paths differ by codec: BER and conforming CER accept constructed OCTET STRING and inherited character strings (UTF8String, PrintableString, IA5String, BMPString, GeneralizedTime, etc.) directly; the indefinite-length ANY path is reached in BER/CER only when an asn1Spec selects univ.Any; the DER decoder reaches the loop only via der.decode(data, asn1Spec=univ.OctetString()) for a definite-length constructed OCTET STRING, or via a constructed character string decoded without a schema, while DER rejects schemaless constructed OCTET STRING and all indefinite lengths. Limiting factors: effective abuse needs megabyte-scale, highly fragmented input and the absence of application-level size/CPU caps; no privileges, authentication, or user interaction are required, but the vendor states that whether the decoder is reachable pre-authentication or through a particular protocol is application-specific and not established by the library finding.

Impact

The input CVSS of 7.5 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) is an explicitly library-level, availability-only score that the GHSA advisory says assumes 'a reasonable application that automatically decodes attacker-supplied ASN.1 from unauthenticated network input.' The vector signals remote, low-complexity, unauthenticated reach with no confidentiality or integrity impact - consistent with a CWE-407 quadratic-time DoS. Decision signals are mixed and partly absent: the vuln.today priority is 'this_week' (prompt patching, not emergency/act_now); no CISA KEV entry is present in the input, so there is no confirmed active exploitation; and no EPSS score was supplied, so exploitation probability cannot be weighed. A public reproduction script is published in the GHSA advisory, but a reproducer is not the same as confirmed in-the-wild use. Net assessment: this is a genuine but deployment-gated availability risk rather than a drop-everything event - the raw 7.5 overstates real risk for the many adopters that do not expose a pyasn1 decoder to untrusted, size-unbounded ASN.1, and understates it for services (SNMP, LDAP, certificate/X.509 or other ASN.1 parsers) that do. The vendor itself cautions that whether the flaw is reachable pre-authentication or via a given protocol depends on the application, so prioritize by whether your deployment decodes attacker-controlled ASN.1.

Exploit ScenarioDerived

An unauthenticated attacker submits a megabyte-scale ASN.1 message built from many small constructed OCTET STRING or character-string fragments (or an indefinite-length ANY) to a service that decodes it with pyasn1 ≤ 0.6.4; the growing-bytes reassembly performs O(N²) copying and ties up a decoding worker for seconds per message. Repeated submissions exhaust available decoder workers and CPU, denying service while the attack continues. A working proof-of-concept reproducer is published in the GHSA advisory, though it is not verified as a weaponized exploit against a specific product.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
1 PoC candidate (unverified) Patch available 0.5% 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 CPU exhaustion in pyasn1 0.6.4 and earlier allows remote, unauthenticated attackers to tie up decoding workers by supplying highly fragmented ASN.1 input - constructed BER/CER OCTET STRING or character-string values, or indefinite-length ANY content when an asn1Spec selects univ.Any - that is reassembled with repeated growing-bytes concatenation. The DER codec is also reachable through der.decode(data, asn1Spec=univ.OctetString()) for a definite-length constructed OCTET STRING and through constructed character strings used without a schema, even though those encodings are not valid DER. Impact is availability only (CVSS 7.5, C:N/I:N/A:H); the vendor rates the issue as requiring an application that decodes untrusted ASN.1 without size or CPU limits, and states that pre-authentication reachability through a specific protocol is application-specific. Fixed in pyasn1 0.6.5, which reassembles fragments in a list and joins once; a reproducibility PoC is published in the GHSA advisory, but no confirmed working exploit code and no active exploitation (CISA KEV) have been identified, so this is prioritized for patching this week rather than treated as an emergency.

RemediationAI

Vendor-released patch: upgrade to pyasn1 0.6.5, which replaces the growing bytes accumulators with a fragment list joined once after decoding across the OCTET STRING, inherited character-string and indefinite-length ANY loops (upstream fix in https://github.com/pyasn1/pyasn1/pull/132, commit 4ce00797c594b59c1fd6b86d9ebc3ba87b7ec9f9, release https://github.com/pyasn1/pyasn1/releases/tag/v0.6.5). Note that 0.6.5 also changes nested constructed OCTET STRING handling so inner fragments contribute their decoded octets, so regression-test decoded values, not just timing, after upgrading. If upgrading cannot be done immediately, enforce application-appropriate limits on the size of untrusted ASN.1 input before it reaches pyasn1 and cap CPU available to decoding workers, accepting that a sufficiently permissive byte limit still allows multi-second stalls; applications that require DER can additionally reject constructed string encodings before invoking the decoder, at the cost of rejecting some BER-origin data that currently decodes successfully. The vendor states that a byte limit depends on protocol and expected valid values, and that upgrading is the complete fix.

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, CER and DER codecs follow ITU-T X.690. In v0.6.4, OctetStringPayloadDecoder accumulates each decoded fragment with 'header += component' in both its definite-length and indefinite-length constructed paths, and AnyPayloadDecoder.indefLenValueDecoder does the same with 'chunk += component'; because each concatenation copies the growing prefix, N fixed-size fragments cost O(N²) - the CWE-407 (inefficient algorithm complexity) root cause. The OCTET STRING decoder is the base class for UTF8String, NumericString, PrintableString, TeletexString, VideotexString, IA5String, GraphicString, VisibleString, GeneralString, UniversalString, BMPString, ObjectDescriptor, GeneralizedTime and UTCTime, so all of those inherit the same reassembly loop. The DER codec replaces the tag-driven decoder for OCTET STRING but keeps the BER-derived decoder in its schema-driven TYPE_MAP, so schemaless constructed OCTET STRING is rejected while der.decode(..., asn1Spec=univ.OctetString()) reaches the loop; inherited character-string decoders are untouched by DER, so a constructed UTF8String is accepted without a schema. Definite-length constructed strings are valid BER and accepted by CER, but are not conforming CER/DER encodings; conforming CER layouts (indefinite outer length, ~1,000 content octets per fragment) still reach the loop, and indefinite-length ANY is reachable in BER and CER only with an asn1Spec selecting univ.Any. The decoder's eight-octet length limit and nesting-depth limit do not bound the number of sibling fragments. This is a distinct decoder path from the OID/RELATIVE-OID accumulation issue tracked as CVE-2026-59885; the 0.6.5 release addresses several related complexity flaws together (binary REAL mantissa decoding, constructed BIT STRING reassembly, and schemaless container tag tracking).

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

Remote, no privileges or interaction and low complexity for the BER/CER string path; availability-only CPU exhaustion gives A:H with C:N/I:N, matching the library-level unauthenticated-decode assumption.

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

DescriptionCVE.org

pyasn1 is a generic ASN.1 library for Python. Prior to 0.6.5, constructed string and indefinite-length ANY decoding repeatedly concatenates each fragment onto a growing bytes value. Attacker-controlled BER or CER data can use many constructed OCTET STRING or character-string fragments. DER rejects constructed OCTET STRING without a schema, but accepts its definite-length form when asn1Spec selects univ.OctetString; it also accepts constructed character strings such as UTF8String without a schema, even though those encodings are not valid DER. The separate indefinite-length ANY path is reachable in BER and CER when asn1Spec selects univ.Any; DER rejects indefinite lengths. OctetStringPayloadDecoder uses growing header concatenation and AnyPayloadDecoder.indefLenValueDecoder uses growing chunk concatenation, repeatedly copying an increasing prefix and causing quadratic work. A sufficiently fragmented value can occupy decoding workers and cause CPU exhaustion without confidentiality or integrity impact. 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.

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-119195 is a high-severity denial-of-service vulnerability in pyasn1 (versions ≤0.6.4) that can be triggered by unauthenticated remote attackers sending specially crafted ASN.1 data, causing CPU exhaustion and potential service disruption for applications that decode untrusted ASN.1. Organizations using pyasn1 in network-facing services or data processing pipelines should prioritize patching to avoid availability incidents.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.5%
Top 55% exploitable
Prevalence
High
widely-used Python ASN.1 library, common SNMP/LDAP/X.509/crypto dependency
Threat Intel
1
1 sources
Social Media
2
Sightings
Data Quality
6 sources
Confidence: High

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.5%
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
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

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

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

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