CVE-2026-59885: pyasn1 Denial of Service Vulnerability
HIGHCVE-2026-59885 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting pyasn1 libraries in the PyPI ecosystem. The issue involves quadratic complexity in object identifier and relative-oid processing allows denial of service. Remediation is available by upgrading affected packages to version 0.6.4.
CVE-2026-59885 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2026-59885
To remediate this vulnerability, upgrade all affected pyasn1 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install pyasn1>=0.6.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show pyasn1
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-59885, inspect your installed packages using pip:
pip show pyasn1
Analyze the terminal output to locate any version of pyasn1 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.6.4), your application is affected.
Note: The pip show pyasn1 command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In pyasn1, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-59885 Affected pyasn1 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pyasn1
|
PyPI |
< 0.6.4
|
0.6.4
|
References
Frequently Asked Questions
What is CVE-2026-59885?
Which pyasn1 versions are affected?
What version fixes CVE-2026-59885?
Is pyasn1 affected?
What is the CVSS score of CVE-2026-59885?
What CWE is associated with CVE-2026-59885?
How can I check PyPI dependencies for CVE-2026-59885?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8ppf-4f7h-5ppj",
"modified" : "2026-07-21T19:11:03Z",
"published" : "2026-07-21T19:11:03Z",
"aliases" : [ "CVE-2026-59885" ],
"summary" : "pyasn1: Quadratic complexity in OBJECT IDENTIFIER and RELATIVE-OID processing allows denial of service",
"details" : "### Impact\nThe 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.\n\nThe 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.\n\n### Affected components\nObjectIdentifierPayloadDecoder 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.\n\n### Patches\nFixed in pyasn1 0.6.4: arc accumulation in both decoders and encoders now runs in linear time.\n\n### Workarounds\nLimit the size of untrusted ASN.1 input before decoding.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "pyasn1"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.6.4"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.6.3"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/pyasn1/pyasn1/security/advisories/GHSA-8ppf-4f7h-5ppj"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-59885"
}, {
"type" : "WEB",
"url" : "https://github.com/pyasn1/pyasn1/commit/45bdb19eb7df4b3780fe9c912c63e99bffc39dd9"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pyasn1/pyasn1"
}, {
"type" : "WEB",
"url" : "https://github.com/pyasn1/pyasn1/releases/tag/v0.6.4"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400", "CWE-407" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-21T19:11:03Z",
"nvd_published_at" : "2026-07-14T17:17:14Z"
}
}