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
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- How many real-world setups can hit the bug, from the vendor's advisory and CISA data. It does not know your setup.What do these mean? →
- Unclear
- Fix
- Fixed in 0.6.5
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- 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
- CVE published
- First seen by cve.now
- CISA SSVC assessment
Exploitation: poc · Automatable: yes · Technical impact: partial
- Record last updated
Affected versions
- pyasn1 pyasn1
fixed in 0.6.5
References 4
GitHub · pyasn1/pyasn1
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