VAITP Dataset

← Back to the dataset

CVE-2026-128237

CPU‑exhaustion DoS via oversized OID arcs in Scapy < 2.8.0 (BER decoding).

  • CVSS 6.9
  • CWE-407
  • Resource Management
  • Remote

Scapy before 2.8.0 contains a denial of service vulnerability in BER_num_dec() and BERcodec_OID.do_dec() that allows remote attackers to exhaust CPU by supplying oversized OID arcs. Attackers can send ASN.1/BER data with many base-128 continuation bytes to cause quadratic CPU consumption or an uncaught ValueError crash on Python 3.11+.

CVSS base score
6.9
Published
2026-11-13
OWASP
A06 Vulnerable and Outdated Components
Orthogonal defect classification
Timing/Serialization
Code defect classification
Timing Issues
Category
Resource Management
Subcategory
Resource Exhaustion
Accessibility scope
Remote
Impact
Denial of Service (DoS)
Affected component
Scapy
Fixed by upgrading
Yes

Solution

Upgrade Scapy to version 2.8.0 or later.

Vulnerable code sample

from scapy.asn1.ber import BERcodec_OID

def parse_oid(encoded):
    # VULNERABLE: unbounded OID arc decoding leads to quadratic CPU consumption
    decoder = BERcodec_OID()
    return decoder.do_dec(encoded)

Patched code sample

from scapy.asn1.ber import BERcodec_OID

def parse_oid(encoded):
    # FIX: limit total continuation bytes to prevent quadratic parsing cost
    max_continuation_bytes = 10  # arbitrary safe bound
    cont_bytes = 0
    for b in encoded:
        if b & 0x80:
            cont_bytes += 1
            if cont_bytes > max_continuation_bytes:
                raise ValueError("OID arcs too large")
    decoder = BERcodec_OID()
    return decoder.do_dec(encoded)

Cite this entry

@misc{vaitp:cve2026128237,
  title        = {{CPU‑exhaustion DoS via oversized OID arcs in Scapy < 2.8.0 (BER decoding).}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-128237},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-128237/}}
}

Download this entry as JSON Download the whole dataset

Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::

Before you use the VAITP AI models

Please read and accept the following disclaimer:

By choosing "I understand and accept", you acknowledge that you understand and agree to these terms.