PyPI
CVE-2026-119195
pyasn1 has quadratic-time denial of service in constructed string and indefinite-length ANY decoding
- Severity
- High 7.5
- Published
- 30 Oct 2026
- Last changed
- 30 Oct 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 0.6.5
- Exploit chance
- 0.5% in the next 30 daysHigher than 46% of CVEs. EPSS by FIRST, 24 Nov 2026
- Attack
- Over the network · No login needed · No user action needed
- Attacker can
- Take it down
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H- Also known as
- GHSA-9m75-vc3g-4x39
- Sources
- OSV.dev and GitHub
Description
In pyasn1 0.6.4 and earlier, decoding a constructed OCTET STRING or character string made of many fragments can spend disproportionate CPU time repeatedly copying the accumulated value. A separate indefinite-length ANY path has the same problem while collecting the encoded components. The work grows roughly quadratically with the number of fixed-size fragments, although the input and decoded value grow linearly. An application that lets an attacker supply such ASN.1 input to an affected decoder can suffer CPU exhaustion.
The affected string paths are available in BER and CER. The DER decoder also accepts certain non-DER constructed strings: a definite-length constructed OCTET STRING when an asn1Spec selects univ.OctetString, and constructed character strings such as UTF8String even without a schema. Indefinite-length ANY is affected in BER and CER when an asn1Spec selects univ.Any; DER rejects indefinite lengths.
Workarounds
Until upgrading, enforce application-appropriate limits on the size of untrusted ASN.1 input before passing it to pyasn1, and limit the CPU resources available to decoding workers. Applications that require DER can also reject constructed string encodings before invoking the decoder. The appropriate byte limit depends on the protocol and expected valid values.
Affected software
| Software | Affected versions |
|---|---|
pyasn1PyPI · osv:PyPI:pyasn1 |
|
About pyasn1
Vulnerabilities in pyasn1
- In our list
- 4
- Published in the last 12 months
- 4
- Critical, last 12 months
- 0
- High, last 12 months
- 4
- Known exploited
- 0
- CVE-2026-119196pyasn1 has quadratic CPU consumption in constructed BIT STRING decodingHigh 7.5 30 Oct 2026
- CVE-2026-119197pyasn1 has quadratic-complexity denial of service in binary REAL decodingHigh 7.5 30 Oct 2026
- CVE-2026-119194pyasn1 has quadratic CPU use in schemaless BER/CER/DER container decodingHigh 7.5 30 Oct 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-119195
- GitHub Advisory Database https://github.com/advisories/GHSA-9m75-vc3g-4x39