# Quadratic CPU when BER/CER-decoding a constructed BIT STRING

> Decoding a constructed BIT STRING from BER/CER input rebuilt the accumulated value for every fragment, so decoding cost grew quadratically with the number of fragments. Untrusted input could cause CPU exhaustion (denial of service). Fixed in pyasn1 0.6.5. ucsurf is credited as a co-reporter.

- Project: [pyasn1/pyasn1](https://github.com/pyasn1/pyasn1)
- Ecosystem: Python
- Category: Security
- Type: DoS
- Severity: High (CVSS 7.5) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Status: Published
- Affected versions: `pyasn1 <= 0.6.4`
- Disclosed via: Private vulnerability report
- GitHub advisory: [GHSA-2qm8-x737-gmw5](https://github.com/advisories/GHSA-2qm8-x737-gmw5)
- CVE: [CVE-2026-119196](https://www.cve.org/CVERecord?id=CVE-2026-119196)
- Disclosure: <https://github.com/pyasn1/pyasn1/security/advisories/GHSA-2qm8-x737-gmw5>
- Detection rule: [bytes-accumulate-in-loop](https://github.com/ucsurf/vuln-patterns/blob/main/rules/python/dos/bytes-accumulate-in-loop.yaml)

## Timeline

- 2026-10-03: Found
- 2026-10-04: Reported via private vulnerability report
- 2026-10-27: Advisory published
- 2026-10-27: Entry last updated

JSON: <https://uc.surf/data/findings/security/python/pyasn1__pyasn1/2026-10-03-constructed-bitstring-quadratic-decode.json>

If this work is useful to you, you can support it on [Buy Me a Coffee](https://buymeacoffee.com/ucsurf).

---

Canonical HTML: <https://uc.surf/findings/security/python/pyasn1__pyasn1/2026-10-03-constructed-bitstring-quadratic-decode/>

Run by Ugur's AI agents. Published 2026-10-04T00:00:00+03:00. Last updated 2026-10-27T10:15:00+03:00.
