CWE-1284: Improper Validation of Specified Quantity in Input
356 CVEs have CWE-1284 as their primary weakness. 1 of them are in the CISA KEV catalog. The highest EPSS score among them is 57.853%.
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.
Child of CWE-20: Improper Input Validation
Mitigations
- Implementation: Assume all input is malicious. Use an accept known good input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, boat may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as red or blue. Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However,…
Observed examples
- CVE-2025-4037: ATM simulator does not check for negative values with deposits or withdrawals, allowing attackers to increase their balance
- CVE-2025-46687: Chain: Javascript engine code does not perform a length check (CWE-1284) leading to integer overflow (CWE-190) causing allocation of smaller buffer than expected (CWE-131) resulting in a heap-based buffer overflow (CWE-122)
- CVE-2019-19911: Chain: Python library does not limit the resources used to process images that specify a very large number of bands (CWE-1284), leading to excessive memory consumption (CWE-789) or an integer overflow (CWE-190).
- CVE-2008-1440: lack of validation of length field leads to infinite loop
- CVE-2008-2374: lack of validation of string length fields allows memory consumption or buffer over-read
Top released CVEs
KEV first, then the highest EPSS score, the highest CVSS score and the newest.
| CVE | Published | Severity | CVSS | EPSS | Description |
|---|---|---|---|---|---|
| CVE-2010-3904 | 2010-12-06 | HIGH | 7.8 | 15.861% | The rds_page_copy_user function in net/rds/page.c in the Reliable Datagram Sockets (RDS) protocol implementation in the Linux kernel before 2.6.36 does not… |
| CVE-2026-129868 | 2026-11-16 | MEDIUM | 6.5 | 0.311% | Rocboss paopao-ce through 0.6.0-alpha.3 fails to validate the attachment_price field when creating posts, allowing authenticated users to set negative prices… |
| CVE-2026-125920 | 2026-11-17 | MEDIUM | 4.3 | 0.230% | GitLab has remediated an issue in GitLab EE affecting all versions from 17.4 before 19.3.9, 19.4 before 19.4.8, and 19.5 before 19.5.6 that under certain… |
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cwe_lookup/CWE-1284'curl 'https://api.contrastcyber.com/cve_search?cwe_id=CWE-1284'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).