Skip to main content
← All vulnerabilities
CVE-2026-119195EUVD-2026-113351GHSA-9M75-VC3G-4X39

pyasn1: Quadratic-time denial of service in constructed string and indefinite-length ANY decoding

Affects pyasn1 0.6.4 and earlier when decoding BER or CER input with constructed strings or indefinite-length ANY values. Fixed in 0.6.5.

Published
Last modified
published
Not listed in CISA KEV
Unclear
Fix
Fixed in 0.6.5
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: yes
  • Technical impact: partial

Summary

The pyasn1 Python library, a generic ASN.1 decoder used to parse BER, CER, and DER data, is affected. Maliciously crafted input with many fragmented constructed strings or indefinite-length values can make decoding take disproportionately long, potentially exhausting CPU and causing a denial of service without exposing or altering data.

Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.

Read the original description

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.

Timeline

  1. CVE published
  2. First seen by cve.now
  3. CISA SSVC assessment

    Exploitation: poc · Automatable: yes · Technical impact: partial

  4. Record last updated

Affected versions

  • pyasn1 pyasn1

    fixed in 0.6.5

References 4

GitHub · pyasn1/pyasn1

FAQ

Questions about CVE-2026-119195

What does this mean?

Certain crafted constructed strings and indefinite-length ANY values take quadratic time to decode in pyasn1, so decoding untrusted input can use a large amount of CPU. The issue is a denial of service through slow decoding.Source: github.com

Am I affected, and how do I check?

Versions 0.6.4 and earlier are affected. Check the installed version with python -c "import pyasn1; print(pyasn1.__version__)" or pip show pyasn1. The BER and CER constructed string paths are affected, and indefinite-length ANY is affected when an asn1Spec selects univ.Any; the DER decoder also accepts some non-DER constructed strings, such as OCTET STRING with univ.OctetString or UTF8String without a schema.Source: github.com

What should I do about it?

Upgrade pyasn1 to version 0.6.5 or later, which contains the fix.Source: github.com

Is it being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. CISA's SSVC assessment notes a proof of concept exists. No public exploit code is tracked.Source: cve.now feed data