CWE-1284: Improper Validation of Specified Quantity in Input

low-risk

The product receives input that is expected to specify a quantity (such as size or length), but it does not validate or incorrectly validates that the quantity has the required properties.

Abstraction: Base

Common Consequences

Other Varies by Context

Detection Methods

Automated Static Analysis

Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

Real-World Examples (10)

CVE CVSS EPSS KEV
CVE-2022-20699 10.0 89.9% Y
CVE-2021-43267 9.8 72.6%
CVE-2022-31629 6.5 15.4%
CVE-2008-2374 9.8 6.4%
CVE-2008-2374 9.8 6.4%
CVE-2022-36063 7.6 4.2%
CVE-2022-36620 7.5 3.8%
CVE-2023-38709 7.3 3.3%
CVE-2022-3411 6.5 2.7%
CVE-2013-0270 6.5 2.7%
2
/ 100
low-risk
Active Threat 1/50 · Minimal
Exploit Availability 1/50 · Minimal