# CVE-2026-59884: pyasn1 denial of service via unbounded long-form tag IDs in BER decoder

Source: https://junglewise.ai/threats/cve-2026-59884-pyasn1-denial-of-service-via-unbounded-long-form-tag-ids-in-ber  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-14. Updated: 2026-07-21  
License: CC BY 4.0 with a link back

CVE-2026-59884 · Severity: high · CVSS 7.5 · Published 2026-07-14

A vulnerability in the pyasn1 library, which is used to handle encoded data in many Python applications, can allow an attacker to crash or slow down a service. By sending a specially crafted data packet, an attacker can force the system to consume excessive processor power or trigger an unhandled error. This can lead to a denial-of-service, making the affected application unavailable to legitimate users.

Technologies: [Pyasn1](https://junglewise.ai/threats/technologies/pyasn1), [pyasn1 (PyPI)](https://junglewise.ai/threats/technologies/pypi-pyasn1). Vendors: [Pyasn1](https://junglewise.ai/threats/vendors/pyasn1), [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-59884 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-59884 being exploited in the wild.

**How severe is CVE-2026-59884?** High severity, with a CVSS score of 7.5, published 14 July 2026.

**Which products and versions are affected?** Pyasn1 < 0.6.4, <= 0.6.3; pyasn1 (PyPI) ECOSYSTEM:introduced=0,fixed=0.6.4; pyssn1 (PyPI) <= 0.6.3.

**Is there a fix for CVE-2026-59884?** Yes. pyasn1 (PyPI): upgrade to 0.6.4 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-59884 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-59884?** Check whether you run Pyasn1, pyasn1 (PyPI) or pyssn1 (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- pyasn1 (PyPI): upgrade to 0.6.4 or later

  ```sh
  pip install "pyasn1>=0.6.4"
  ```


## Technical details

The pyasn1 BER decoder (and by extension CER/DER) fails to bound the size of long-form tag IDs during parsing. An attacker can provide a crafted input with an extremely long tag ID, causing the decoder to accumulate continuation octets in a loop. This results in quadratic CPU consumption relative to the input size. Additionally, on Python 3.11+, the oversized tag ID can trigger an unhandled ValueError due to integer-to-string conversion limits during error message formatting, potentially bypassing application-level exception handling. The issue is fixed in version 0.6.4 by limiting tag IDs to 20 octets.

## Affected products

- pyasn1 pyasn1 <= 0.6.3

## Identifiers

- CVE-2026-59884
- GHSA-m4p7-r5rc-7g4j
- PYSEC-2026-3455

## Timeline

- 2026-07-09: disclosed: Vulnerability reported and patched in repository
- 2026-07-14: advisory: NVD publication date
- 2026-07-21: advisory: GitHub Advisory published

## References

- [https://api.github.com/users/mikeappsec](https://api.github.com/users/mikeappsec)
- [https://github.com/mikeappsec](https://github.com/mikeappsec)
- [https://api.github.com/users/mikeappsec/gists%7B/gist_id%7D](https://api.github.com/users/mikeappsec/gists%7B/gist_id%7D)
- [https://api.github.com/users/mikeappsec/repos](https://api.github.com/users/mikeappsec/repos)
- [https://avatars.githubusercontent.com/u/218010015?v=4](https://avatars.githubusercontent.com/u/218010015?v=4)
- [https://api.github.com/users/mikeappsec/events%7B/privacy%7D](https://api.github.com/users/mikeappsec/events%7B/privacy%7D)

## Related threats

- [pyasn1 quadratic binary REAL mantissa decoding DoS](https://junglewise.ai/threats/cve-2026-119197-pyasn1-is-a-generic-asn-1-library-for-python-prior-to-0-6-5)
- [pyasn1 quadratic CPU exhaustion in BIT STRING decoding](https://junglewise.ai/threats/cve-2026-119196-pyasn1-is-a-generic-asn-1-library-for-python-prior-to-0-6-5)
- [pyasn1 quadratic algorithm denial of service in ASN.1 decoding](https://junglewise.ai/threats/cve-2026-119195-pyasn1-is-a-generic-asn-1-library-for-python-prior-to-0-6-5)
- [pyasn1 quadratic CPU use in schemaless container decoding](https://junglewise.ai/threats/cve-2026-119194-pyasn1-is-a-generic-asn-1-library-for-python-from-0-3-3-until-0)
- [pyasn1 resource consumption in univ.Real float conversion](https://junglewise.ai/threats/cve-2026-59886-pyasn1-resource-consumption-in-univ-real-float-conversion)
