Inefficient Algorithmic Complexity Affecting pyasn1 package, versions [,0.6.5)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.43% (37th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-PYASN1-22113909
  • published1 Nov 2026
  • disclosed30 Oct 2026
  • creditmanus-use

Introduced: 30 Oct 2026

NewCVE-2026-119197  (opens in a new tab)
CWE-407  (opens in a new tab)

How to fix?

Upgrade pyasn1 to version 0.6.5 or higher.

Overview

Affected versions of this package are vulnerable to Inefficient Algorithmic Complexity in the RealPayloadDecoder.valueDecoder method in pyasn1/codec/ber/decoder.py. An attacker can hold a decoder on one CPU core for seconds or longer by supplying a binary-encoded ASN.1 REAL with a large mantissa, which the method accumulates one octet at a time in a shift-and-slice loop whose cost grows quadratically in the mantissa length. Exploitation requires only that a REAL value reach a BER, CER, or DER decoder, with or without an asn1Spec, and the work occurs inside decode() even when the application never uses the resulting object.

Workaround

This vulnerability can be avoided by rejecting or strictly limiting the size of attacker-controlled ASN.1 input before passing it to the decoder, with the limit set against the application's available CPU time and request volume.

CVSS Base Scores

version 4.0
version 3.1