Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CWE-20 (输入验证不恰当) — Vulnerability Class 3357

3357 vulnerabilities classified as CWE-20 (输入验证不恰当). AI Chinese analysis included.

CWE-20 represents a critical software weakness where applications fail to properly verify the integrity, format, or type of incoming data before processing it. This oversight allows attackers to inject malicious payloads, such as SQL injection strings or cross-site scripting code, which can bypass security controls and compromise system integrity. Exploitation typically occurs when untrusted data from external sources, like user forms or network packets, is treated as executable code or trusted input. To mitigate this risk, developers must implement rigorous input validation strategies, including strict type checking, length constraints, and allow-listing acceptable characters. Additionally, employing parameterized queries and output encoding ensures that even if validation fails, the injected data remains inert, thereby preserving application security and preventing unauthorized execution or data exposure.

MITRE CWE Description
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. Input validation is a frequently-used technique for checking potentially dangerous inputs in order to ensure that the inputs are safe for processing within the code, or when communicating with other components. Input can consist of: raw data - strings, numbers, parameters, file contents, etc. metadata - information about the raw data, such as headers or size Data can be simple or structured. Structured data can be composed of many nested layers, composed of combinations of metadata and raw data, with other simple or structured data. Many properties of raw data or metadata may need to be validated upon entry into the code, such as: specified quantities such as size, length, frequency, price, rate, number of operations, time, etc. implied or derived quantities, such as the actual size of a file instead of a specified size indexes, offsets, or positions into more complex data structures symbolic keys or other elements into hash tables, associative arrays, etc. well-formedness, i.e. syntactic correctness - compliance with expected syntax lexical token correctness - compliance with rules for what is treated as a token specified or derived type - the actual type of the input (or what the input appears to be) consistency - between individual data el…
Common Consequences (3)
AvailabilityDoS: Crash, Exit, or Restart, DoS: Resource Consumption (CPU), DoS: Resource Consumption (Memory)
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.
ConfidentialityRead Memory, Read Files or Directories
An attacker could read confidential data if they are able to control resource references.
Integrity, Confidentiality, AvailabilityModify Memory, Execute Unauthorized Code or Commands
An attacker could use malicious input to modify data or possibly alter control flow in unexpected ways, including arbitrary command execution.
Mitigations (5)
Architecture and DesignConsider 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 subjec…
Architecture and DesignUse 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, ImplementationUnderstand 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 b…
ImplementationAssume 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…
Effectiveness: High
Architecture and DesignFor 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 clien…
Examples (2)
This example demonstrates a shopping interaction in which the user is free to specify the quantity of items to be purchased and a total is calculated.
... public static final double price = 20.00; int quantity = currentUser.getAttribute("quantity"); double total = price * quantity; chargeUser(total); ...
Bad · Java
This example asks the user for a height and width of an m X n game board with a maximum dimension of 100 squares.
... #define MAX_DIM 100 ... /* board dimensions */ int m,n, error; board_square_t *board; printf("Please specify the board height: \n"); error = scanf("%d", &m); if ( EOF == error ){ die("No integer passed: Die evil hacker!\n"); } printf("Please specify the board width: \n"); error = scanf("%d", &n); if ( EOF == error ){ die("No integer passed: Die evil hacker!\n"); } if ( m > MAX_DIM || n > MAX_DIM ) { die("Value too large: Die evil hacker!\n"); } board = (board_square_t*) malloc( m * n * sizeof(board_square_t)); ...
Bad · C
CVE IDTitleCVSSSeverityPublished
CVE-2023-21494 SAMSUNG Mobile devices 安全漏洞 — Samsung Mobile Devices 5.6 Medium2023-05-04
CVE-2022-46365 Apache StreamPark (incubating): Logic error causing any account reset — Apache StreamPark (incubating) 8.1 -2023-05-01
CVE-2023-0683 Lenovo XClarity Controller 安全漏洞 — XClarity Controller 8.3 High2023-05-01
CVE-2023-0896 Lenovo Smart Clock Essential 信任管理问题漏洞 — Lenovo Smart Clock Essential with Alexa Built In 8.8 High2023-05-01
CVE-2023-26022 IBM Db2 denial of service — DB2 for Linux, UNIX and Windows 5.9 Medium2023-04-28
CVE-2023-26021 IBM Db2 denial of service — DB2 for Linux, UNIX and Windows 7.5 High2023-04-28
CVE-2023-27555 IBM Db2 denial of service — DB2 for Linux, UNIX and Windows 5.1 Medium2023-04-28
CVE-2023-25930 IBM Db2 denial of service — DB2 for Linux, UNIX and Windows 5.9 Medium2023-04-28
CVE-2023-29255 IBM DB2 for Linux, UNIX and Windows denial of service — DB2 for Linux, UNIX and Windows 7.5 High2023-04-27
CVE-2023-27559 IBM Db2 denial of service — Db2 for Linux, UNIX and Windows 5.3 Medium2023-04-26
CVE-2023-29530 Laminas Diactoros vulnerable to HTTP Multiline Header Termination — laminas-diactoros 7.5 High2023-04-24
CVE-2023-22581 White Rabbit Switch - Unauthenticated remote code execution — White Rabbit Switch 9.8 Critical2023-04-24
CVE-2023-22916 Zyxel ATP 安全漏洞 — ATP series firmware 8.1 High2023-04-24
CVE-2023-29410 Schneider Electric Conext Gateway 输入验证错误漏洞 — InsightHome 7.2 High2023-04-18
CVE-2023-28981 Junos OS and Junos OS Evolved: If malformed IPv6 router advertisements are received, memory corruption will occur which causes an rpd crash — Junos OS 6.5 Medium2023-04-17
CVE-2023-30542 GovernorCompatibilityBravo may trim proposal calldata — openzeppelin-contracts 6.8 Medium2023-04-16
CVE-2023-30535 Snowflake JDBC vulnerable to command injection via SSO URL authentication — snowflake-jdbc 7.3 High2023-04-14
CVE-2023-29194 vitess allows users to create keyspaces that can deny access to already existing keyspaces — vitess 4.1 Medium2023-04-14
CVE-2023-26388 ZDI-CAN-20286: Adobe Substance 3D Stager USDZ File Parsing Memory Corruption Remote Code Execution Vulnerability — Substance3D - Stager 7.8 High2023-04-12
CVE-2023-26405 ZDI-CAN-20712: Object Prototype pollution which leads to API Restrictions Bypass — Acrobat Reader 7.8 High2023-04-12
CVE-2023-26407 ZDI-CAN-20712: Net.HTTP.request Arbitrary Command Execution — Acrobat Reader 7.8 High2023-04-12
CVE-2023-28304 Microsoft ODBC and OLE DB Remote Code Execution Vulnerability — Microsoft ODBC Driver 17 for SQL Server 7.8 High2023-04-11
CVE-2023-28302 Microsoft Message Queuing (MSMQ) Denial of Service Vulnerability — Windows 10 Version 1809 7.5 High2023-04-11
CVE-2023-28274 Windows Win32k Elevation of Privilege Vulnerability — Windows 10 Version 1809 7.8 High2023-04-11
CVE-2023-23375 Microsoft ODBC and OLE DB Remote Code Execution Vulnerability — Microsoft OLE DB Driver 18 for SQL Server 7.8 High2023-04-11
CVE-2023-21554 Microsoft Message Queuing (MSMQ) Remote Code Execution Vulnerability — Windows 10 Version 1809 9.8 Critical2023-04-11
CVE-2023-24893 Visual Studio Code Remote Code Execution Vulnerability — Visual Studio Code 7.8 High2023-04-11
CVE-2023-28291 Raw Image Extension Remote Code Execution Vulnerability — Raw Image Extension 8.4 High2023-04-11
CVE-2022-42477 Fortinet FortiAnalyzer 输入验证错误漏洞 — FortiAnalyzer 6.5 High2023-04-11
CVE-2023-26293 Siemens TIA Portal 输入验证错误漏洞 — Totally Integrated Automation Portal (TIA Portal) V15 7.3 High2023-04-11

Vulnerabilities classified as CWE-20 (输入验证不恰当) represent 3357 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.