CVE-2026-128237 in Scapyinfo

Summary

by MITRE • 11/13/2026

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+.

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 11/13/2026

The vulnerability identified in Scapy versions prior to 2.8.0 represents a significant denial of service risk stemming from inefficient parsing logic within the Basic Encoding Rules (BER) implementation, specifically affecting the BER_num_dec and BERcodec_OID.do_dec functions. These components are responsible for decoding ASN.1 structures, which are widely used in network protocols such as SNMP, LDAP, and X.509 certificates to encode data objects. The core technical flaw lies in how these functions handle oversized Object Identifier arcs that contain an excessive number of base-128 continuation bytes. When a remote attacker supplies malformed or specially crafted ASN.1/BER data featuring many continuation bytes, the parsing algorithm enters a state of quadratic CPU consumption relative to the input size. This inefficiency means that as the length of the malicious payload increases, the processing time grows exponentially rather than linearly, allowing an attacker with relatively modest resources to consume disproportionate amounts of computational power on the target system.

In addition to resource exhaustion through high CPU utilization, this vulnerability can trigger uncaught exceptions in specific Python environments. On systems running Python 3.11 and later versions, the parsing logic fails to properly handle the overflow or invalid state resulting from these oversized arcs, leading directly to a ValueError crash. This exception causes the Scapy process or any application utilizing it as a library to terminate unexpectedly. For network monitoring tools, packet analyzers, or security appliances that rely on Scapy for deep packet inspection and protocol analysis, such crashes can lead to service interruptions, loss of visibility into network traffic, and potential instability in dependent systems. The impact is particularly severe because ASN.1 parsing often occurs early in the processing pipeline, meaning even small amounts of malicious data can disrupt operations before deeper security checks are applied.

From a classification perspective, this vulnerability aligns with CWE-400, which describes uncontrolled resource consumption leading to denial of service conditions. The specific mechanism involves inefficient algorithms that fail to bound computational complexity based on input size, allowing attackers to trigger performance degradation or system failure through carefully crafted inputs. In the context of the MITRE ATT&CK framework, this behavior corresponds to techniques associated with Resource Hijacking and Denial of Service, where adversaries aim to degrade availability by exploiting software weaknesses rather than overwhelming systems with volume alone. The exploitation vector is remote, requiring only network access to deliver the malformed ASN.1/BER packets, which makes it applicable against any service that accepts or processes such data formats without strict validation limits on field lengths.

Mitigation strategies primarily involve upgrading Scapy to version 2.8.0 or later, where these parsing functions have been patched to enforce stricter bounds and handle oversized inputs gracefully without exhausting resources or crashing the interpreter. For organizations unable to immediately update their dependencies, implementing input filtering at the network perimeter is recommended. This includes configuring firewalls or intrusion prevention systems to inspect ASN.1 structures for excessive continuation bytes in OID arcs and dropping packets that exceed predefined size thresholds before they reach vulnerable applications. Additionally, developers integrating Scapy into custom tools should implement wrapper functions that validate packet lengths and structure complexity prior to invoking the decoding routines, thereby adding a layer of defense-in-depth against malformed input attacks.

Responsible

VulnCheck

Reservation

11/13/2026

Disclosure

11/13/2026

Moderation

accepted

CPE

ready

EPSS

0.00371

KEV

no

Activities

very low

Sources

Do you want to use VulDB in your project?

Use the official API to access entries easily!