Vulnerabilities

Vulnerability · CVE-2026-119196

pyasn1 has quadratic CPU consumption in constructed BIT STRING decoding

Published Oct 30, 2026 · catalog updated Oct 30, 2026 · pyasn1 has quadratic CPU

Last checked Nov 6, 2026. A connected source was read within the last 7 days.

Check if you run it

No confirmed exploitation is on record for CVE-2026-119196. EPSS is 0.43%. Act only if a listed version of pyasn1 has quadratic CPU is installed.

Gaps on this record

  • The stored product name is a package slug. The name on this page is taken from the title (pyasn1 has quadratic CPU).
  • No vendor fix or required action is stored. Compare the linked advisory before you change production.
Severity
High7.5
Known exploitation
Not in CISA/VulnCheck KEV
EPSS
0.43%
Remediation
Version ranges on file
Affected products
PyPI pyasn1 · pip pyasn1 · pypi pyasn1

## Summary In pyasn1 through 0.6.4, decoding a constructed BIT STRING with many fragments repeatedly shifts and copies the entire value accumulated so far. For fixed-size fragments, CPU time grows quadratically with the encoded input size. An application that passes sufficiently large, attacker-controlled ASN.1 data to an affected decoder can suffer CPU exhaustion during ; no conversion or formatting of the decoded value is required. The BER and CER decoders reach this path for constructed BIT STRING values, with or without an . The DER decoder rejects constructed BIT STRING in schema-less decoding, but its schema-driven path accepts a **definite-length** constructed BIT STRING when given a matching and reaches the same vulnerable code. Constructed BIT STRING is not valid DER; this DER exposure is due to decoder permissiveness. DER rejects the indefinite-length form. This is a separate decoder path from the OBJECT IDENTIFIER accumulation fixed in [CVE-2026-59885](https://github.com/advisories/GHSA-8ppf-4f7h-5ppj). ## Technical details In the 0.6.4 [ ](https://github.com/pyasn1/pyasn1/blob/v0.6.4/pyasn1/codec/ber/decoder.py#L173-L301), both the [definite-length](https://github.com/pyasn1/pyasn1/blob/v0.6.4/pyasn1/codec/ber/decoder.py#L237-L255) and [indefinite-length](https://github.com/pyasn1/pyasn1/blob/v0.6.4/pyasn1/codec/ber/decoder.py#L275-L301) fragment loops call for every fragment. [ ](https://github.com/pyasn1/pyasn1/blob/v0.6.4/pyasn1/type/univ.py#L614-L627) shifts the growing left by the fragment's bit length and ORs in the fragment. Shifting an ever-larger Python integer for each fixed-size fragment makes total work O(n²) for n fragments. The fragments are siblings, so the decoder's nesting-depth limit does not constrain their count; its limit on the number of length octets does not prevent the demonstrated inputs. In 0.6.4, DER's [tag-driven map](https://github.com/pyasn1/pyasn1/blob/v0.6.4/pyasn1/codec/der/decoder.py#L15-L40) disables constructed BIT ST

Are you affected?

Enter the version you run. The result uses only the ranges stored on this record.

The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.

  • PyPI pyasn10 → 0.6.5
  • pip pyasn1<= 0.6.4
  • pypi pyasn1version unspecified

How to fix CVE-2026-119196

What to do

Three questions, each answered from this record only. Confirm the vendor advisory before you patch.

Should you patch?

No confirmed exploitation is on record for CVE-2026-119196. EPSS is 0.43%. Act only if a listed version of pyasn1 has quadratic CPU is installed.

Which versions are affected?

Compare what you have installed with 0 → 0.6.5, <= 0.6.4. Compare the installed version with the linked vendor advisory before you change production.

What should an analyst verify?

CWE-407. EPSS 0.43%. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.

Code

The project this record applies to. Exploit listings stay in References.

Timeline

Detection, updates, and resolution for this record.

  1. Oct 30, 2026 · GitHub Advisory Database

    Detected

    ## Summary In pyasn1 through 0.6.4, decoding a constructed BIT STRING with many fragments repeatedly shifts and copies the entire value accumulated so far. For fixed-size fragments, CPU time grows quadratically with the encoded input size. An application that passes sufficiently large, attacker-controlled ASN.1 data to an affected decoder can suffer CPU exhaustion during ; no conversion or formatt

  2. Oct 30, 2026 · GitHub Advisory Database

    Updated

    ## Summary In pyasn1 through 0.6.4, decoding a constructed BIT STRING with many fragments repeatedly shifts and copies the entire value accumulated so far. For fixed-size fragments, CPU time grows quadratically with the encoded input size. An application that passes sufficiently large, attacker-controlled ASN.1 data to an affected decoder can suffer CPU exhaustion during ; no conversion or formatt

  3. Oct 30, 2026 · PyPA Advisory Database

    Fix available

    pyasn1 fixed in 0.6.5

  4. Oct 30, 2026 · PyPA Advisory Database

    Fix available

    pyasn1 fixed in 0.6.5

  5. Oct 30, 2026 · PyPA Advisory Database

    Updated

    ## Summary In pyasn1 through 0.6.4, decoding a constructed BIT STRING with many fragments repeatedly shifts and copies the entire value accumulated so far. For fixed-size fragments, CPU time grows quadratically with the encoded input size. An application that passes sufficiently large, attacker-controlled ASN.1 data to an affected decoder can suffer CPU exhaustion during ; no conversion or formatt

Sources

  • CVE.orgVulnerability recordCVE-2026-119196

    Official CVE identifier

    cve.org
  • GitHub Advisory DatabasePackage advisoryGHSA-2qm8-x737-gmw5

    pyasn1 has quadratic CPU consumption in constructed BIT STRING decoding

    github.com
  • GitLab Advisory DatabasePackage advisoryCVE-2026-119196

    In pyasn1 through 0.6.4, decoding a constructed BIT STRING with many fragments repeatedly shifts and copies the entire value accumulated so far. For fixed-size fragments, CPU time grows quadratically with the encoded input size. An application that passes sufficiently large, attacker-controlled ASN.1 data to an affected decoder can suffer CPU exhaustion during decode(); no conversion or formatting

    advisories.gitlab.com
  • PyPA Advisory DatabasePackage advisoryGHSA-2qm8-x737-gmw5

    pyasn1 has quadratic CPU consumption in constructed BIT STRING decoding

    osv.dev

References

Freshness

Last verified in this catalog Nov 6, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.

  • GitHub Advisory DatabaseNov 6, 2026
  • GitLab Advisory DatabaseNov 3, 2026
  • PyPA Advisory DatabaseNov 2, 2026
  • CVE.orgOct 31, 2026