CWE-20: CWE-20: Improper Input Validation

ClassStable🏆 #9 in Top 25 (2024)

Description

View on MITRE
2,318Related CVEs
15.98Severity Score
Back to CWE Lookup

Technical Details

Structure
Simple
Vulnerability Mapping
DISCOURAGED

Applicable To

Languages
TypeApplicable PlatformsLanguages
Platforms
TypeApplicable PlatformsLanguages

🏆 CWE Top 25 Historical Ranking

2023:#6
Score: 15.50
2,188 CVEs
2024:#9↓3
Score: 15.98
2,318 CVEs
Trend:Improving (moved up 3 ranks)

Frequently Asked Questions

What is CWE-20: CWE-20: Improper Input Validation?+

CWE-20: CWE-20: Improper Input Validation is a Common Weakness Enumeration (CWE) entry maintained by MITRE. Description

Is CWE-20 in the CWE Top 25 Most Dangerous Software Weaknesses?+

Yes. CWE-20 ranked #9 in the CWE Top 25 for 2024, associated with 2,318 CVEs that year. The CWE Top 25 highlights the most common and impactful software weaknesses based on real-world vulnerability data.

What are the security consequences of CWE-20: Improper Input Validation?+

If exploited, CWE-20 (CWE-20: Improper Input Validation) it can compromise DoS: Crash, Exit, or Restart, DoS: Resource Consumption (CPU), DoS: Resource Consumption (Memory) and Read Memory, leading to outcomes such as Scope: Availability An attacker could provide unexpected values and cause a program crash or arbitrary control of resource allocation, leading to excessive consumption of resources such as memory and CPU., Scope: Confidentiality An attacker could read confidential data if they are able to control resource references., Scope: Integrity, Confidentiality and Availability An attacker could use malicious input to modify data or possibly alter control flow in unexpected ways.

How do you prevent or mitigate CWE-20: Improper Input Validation?+

Recommended mitigations for CWE-20 include: Strategy: Attack Surface Reduction 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 ] Strategy: Libraries or Frameworks 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 ). Strategy: Attack Surface Reduction 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.

Which programming languages are affected by CWE-20: Improper Input Validation?+

CWE-20 commonly affects Type, Applicable Platforms and Languages. Note that weaknesses are often language-agnostic patterns, so secure coding practices apply broadly.

What is the difference between a CWE and a CVE?+

A CWE (Common Weakness Enumeration) like CWE-20 describes a category of software weakness — the underlying flaw type. A CVE (Common Vulnerabilities and Exposures) identifies a specific, real-world vulnerability in a particular product. In short, a CWE is the kind of mistake, and a CVE is an instance of that mistake being found in software.

Learn More

Advertisement