Vulnerabilities

Security research · CVE-2026-119197

pyasn1 has quadratic-complexity denial of service in binary REAL decoding

Published Oct 30, 2026 · catalog updated Oct 30, 2026 · pyasn1 has quadratic-complexity denial

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-119197. EPSS is 0.43%. Act only if a listed version of pyasn1 has quadratic-complexity denial 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-complexity denial).
  • 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 0.6.4 and earlier, decoding a binary-encoded ASN.1 REAL with a large mantissa can consume CPU time quadratic in the mantissa length. The BER, CER, and DER decoders all use the affected . An application is exposed when it passes attacker-controlled ASN.1 containing a REAL value to one of these decoders, either without an or with a schema that includes REAL. The work occurs inside ; the application does not need to convert, print, or otherwise use the resulting REAL object. This is distinct from [CVE-2026-59886](https://github.com/advisories/GHSA-hm4w-wwcw-mr6r), which concerns converting an already-decoded REAL to a Python float. That issue was fixed in 0.6.4 and its advisory states that decoding alone does not trigger it. ## Root cause and affected components For binary REAL values, [ in v0.6.4](https://github.com/pyasn1/pyasn1/blob/v0.6.4/pyasn1/codec/ber/decoder.py#L535-L603) builds the mantissa one octet at a time: Each shift processes an integer that grows with the mantissa; with byte strings, each slice also copies the remaining suffix. Repeating both operations for every octet makes decoding quadratic in mantissa size. The decoder's [eight-octet length-field limit](https://github.com/pyasn1/pyasn1/blob/v0.6.4/pyasn1/codec/ber/decoder.py#L1704-L1717) does not impose a practical mantissa-size limit for the inputs demonstrated below. [CER](https://github.com/pyasn1/pyasn1/blob/v0.6.4/pyasn1/codec/cer/decoder.py#L51-L62) and [DER](https://github.com/pyasn1/pyasn1/blob/v0.6.4/pyasn1/codec/der/decoder.py#L23-L31) reuse the BER REAL payload decoder, so all three paths reach this loop. The vulnerable loop is present in every available repository release tag inspected, from v0.2.1 through v0.6.4. Runtime measurements below were made on v0.6.4; older releases were checked for the loop, not benchmarked individually. ## Impact A comparatively small REAL value can hold a decoder worker on one CPU core for seconds or longer. The attacker must be able to

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-119197

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-119197. EPSS is 0.43%. Act only if a listed version of pyasn1 has quadratic-complexity denial 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 0.6.4 and earlier, decoding a binary-encoded ASN.1 REAL with a large mantissa can consume CPU time quadratic in the mantissa length. The BER, CER, and DER decoders all use the affected . An application is exposed when it passes attacker-controlled ASN.1 containing a REAL value to one of these decoders, either without an or with a schema that includes REAL. The work occurs insi

  2. Oct 30, 2026 · GitHub Advisory Database

    Updated

    ## Summary In pyasn1 0.6.4 and earlier, decoding a binary-encoded ASN.1 REAL with a large mantissa can consume CPU time quadratic in the mantissa length. The BER, CER, and DER decoders all use the affected . An application is exposed when it passes attacker-controlled ASN.1 containing a REAL value to one of these decoders, either without an or with a schema that includes REAL. The work occurs insi

  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 0.6.4 and earlier, decoding a binary-encoded ASN.1 REAL with a large mantissa can consume CPU time quadratic in the mantissa length. The BER, CER, and DER decoders all use the affected . An application is exposed when it passes attacker-controlled ASN.1 containing a REAL value to one of these decoders, either without an or with a schema that includes REAL. The work occurs insi

Sources

  • CVE.orgVulnerability recordCVE-2026-119197

    Official CVE identifier

    cve.org
  • GitHub Advisory DatabasePackage advisoryGHSA-mm57-4v3p-rchx

    pyasn1 has quadratic-complexity denial of service in binary REAL decoding

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

    In pyasn1 0.6.4 and earlier, decoding a binary-encoded ASN.1 REAL with a large mantissa can consume CPU time quadratic in the mantissa length. The BER, CER, and DER decoders all use the affected RealPayloadDecoder. An application is exposed when it passes attacker-controlled ASN.1 containing a REAL value to one of these decoders, either without an asn1Spec or with a schema that includes REAL. The

    advisories.gitlab.com
  • PyPA Advisory DatabasePackage advisoryGHSA-mm57-4v3p-rchx

    pyasn1 has quadratic-complexity denial of service in binary REAL 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