Résumé
pyasn1: Quadratic complexity in OBJECT IDENTIFIER and RELATIVE-OID processing allows denial of service
Détails de l’avis
Impact
The BER/CER/DER decoders process OBJECT IDENTIFIER and RELATIVE-OID values in quadratic time relative to the number of arcs. A small crafted payload (tens of kilobytes) containing an OID with many arcs consumes seconds of CPU per decode() call, allowing denial of service in any application that decodes untrusted ASN.1 data (certificates, LDAP, SNMP, Kerberos, etc.). The corresponding encoders have the same quadratic behavior, reachable when an application re-encodes previously decoded attacker-supplied values.
The arc-size limit introduced for CVE-2026-23490 bounds the byte length of an individual arc but not the number of arcs, so it does not mitigate this issue.
Affected components
ObjectIdentifierPayloadDecoder and RelativeOIDPayloadDecoder in pyasn1/codec/ber/decoder.py; ObjectIdentifierEncoder and RelativeOIDEncoder in pyasn1/codec/ber/encoder.py. The CER and DER codecs inherit these and are equally affected.
Patches
Fixed in pyasn1 0.6.4: arc accumulation in both decoders and encoders now runs in linear time.
Workarounds
Limit the size of untrusted ASN.1 input before decoding.
Références
- https://github.com/advisories/GHSA-8ppf-4f7h-5ppj
- https://github.com/pyasn1/pyasn1/security/advisories/GHSA-8ppf-4f7h-5ppj
- https://nvd.nist.gov/vuln/detail/CVE-2026-59885
- https://github.com/pyasn1/pyasn1/commit/45bdb19eb7df4b3780fe9c912c63e99bffc39dd9
- https://github.com/pyasn1/pyasn1/releases/tag/v0.6.4
Vulnérabilités liées
Tout Supply chain →- MEDIUMCVE-2026-81723
NLTK: Quadratic CPU Exhaustion in `XMLCorpusView._read_xml_fragment()`
- MEDIUMCVE-2026-45822
decode-uri-component: Denial of service via exponential decoding of malformed percent-encoded input
- HIGHCVE-2026-55099
icalendar has Algorithmic Complexity in Equality
- HIGHCVE-2026-71491
sqlparse: Quadratic O(n²) DoS in group_comments
- HIGHGHSA-gm3r-q2wp-hw87
Shescape: Quadratic-time denial of service in the flag-protection
- HIGHCVE-2026-55685
React Router: Unauthenticated Denial of Service via Inefficient Route Matching