---
id: "CVE-2026-119195"
kind: "vulnerability"
aliases: ["CVE-2026-119195"]
title: "pyasn1: fragmented ASN.1 input makes decoding quadratic, exhausting CPU"
severity: "high"
cvss: 7.5
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["package", "pyasn1", "python"]
not_affected_if: ["default-config", "trusted-input-only"]
published_at: "2026-10-29T20:17:30+00:00"
first_seen_at: "2026-10-29T20:26:50+00:00"
updated_at: "2026-10-29T20:28:01+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-119195", "first_seen_at": "2026-10-29T20:26:50+00:00"}]
---

# pyasn1: fragmented ASN.1 input makes decoding quadratic, exhausting CPU

pyasn1, a Python ASN.1 library, repeatedly copies growing buffers when decoding constructed strings and indefinite-length ANY values. Attacker-supplied BER or CER data with many fragments can tie up decoding workers and exhaust CPU, with no confidentiality or integrity impact.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed version with `pip show pyasn1` or `python -c "import pyasn1; print(pyasn1.__version__)"`.
- Look for services that decode untrusted BER or CER input with pyasn1 and set `asn1Spec` to `univ.Any` or `univ.OctetString`.

## Fix

- pyasn1: `0.6.5`

## Timeline

- 2026-10-29T20:26:50+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-119195

## From the sources

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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
