1. CVE archive
  2. Vulnerability types
  3. CWE-130
CWE-130 · #175 most frequent type in the archive

Improper Handling of Length Parameter Inconsistency

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.

Part of: CWE-240 · Improper Handling of Inconsistent Structural Elements

114CVEs of this type in the archive
7critical (CVSS ≥ 9)
58high severity (7–8.9)
Nov 26, 2026latest published

What it is

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.

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.

Impact on systems

ScopeImpact
Confidentiality, Integrity Read Memory, Modify Memory, Varies by Context

How to prevent it

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.
Implementation Do not let the user control the size of the buffer.
Implementation Validate that the length of the user-supplied data is consistent with the buffer size.

Source: MITRE CWE catalog · Official entry on the MITRE website

CWE-130 CVEs published per year

2026: year in progress, updated every hour

Show the data as a table
YearCVE
20191
20201
20215
202211
20234
202415
202513
202664

All CWE-130 CVEs

114 results

Dottor Marc

Is this type of vulnerability in your systems?

An archive tells you what exists; a Vulnerability Assessment tells you what is exposed on your side. Dottor Marc tests your web applications and network with automated and manual checks.