CVE-2026-59884: Pyasn1 Denial of Service Vulnerability
HIGHCVE-2026-59884 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 pyasn1 ber/cer/der decoder denial of service via unbounded long-form tag ids. Remediation is available by upgrading affected packages to version 0.6.4.
CVE-2026-59884 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-59884
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-59884, 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-59884 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-59884?
Which Pyasn1 versions are affected?
What version fixes CVE-2026-59884?
Is pyasn1 affected?
What is the CVSS score of CVE-2026-59884?
What CWE is associated with CVE-2026-59884?
How can I check PyPI dependencies for CVE-2026-59884?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-m4p7-r5rc-7g4j",
"modified" : "2026-07-31T21:55:42Z",
"published" : "2026-07-21T19:10:11Z",
"aliases" : [ "CVE-2026-59884" ],
"summary" : "pyasn1 BER/CER/DER decoder denial of service via unbounded long-form tag IDs",
"details" : "### Impact\nThe BER decoder (shared by the CER and DER codecs) parses long-form tags by accumulating continuation octets in a loop with no upper bound on the size of the tag ID. A crafted input can force the decoder to build an arbitrarily large integer, with CPU cost growing quadratically in input size — a ~1 MB input consumes over a minute of CPU. On Python 3.11+, the oversized tag ID can also trigger an unhandled `ValueError` (integer string conversion limit) while the decoder formats error messages, violating the documented `PyAsn1Error` contract and potentially bypassing caller error handling.\n\nAny application decoding untrusted BER/CER/DER input is affected.\n\n### Affected components\n- `pyasn1.codec.ber.decoder` — `decode()` and `StreamingDecoder`\n- `pyasn1.codec.cer.decoder` and `pyasn1.codec.der.decoder`, which inherit\n the same tag parsing\n- `pyasn1.type.tag` — `Tag`/`TagSet` reprs could raise `ValueError` when\n rendering oversized tag IDs (reachable through decoder error paths)\n\nThe encoders and the `pyasn1.codec.native` codec are not affected.\n\n### Patches\nFixed in 0.6.4. Long-form tag IDs are now limited to 20 octets (140-bit tag IDs, matching the existing OID arc limit); oversized tags are rejected with `PyAsn1Error`. Tag ID rendering in reprs and error messages was additionally hardened against the interpreter's integer-to-string conversion limit.\n\n### Workarounds\nBound the size of untrusted input passed to `decode()` before calling it.",
"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"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/pyasn1/pyasn1/security/advisories/GHSA-m4p7-r5rc-7g4j"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-59884"
}, {
"type" : "WEB",
"url" : "https://github.com/pyasn1/pyasn1/commit/628e36ecbb5277a3f01572ce418ef54271b165a5"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pyasn1/pyasn1"
}, {
"type" : "WEB",
"url" : "https://github.com/pyasn1/pyasn1/releases/tag/v0.6.4"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/pyasn1/PYSEC-2026-3455.yaml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-21T19:10:11Z",
"nvd_published_at" : "2026-07-14T17:17:14Z"
}
}