On this page (7 sections)
Ubuntu has published USN-9011-1, a security notice about pyasn1, a widely used Python library for parsing ASN.1 data. The notice describes denial-of-service weaknesses in which specially crafted BER, CER or DER input makes an application consume excessive CPU. Two of the issues are tracked as CVE-2026-59884 and CVE-2026-59885; the notice also describes a third issue involving REAL values.
If you run Python services that decode untrusted ASN.1 data (certificates, LDAP, SNMP, Kerberos and similar), or you manage older Ubuntu LTS servers, this is worth a quick check. The upstream project fixed all three issues in pyasn1 0.6.4, and the remedy is a package update.
What happened
The pyasn1 maintainers released version 0.6.4 as a security release on July 9, 2026. It fixes three resource-exhaustion problems. Ubuntu's notice, dated November 9, 2026 in our source data, describes these issues and says which Ubuntu releases were affected.
According to the upstream release notes, the three issues are: quadratic time in the OBJECT IDENTIFIER and RELATIVE-OID decoders (CVE-2026-59885), unbounded BER long-form tag IDs (CVE-2026-59884), and excessive memory and CPU use in the REAL-to-float conversion (listed upstream as CVE-2026-59886).
Technical details in plain terms
The two CVEs described here belong to the same family: uncontrolled resource consumption (CWE-400). The parser does more work, or builds bigger numbers, than the input size would suggest, so a small message can keep a CPU busy for a long time. The advisories rate confidentiality and integrity impact as none; the impact is availability.
CVE-2026-59884: unbounded tag IDs
ASN.1 tags can be written in a long form that spans many bytes. The GitHub advisory explains that the decoder kept accumulating those bytes with no upper limit, so an attacker could force it to build an enormous integer. CPU cost grew quadratically: a roughly 1 MB input consumed over a minute of CPU. On Python 3.11 and later, the oversized value could also raise an unhandled ValueError while formatting an error message, which can slip past code that only catches the library's PyAsn1Error.
The fix caps long-form tag IDs at 20 octets (140 bits) and rejects anything larger with PyAsn1Error. The encoders and the native codec are not affected by this one.
CVE-2026-59885: OBJECT IDENTIFIER arcs
Per the advisory, the decoders handled OBJECT IDENTIFIER and RELATIVE-OID values in quadratic time relative to the number of arcs. A payload of tens of kilobytes could cost seconds of CPU per decode() call. The encoders show the same behavior when an application re-encodes attacker-supplied values it previously decoded. An earlier limit on the size of individual arcs does not help, because it bounds arc length, not arc count. Version 0.6.4 makes arc handling linear.
Who is realistically exposed
The risk depends on whether untrusted data reaches the decoder. A library in a virtualenv that only parses your own files is a low concern. A network-facing service that parses ASN.1 from outside is the real target.
- Services that accept certificates, LDAP messages, SNMP data or Kerberos tokens from clients or the internet and parse them with Python.
- Applications that use pyasn1 indirectly through other packages, so you may be exposed without ever importing it yourself.
- Older Ubuntu LTS servers (14.04, 16.04, 18.04, 20.04) that Ubuntu lists as affected by the first two issues.
- Background workers and APIs where a single stuck request can starve other traffic, since the attack burns CPU rather than crashing the process.
How to check your exposure
Start by finding which pyasn1 version each environment uses. This command prints the installed version in the active Python environment; anything below 0.6.4 is affected.
pip show pyasn1On Debian and Ubuntu hosts, the system library ships as a distribution package. This lists it with its installed version, which you can compare against the version given in the Ubuntu notice.
apt list --installed 2>/dev/null | grep pyasn1Remember that distributions often backport fixes into their own version numbers, so a system package can be patched even if its version string does not read 0.6.4. Use the version listed in USN-9011-1 for system packages, and 0.6.4 for pip installs.
What to do now
- Read USN-9011-1 to confirm whether your Ubuntu release is listed and which package version fixes it.
- Inventory every host, container image and virtualenv that includes pyasn1, directly or as a dependency.
- On Ubuntu servers, apply the pyasn1 update from the notice using the package manager.
- For pip-managed environments and container images, upgrade to pyasn1 0.6.4 or later and rebuild images.
- Restart long-running Python services so they load the patched library.
- Where you cannot patch yet, limit the size of untrusted input before passing it to decode(), as the maintainers recommend.
- Set request size limits and timeouts at your reverse proxy or load balancer for endpoints that carry ASN.1 data.
- Re-run your dependency audit afterwards to confirm no old copy remains.
This updates only the pyasn1 package on Debian or Ubuntu without upgrading unrelated packages. If no newer version is offered for your release, check the notice for the status of your release.
sudo apt-get update
sudo apt-get install --only-upgrade python3-pyasn1For a pip-managed environment, this upgrades the library to the fixed release. Run it inside the right virtualenv, then confirm with pip show pyasn1.
pip install --upgrade "pyasn1>=0.6.4"Detection and monitoring
Because the attack burns CPU, the symptoms look like a performance problem rather than an intrusion. Watch for Python worker processes pinned at high CPU after handling a request, request timeouts on endpoints that parse certificates or directory data, and unexpected ValueError exceptions mentioning integer string conversion on Python 3.11 and later. Review your application logs for unusually large request bodies to those endpoints.
Uptime and response-time monitoring helps you notice a service being starved even when no alert fires from the application itself. Webforta Monitor tracks uptime, certificates, DNS and header changes, and our uptime monitoring guide explains how to set sensible thresholds. A firewall or rate limiting in front of the service can also reduce how often oversized requests reach your code; see what a WAF does for the basics. None of this replaces updating the library.
Timeline
| Date | Event |
|---|---|
| July 9, 2026 | pyasn1 0.6.4 released; GitHub advisories published |
| July 14, 2026 | CVE-2026-59884 and CVE-2026-59885 published by NVD |
| July 21, 2026 | Advisories reviewed and added to the GitHub Advisory Database |
| November 9, 2026 | Ubuntu publishes USN-9011-1 (date as given in the source metadata) |
For more security news, including other recent Ubuntu notices, browse the Webforta security blog.
Sources
This article is based on the public sources below. Details can change as vendors and researchers publish more; check the original advisories before acting on version numbers.
