Skip to content
OpenAdvisories

Weakness (CWE)

CWE-130: Improper Handling of Length Parameter Inconsistency

Base Incomplete

The product parses a formatted message or structure, but it does not handle or incorrectly handles a length field that is inconsistent with the actual length of the associated data.

More detail

If an attacker can manipulate the length parameter associated with an input such that it is inconsistent with the actual length of the input, this can be leveraged to cause the target application to behave in unexpected, and possibly, malicious ways. One of the possible motives for doing so is to pass in arbitrarily large input to the application. Another possible motivation is the modification of application state by including invalid data for subsequent properties of the application. Such weaknesses commonly lead to attacks such as buffer overflows and execution of arbitrary code.

How to prevent it (3 mitigations)
  1. Implementation

    When processing structured incoming data containing a size field followed by raw data, ensure that you identify and resolve any inconsistencies between the size field and the actual size of the data.

  2. Implementation

    Do not let the user control the size of the buffer.

  3. Implementation

    Validate that the length of the user-supplied data is consistent with the buffer size.

Source: MITRE CWE-130

58 results · Clear filters · Feed

  • Medium 4.8

    tcpflow < 1.7.0 Out-of-Bounds Read via TCP Demultiplexer Payload Length

    tcpflow before 1.7.0 contains an out-of-bounds read vulnerability that allows unauthenticated attackers to read process memory by sending packets with forged IP payload lengths. Attackers can inject crafted IPv4 or IPv6 TCP packets into captured traffic or pc…

  • Medium 5.9

    MariaDB Connector/J: Length-encoded integers larger than Integer.MAX_VALUE were truncated before being used as lengths

    MariaDB Connector/J is used to connect applications developed in Java to MariaDB and MySQL databases. From 3.0.0 until 3.3.7, 3.4.5, and 3.5.10, the ReadableByteBuf.readLength() and ReadableByteBuf.readIntLengthEncodedNotNull() methods narrowed the protocol's…

  • Medium 5.9

    MariaDB Connector/J: Rogue server can make the client read past the packet through server-declared lengths

    MariaDB Connector/J is used to connect applications developed in Java to MariaDB and MySQL databases. From 3.0.0 until 3.3.7, 3.4.5, and 3.5.11, decoders for OK packet session-state blocks, column definition packets, text row data, or binary row data used ser…

  • Medium 5.9

    MariaDB Connector/J: Rogue server can drive large heap allocations from server-declared lengths in OK packets

    MariaDB Connector/J is used to connect applications developed in Java to MariaDB and MySQL databases. From 3.0.0 until 3.3.7, 3.4.5, and 3.5.11, when CLIENT_SESSION_TRACK was negotiated, the OkPacket.parse() and OkPacket.parseWithInfo() paths allocated byte a…

  • Medium 6.5

    NoSQL command injection via mismatched raw BSON length prefix written verbatim to the wire

    A data-validation flaw exists in the BSON handling and binary serialization path of the MongoDB C# Driver. When an application constructs a raw or lazy BSON document object from externally supplied binary data, the driver does not verify that the size quantit…

  • Medium 5.5

    HMS Networks PEAK-System PCAN Windows drivers Improper Handling of Length Parameter Inconsistency

    PEAK-System PCAN contains a vulnerable operation involving a variable-length receive-record copy. The driver uses a requested or queued record count without sufficiently capping the copy to the actual caller-supplied output length.

  • Medium 6.5

    F´: TlmPacketizer copies oversized telemetry past configured channel slots and emits corrupted packetized telemetry

    F´ (F Prime) is a framework that enables development and deployment of spaceflight and other embedded software applications. Prior to 4.3.0, Svc::TlmPacketizer TlmRecv_handler fixed-slot copy TlmRecv_handler copies val.getSize bytes into entry.channelSize sto…

  • Medium 4.3

    Junos OS and Junos OS Evolved: Insufficient validation of VXLAN overlay ping causes information disclosure when EVPN-VXLAN is configured

    An Improper Handling of Length Parameter Inconsistency vulnerability in L2ALM of Juniper Networks Junos OS and Junos OS Evolved allows an unauthenticated, adjacent attacker to obtain stale PFE packet memory via VXLAN overlay-ping traffic sent to a local VTEP.

  • Medium 5.4

    wicked: out-of-bounds read in the DHCPv4 option parser due to payload length taken from the IP total length

    An out-of-bounds read was found in the DHCPv4 packet capture code of wicked. ni_capture_inspect_udp_header() in src/capture.c reports the IP total length as the payload length instead of the length of the remaining UDP payload. Consequently, the DHCP option w…

  • Medium 5.5

    Unathenticated connection can hold Bolt channel open

    Neo4j's Bolt modern handshake decoder treats an overlong capability bit mask the same way it treats a truncated bit mask. When an unauthenticated client sends a selected protocol version followed by 32 continuation bytes in the capability mask, the decoder re…

  • Medium 6.5

    FreeRDP before 3.29.0 WebSocket Ping Buffer Over-disclosure

    FreeRDP before 3.29.0 contains a buffer over-disclosure vulnerability in the gateway WebSocket transport (libfreerdp/core/gateway/websocket.c). The client's Pong reply reuses a fixed 1024-byte response stream whose length is not sealed to the actual received …

  • Medium 5.5

    buffer overruns in libfsimage iso9660 handling

    [This CNA information record relates to multiple CVEs; the text explains which aspects/vulnerabilities correspond to which CVE.] The directory and Rock Ridge / SUSP walk in libfsimage's iso9660 driver derives several lengths directly from attacker-controlled …

  • Medium 5.5

    buffer overruns in libfsimage iso9660 handling

    [This CNA information record relates to multiple CVEs; the text explains which aspects/vulnerabilities correspond to which CVE.] The directory and Rock Ridge / SUSP walk in libfsimage's iso9660 driver derives several lengths directly from attacker-controlled …

  • Medium 4.8

    HAProxy Community Edition 3.0 through 3.3 before 3.3.3 lacks a length check for the NEW_TOKEN format. HAProxy Enterpris…

  • Medium 5.3

    Zeroconf: Unvalidated rdlength in record payload readers allows LAN-local cache corruption via crafted mDNS packet

    Zeroconf is a pure Python implementation of multicast DNS service discovery. Prior to 0.149.16, _read_character_string and _read_string in src/zeroconf/_protocol/incoming.py advanced self.offset by attacker-declared RDLENGTH without checking it against self._…

  • Medium 6.3

    Improper Handling of Length Parameter Inconsistency (CWE-130) vulnerability exists in TTSSH2 plugin of Tera Term provid…

  • Medium 4.8

    Envoy: PROXY Protocol v2 header generator emits "skipped" TLVs, causing 65 KB attacker-controlled spillover into the upstream application stream

    Envoy is an open source edge and service proxy designed for cloud-native applications. From 1.34.0 until 1.35.13, 1.36.9, 1.37.5, and 1.38.3, PROXY Protocol v2 header generator emits TLVs beyond the maximum length of 65535 bytes, causing a mismatch between by…

  • Medium 5.3

    Improper bounds validation in EmberZNet SDK

    Improper bounds validation in the ZAP command parser of EmberZNet SDK versions 8.0.0 through 9.1.1 (inclusive) and before 7.5.2 (exclusive) may result in crashes or dynamic memory leakage. In order to exploit this vulnerability, an attacker would have to have…

  • Medium 5.9

    OpenTelemetry eBPF Instrumentation: CPU-mismatch fallback uses 256-byte buffer with 8KB size

    OpenTelemetry eBPF Instrumentation provides eBPF instrumentation based on the OpenTelemetry standard. Prior to version 0.9.0, the per-CPU message-buffer fallback path uses a 256-byte backup buffer but preserves the original payload size, which can be up to 8K…

  • Medium 6.5

    FastNetMon Community Edition through 1.2.9 has out-of-bounds memory access because it incorrectly parses BGP path attri…

  • Medium 5.3

    Potential denial-of-service vulnerability in ASGI requests via file upload limit bypass

    An issue was discovered in 6.0 before 6.0.5 and 5.2 before 5.2.14. ASGI requests with a missing or understated `Content-Length` header can bypass the `FILE_UPLOAD_MAX_MEMORY_SIZE` limit, potentially loading large files into memory and causing service degradat…

  • Medium 6.5

    Ovn: ovn: heap over-read in icmp error response generation

    When generating an ICMP Destination Unreachable or Packet Too Big response, the handler copies a portion of the original packet into the ICMP error body using the IP header's self-declared total length (ip_tot_len for IPv4, ip6_plen for IPv6) without validati…

  • Medium 4.0
    CVE-2026-33555 Public exploit

    An issue was discovered in HAProxy before 3.3.6. The HTTP/3 parser does not check that the received body length matches…

  • Medium 6.5

    Net::CIDR::Lite versions before 0.23 for Perl mishandles IPv4 mapped IPv6 addresses, which may allow IP ACL bypass

    Net::CIDR::Lite versions before 0.23 for Perl mishandles IPv4 mapped IPv6 addresses, which may allow IP ACL bypass. _pack_ipv6() includes the sentinel byte from _pack_ipv4() when building the packed representation of IPv4 mapped addresses like ::ffff:192.168.…

  • Medium 4.8

    Rack: Content-Length mismatch in Rack::Files error responses

    Rack is a modular Ruby web server interface. Prior to versions 2.2.23, 3.1.21, and 3.2.6, Rack::Files#fail sets the Content-Length response header using String#size instead of String#bytesize. When the response body contains multibyte UTF-8 characters, the de…

  • Medium 5.3
    CVE-2026-33936 Public exploit

    python-ecdsa: Denial of Service via improper DER length validation in crafted private keys

    The `ecdsa` PyPI package is a pure Python implementation of ECC (Elliptic Curve Cryptography) with support for ECDSA (Elliptic Curve Digital Signature Algorithm), EdDSA (Edwards-curve Digital Signature Algorithm) and ECDH (Elliptic Curve Diffie-Hellman). Prio…

  • Medium 5.1

    A vulnerability has been identified in SICAM SIAPP SDK (All versions < V2.1.7). The SICAM SIAPP SDK server component do…

  • Medium 5.1

    A vulnerability has been identified in SICAM SIAPP SDK (All versions < V2.1.7). The SICAM SIAPP SDK client component do…

  • Medium 6.0

    A vulnerability has been found in Vnet/IP Interface Package provided by Yokogawa Electric Corporation. If affected prod…

  • Medium 6.8

    Improper Handling of Length Parameter Inconsistency vulnerability in Mitsubishi Electric Corporation MELSEC-Q Series Q0…

  • Medium 5.5

    In multiple locations, there is a possible way to persistently DoS the device due to a missing length check. This could…

  • Medium 5.3

    Denial-of-Service(DoS) Vulnerability in Web server function on MELSEC iQ-F Series CPU module

    Improper Handling of Length Parameter Inconsistency vulnerability in web server function on Mitsubishi Electric Corporation MELSEC iQ-F Series CPU module allows a remote unauthenticated attacker to delay the processing of the web server function and prevent l…

  • Medium 5.1

    Vulnerability of inadequate packet length check in the BLE module. Impact: Successful exploitation of this vulnerabilit…

  • Medium 5.3

    Remotely exploitable denial of service in Rosenpass

    The rosenpass crate before 0.2.1 for Rust allows remote attackers to cause a denial of service (panic) via a one-byte UDP packet.

  • Medium 6.5

    Junos OS and Junos OS Evolved: In an EVPN environment, receipt of specifically malformed BGP update causes RPD crash

    An Improper Handling of Length Parameter Inconsistency vulnerability in the routing protocol daemon (rpd) of Juniper Networks Junos OS and Junos OS Evolved allows a logically adjacent BGP peer sending a specifically malformed BGP packet to cause rpd to crash …

  • Medium 4.0

    Rust Web Push is vulnerable to a DoS attack via a large integer in a Content-Length header

    The web-push crate before 0.10.3 for Rust allows a denial of service (memory consumption) in the built-in clients via a large integer in a Content-Length header.

  • Medium 4.4
    CVE-2025-23247 Public exploit

    NVIDIA CUDA Toolkit for all platforms contains a vulnerability in the cuobjdump binary, where a failure to check the le…

  • Medium 4.8

    In ConnMan through 1.44, parse_rr in dnsproxy.c has a memcpy length that depends on an RR RDLENGTH value, i.e., *rdlen=…

  • Medium 4.7

    Out-of-bounds write vulnerability in the HAL-WIFI module Impact: Successful exploitation of this vulnerability may affe…

  • Medium 5.3

    Elliptic's ECDSA missing check for whether leading bit of r and s is zero

    In the Elliptic package 6.5.6 for Node.js, ECDSA signature malleability occurs because there is a missing check for whether the leading bit of r and s is zero.