CVE-2026-59885: pyasn1: Quadratic complexity in OBJECT IDENTIFIER and RELATIVE-OID processing allows denial of service

Published Jul 14, 2026
·
Updated

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.

Other sources

pyasn1 is a generic ASN.1 library for Python. Prior to 0.6.4, the BER, CER, and DER decoders process OBJECT IDENTIFIER and RELATIVE-OID values in quadratic time relative to the number of arcs, so a small crafted payload containing an OID with many arcs consumes excessive CPU per decode() call and can deny service to applications that decode untrusted ASN.1 data. The corresponding encoders have the same quadratic behavior when an application re-encodes previously decoded attacker-supplied values. This issue is fixed in version 0.6.4.

MITRE

pyasn1: Quadratic complexity in OBJECT IDENTIFIER and RELATIVE-OID processing allows denial of service

Microsoft

Affected Software

4 affected componentsFixes available
pypi/pyasn1<0.6.4
pyasn1 Pyasn1 Python<0.6.4
pip/pyasn1<=0.6.3
0.6.4
Microsoft azl3 python-pyasn1 0.4.8-2<0.4.8-3
0.4.8-3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/pyasn1 to a version that resolves this vulnerability.

    Fixed in 0.6.4
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 0.4.8-3
  3. Upgrade

    Upgrade pyasn1 to a version that resolves this vulnerability.

    Fixed in 0.6.4
  4. Compensating control

    Limit the size of untrusted ASN.1 input before calling decode() to prevent CPU exhaustion from crafted OBJECT IDENTIFIER / RELATIVE-OID payloads (pyasn1/codec/ber/decoder.py: ObjectIdentifierPayloadDecoder and RelativeOIDPayloadDecoder).

  5. Compensating control

    Limit the size of untrusted ASN.1 input before re-encoding attacker-supplied values using OBJECT IDENTIFIER / RELATIVE-OID encoders to avoid quadratic-time behavior (pyasn1/codec/ber/encoder.py: ObjectIdentifierEncoder and RelativeOIDEncoder).

Event History

Jul 14, 2026
CVE Published
via MITRE·04:40 PM
Data Sourced
via MITRE·04:40 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:17 PM
RemedyDescriptionSeverityWeaknessAffected Software
Jul 17, 2026
Data Sourced
via Microsoft·08:02 AM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·08:02 AM
DescriptionSeverity
Jul 21, 2026
Advisory Published
via GitHub·07:11 PM
Data Sourced
via GitHub·07:11 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-59885?

The severity of CVE-2026-59885 is classified as high with a score of 7.5.

2

What does CVE-2026-59885 affect?

CVE-2026-59885 affects the pyasn1 library for Python, specifically its handling of OBJECT IDENTIFIER and RELATIVE-OID processing.

3

How do I fix CVE-2026-59885?

To fix CVE-2026-59885, upgrade the pyasn1 library to version 0.6.4 or later.

4

What type of vulnerability is CVE-2026-59885?

CVE-2026-59885 is a denial of service vulnerability caused by quadratic complexity in OBJECT IDENTIFIER and RELATIVE-OID processing.

5

What attacks can be performed using CVE-2026-59885?

An attacker can exploit CVE-2026-59885 to create crafted payloads that excessively consume CPU resources, leading to potential denial of service.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203