CWE-20: Improper Input Validation
12936 CVEs have CWE-20 as their primary weakness. 69 of them are in the CISA KEV catalog. The highest EPSS score among them is 99.999%.
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
Child of CWE-707: Improper Neutralization
Mitigations
- Architecture and Design: Consider using language-theoretic security (LangSec) techniques that characterize inputs using a formal language and build recognizers for that language. This effectively requires parsing to be a distinct layer that effectively enforces a boundary between raw input and internal data representations, instead of allowing parser code to be scattered throughout the program, where it could be subject to errors or inconsistencies that create weaknesses. [REF-1109] [REF-1110] [REF-1111]
- Architecture and Design: Use an input validation framework such as Struts or the OWASP ESAPI Validation API. Note that using a framework does not automatically address all input validation problems; be mindful of weaknesses that could arise from misusing the framework itself (CWE-1173).
- Architecture and Design Implementation: Understand all the potential areas where untrusted inputs can enter the product, including but not limited to: parameters or arguments, cookies, anything read from the network, environment variables, reverse DNS lookups, query results, request headers, URL components, e-mail, files, filenames, databases, and any external systems that provide data to the application. Remember that such inputs may be obtained indirectly through API calls.
- 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,…
- Architecture and Design: For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server. Even though client-side checks provide minimal benefits with respect to server-side security, they are still useful. First, they can support intrusion detection. If the server receives input that should have been rejected by the client, then it may be an indication of an attack. Second, client-side error-checking can provide helpful feedback to the user about the expectations for valid input. Third, there may be a reduction in server-side processing time for accidental input errors, although this is typically a small savings.
- Implementation: When your application combines data from multiple sources, perform the validation after the sources have been combined. The individual data elements may pass the validation step but violate the intended restrictions after they have been combined.
- Implementation: Be especially careful to validate all input when invoking code that crosses language boundaries, such as from an interpreted language to native code. This could create an unexpected interaction between the language boundaries. Ensure that you are not violating any of the expectations of the language with which you are interfacing. For example, even though Java may not be susceptible to buffer overflows, providing a large argument in a call to native code might trigger an overflow.
- Implementation: Directly convert your input type into the expected data type, such as using a conversion function that translates a string into a number. After converting to the expected data type, ensure that the input's values fall within the expected range of allowable values and that multi-field consistencies are maintained.
- Implementation: Inputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180, CWE-181). Make sure that your application does not inadvertently decode the same input twice (CWE-174). Such errors could be used to bypass allowlist schemes by introducing dangerous inputs after they have been checked. Use libraries such as the OWASP ESAPI Canonicalization control. Consider performing repeated canonicalization until your input does not change any more. This will avoid double-decoding and similar scenarios, but it might inadvertently modify inputs that are allowed to contain properly-encoded dangerous content.
- Implementation: When exchanging data between components, ensure that both components are using the same character encoding. Ensure that the proper encoding is applied at each interface. Explicitly set the encoding you are using whenever the protocol allows you to do so.
Observed examples
- CVE-2024-37032: Large language model (LLM) management tool does not validate the format of a digest value (CWE-1287) from a private, untrusted model registry, enabling relative path traversal (CWE-23), a.k.a. Probllama
- CVE-2022-45918: Chain: a learning management tool debugger uses external input to locate previous session logs (CWE-73) and does not properly validate the given path (CWE-20), allowing for filesystem path traversal using ../ sequences (CWE-24)
- CVE-2021-30860: Chain: improper input validation (CWE-20) leads to integer overflow (CWE-190) in mobile OS, as exploited in the wild per CISA KEV.
- CVE-2021-30663: Chain: improper input validation (CWE-20) leads to integer overflow (CWE-190) in mobile OS, as exploited in the wild per CISA KEV.
- CVE-2021-22205: Chain: backslash followed by a newline can bypass a validation step (CWE-20), leading to eval injection (CWE-95), as exploited in the wild per CISA KEV.
- CVE-2021-21220: Chain: insufficient input validation (CWE-20) in browser allows heap corruption (CWE-787), as exploited in the wild per CISA KEV.
- CVE-2020-9054: Chain: improper input validation (CWE-20) in username parameter, leading to OS command injection (CWE-78), as exploited in the wild per CISA KEV.
- CVE-2020-3452: Chain: security product has improper input validation (CWE-20) leading to directory traversal (CWE-22), as exploited in the wild per CISA KEV.
- CVE-2020-3161: Improper input validation of HTTP requests in IP phone, as exploited in the wild per CISA KEV.
- CVE-2020-3580: Chain: improper input validation (CWE-20) in firewall product leads to XSS (CWE-79), as exploited in the wild per CISA KEV.
- CVE-2021-37147: Chain: caching proxy server has improper input validation (CWE-20) of headers, allowing HTTP response smuggling (CWE-444) using an LF line ending
- CVE-2008-5305: Eval injection in Perl program using an ID that should only contain hyphens and numbers.
- CVE-2008-2223: SQL injection through an ID that was supposed to be numeric.
- CVE-2008-3477: lack of input validation in spreadsheet program leads to buffer overflows, integer overflows, array index errors, and memory corruption.
- CVE-2008-3843: insufficient validation enables XSS
- CVE-2008-3174: driver in security product allows code execution due to insufficient validation
- CVE-2007-3409: infinite loop from DNS packet with a label that points to itself
- CVE-2006-6870: infinite loop from DNS packet with a label that points to itself
- CVE-2008-1303: missing parameter leads to crash
- CVE-2007-5893: HTTP request with missing protocol version number leads to crash
- CVE-2006-6658: request with missing parameters leads to information exposure
- CVE-2008-4114: system crash with offset value that is inconsistent with packet size
- CVE-2006-3790: size field that is inconsistent with packet size leads to buffer over-read
- CVE-2008-2309: product uses a denylist to identify potentially dangerous content, allowing attacker to bypass a warning
- CVE-2008-3494: security bypass via an extra header
- CVE-2008-3571: empty packet triggers reboot
- CVE-2006-5525: incomplete denylist allows SQL injection
- CVE-2008-1284: NUL byte in theme name causes directory traversal impact to be worse
- CVE-2008-0600: kernel does not validate an incoming pointer before dereferencing it
- CVE-2008-1738: anti-virus product has insufficient input validation of hooked SSDT functions, allowing code execution
- CVE-2008-1737: anti-virus product allows DoS via zero-length field
- CVE-2008-3464: driver does not validate input from userland to the kernel
- CVE-2008-2252: kernel does not validate parameters sent in from userland, allowing code execution
- CVE-2008-2374: lack of validation of string length fields allows memory consumption or buffer over-read
- CVE-2008-1440: lack of validation of length field leads to infinite loop
- CVE-2008-1625: lack of validation of input to an IOCTL allows code execution
- CVE-2008-3177: zero-length attachment causes crash
- CVE-2008-5563: crash via a malformed frame structure
- CVE-2008-5285: infinite loop from a long SMTP request
- CVE-2008-3812: router crashes with a malformed packet
- CVE-2008-3680: packet with invalid version number leads to NULL pointer dereference
- CVE-2008-3660: crash via multiple . characters in file extension
Top released CVEs
KEV first, then the highest EPSS score, the highest CVSS score and the newest.
| CVE | Published | Severity | CVSS | EPSS | Description |
|---|---|---|---|---|---|
| CVE-2020-3452 | 2020-07-22 | HIGH | 7.5 | 99.992% | A vulnerability in the web services interface of Cisco Adaptive Security Appliance (ASA) Software and Cisco Firepower Threat Defense (FTD) Software could allow… |
| CVE-2018-7600 | 2018-03-29 | CRITICAL | 9.8 | 99.991% | Drupal before 7.58, 8.x before 8.3.9, 8.4.x before 8.4.6, and 8.5.x before 8.5.1 allows remote attackers to execute arbitrary code because of an issue… |
| CVE-2019-0604 | 2019-03-05 | CRITICAL | 9.8 | 99.913% | A remote code execution vulnerability exists in Microsoft SharePoint when the software fails to check the source markup of an application package, aka… |
| CVE-2018-0296 | 2018-06-07 | HIGH | 7.5 | 99.895% | A vulnerability in the web interface of the Cisco Adaptive Security Appliance (ASA) could allow an unauthenticated, remote attacker to cause an affected device… |
| CVE-2022-47966 | 2023-01-18 | CRITICAL | 9.8 | 99.753% | Multiple Zoho ManageEngine on-premise products, such as ServiceDesk Plus through 14003, allow remote code execution due to use of Apache Santuario xmlsec (aka… |
| CVE-2018-0171 | 2018-03-28 | CRITICAL | 9.8 | 99.479% | A vulnerability in the Smart Install feature of Cisco IOS Software and Cisco IOS XE Software could allow an unauthenticated, remote attacker to trigger a… |
| CVE-2017-0148 | 2017-03-17 | HIGH | 8.1 | 99.373% | The SMBv1 server in Microsoft Windows Vista SP2; Windows Server 2008 SP2 and R2 SP1; Windows 7 SP1; Windows 8.1; Windows Server 2012 Gold and R2; Windows RT… |
| CVE-2023-22515 | 2023-10-04 | CRITICAL | 10.0 | 99.230% | Atlassian has been made aware of an issue reported by a handful of customers where external attackers may have exploited a previously unknown vulnerability in… |
| CVE-2022-24086 | 2022-02-16 | CRITICAL | 9.8 | 99.199% | Adobe Commerce versions 2.4.3-p1 (and earlier) and 2.3.7-p2 (and earlier) are affected by an improper input validation vulnerability during the checkout… |
| CVE-2017-3881 | 2017-03-17 | CRITICAL | 9.8 | 98.975% | A vulnerability in the Cisco Cluster Management Protocol (CMP) processing code in Cisco IOS and Cisco IOS XE Software could allow an unauthenticated, remote… |
| CVE-2017-9791 | 2017-07-10 | CRITICAL | 9.8 | 98.908% | The Struts 1 plugin in Apache Struts 2.1.x and 2.3.x might allow remote code execution via a malicious field value passed in a raw message to the ActionMessage. |
| CVE-2017-15944 | 2017-12-11 | CRITICAL | 9.8 | 98.340% | Palo Alto Networks PAN-OS before 6.1.19, 7.0.x before 7.0.19, 7.1.x before 7.1.14, and 8.0.x before 8.0.6 allows remote attackers to execute arbitrary code via… |
| CVE-2026-34197 | 2026-04-07 | HIGH | 8.8 | 98.256% | Improper Input Validation, Improper Control of Generation of Code ('Code Injection') vulnerability in Apache ActiveMQ Broker, Apache ActiveMQ. Apache ActiveMQ… |
| CVE-2016-3714 | 2016-05-05 | HIGH | 8.4 | 97.485% | The (1) EPHEMERAL, (2) HTTPS, (3) MVG, (4) MSL, (5) TEXT, (6) SHOW, (7) WIN, and (8) PLT coders in ImageMagick before 6.9.3-10 and 7.x before 7.0.1-1 allow… |
| CVE-2023-23397 | 2023-03-14 | CRITICAL | 9.8 | 97.159% | Microsoft Outlook Elevation of Privilege Vulnerability |
| CVE-2020-1350 | 2020-07-14 | CRITICAL | 10.0 | 96.721% | A remote code execution vulnerability exists in Windows Domain Name System servers when they fail to properly handle requests, aka 'Windows DNS Server Remote… |
| CVE-2009-0927 | 2009-03-19 | HIGH | 8.8 | 96.632% | Stack-based buffer overflow in Adobe Reader and Adobe Acrobat 9 before 9.1, 8 before 8.1.3 , and 7 before 7.1.1 allows remote attackers to execute arbitrary… |
| CVE-2019-1652 | 2019-01-24 | HIGH | 7.2 | 95.923% | A vulnerability in the web-based management interface of Cisco Small Business RV320 and RV325 Dual Gigabit WAN VPN Routers could allow an authenticated, remote… |
| CVE-2025-54236 | 2025-09-09 | CRITICAL | 9.1 | 95.534% | Adobe Commerce versions 2.4.9-alpha2, 2.4.8-p2, 2.4.7-p7, 2.4.6-p12, 2.4.5-p14, 2.4.4-p15 and earlier are affected by an Improper Input Validation… |
| CVE-2024-21413 | 2024-02-13 | CRITICAL | 9.8 | 94.660% | Microsoft Outlook Remote Code Execution Vulnerability |
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cwe_lookup/CWE-20'curl 'https://api.contrastcyber.com/cve_search?cwe_id=CWE-20'
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.
- 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).