---
id: "CVE-2026-119197"
kind: "vulnerability"
aliases: ["CVE-2026-119197"]
title: "pyasn1: crafted REAL values make Python ASN.1 decoding hang a CPU core"
severity: "high"
cvss: 7.5
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["asn1", "package", "pyasn1", "python"]
not_affected_if: ["no-untrusted-asn1-input", "pyasn1-not-installed"]
published_at: "2026-10-29T20:17:30+00:00"
first_seen_at: "2026-10-29T20:26:50+00:00"
updated_at: "2026-10-29T20:28:01+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-119197", "first_seen_at": "2026-10-29T20:26:50+00:00"}]
---

# pyasn1: crafted REAL values make Python ASN.1 decoding hang a CPU core

pyasn1, a Python ASN.1 library, decodes binary REAL values with quadratic time in mantissa length. A crafted encoded value sent to a BER, CER or DER decoder can hold a worker on one CPU core for seconds or longer, causing denial of service.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- `pip show pyasn1` to read the installed version
- Search lock files and requirements for `pyasn1` to find pinned versions
- Check whether the decoder receives untrusted ASN.1 input such as certificates, SNMP or LDAP data

## Fix

- pyasn1 `0.6.5` or later

## Timeline

- 2026-10-29T20:26:50+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-119197

## From the sources

pyasn1 is a generic ASN.1 library for Python. Prior to 0.6.5, binary REAL decoding builds a large mantissa one octet at a time by shifting a growing integer and slicing the remaining byte string. Attacker-controlled ASN.1 includes a binary-encoded REAL with a large mantissa and reaches BER, CER, or DER decode(), with or without a schema containing REAL. RealPayloadDecoder.valueDecoder repeatedly performs a left shift, OR, and suffix copy for every mantissa octet, making decode time quadratic in mantissa length. A comparatively small REAL value can hold a decoding worker on one CPU core for seconds or longer and cause availability loss. This issue is fixed in version 0.6.5.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
