pyasn1 can use huge CPU time when decoding crafted ASN.1 data
pyasn1 is a Python library that reads a common data format used in certificates and security messages. A specially built input made of many small pieces can make it take a very long time to read, which can freeze the program that is reading
| Severity | HighCVSS 7.5 of 10 |
|---|---|
| Being exploited? | UnclearNo reports either way yet |
| Fix available? | Yespyasn1 0.6.5 · since 30 Oct 2026 |
| How sure is this? | Official, 2 sourcesBacked by an official source |
How the attack works simplified
- 1Attacker crafts inputMany small constructed BIT STRING fragments
- 2Input reaches appUntrusted BER, CER, or DER data
- 3pyasn1 decodes itRepeated shifting of growing value
- 4CPU exhaustedQuadratic work during decode()
- ResultDecoding thread stalls, denial of service
What happened
In pyasn1 0.6.4 and earlier, decoding a constructed BIT STRING with many fragments repeatedly shifts and copies the entire accumulated value, causing quadratic CPU work during decode() for BER, CER, and schema-driven DER input.
Are you affected?
You are affected if you use pyasn1 version 0.6.4 or earlier to decode untrusted BER, CER, or schema-driven DER input containing constructed BIT STRING values.
| Package / product | Affected versions | Fixed in |
|---|---|---|
| pyasn1 · pip | <= 0.6.4 | 0.6.5 |
What to do
- Update pyasn1 to version 0.6.5 or later (pip install --upgrade pyasn1)
- Check whether your application decodes untrusted ASN.1 input with pyasn1 and limit input size where possible until updated
Timeline
- 29 Oct 2026, 20:17 UTCPublicly disclosed
- 29 Oct 2026, 20:17 UTCReported by NVD · NVD
- 29 Oct 2026, 20:21 UTCPicked up by Zero Radar
- 30 Oct 2026, 23:07 UTCGitHub Advisory reported on it · GitHub Advisory
- 30 Oct 2026, 23:07 UTCFixed version published: pyasn1 0.6.5 · GitHub Advisory
Sources 2 reports, oldest first
Official vendor, government CERT or advisory database
- CVE-2026-119196NVD · 29 Oct 2026, 20:17 UTC
- pyasn1 has quadratic CPU consumption in constructed BIT STRING decodingGitHub Advisory · 30 Oct 2026, 23:07 UTC
Technical details
- ID
- CVE-2026-119196 · GHSA-2qm8-x737-gmw5
- CVSS
- 7.5 / 10
- Disclosed
- 29 Oct 2026, 20:17 UTC
- On Zero Radar
- 29 Oct 2026, 20:21 UTC (4 min after disclosure)
- Last change
- 30 Oct 2026, 23:07 UTC
The plain-language parts and the attack diagram were written by an AI model (anthropic/claude-haiku-5.5) from the sources above. Facts like versions, exploitation and dates come from the sources themselves. How Zero Radar works