Skip to content
OpenAdvisories

Weakness (CWE)

CWE-20: Improper Input Validation

Class Mapping discouraged

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.

How to prevent it (8 mitigations)
  1. 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]

  2. 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).

  3. 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.

  4. 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, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.

  5. 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.

  6. 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.

  7. 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.

  8. 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.

Source: MITRE CWE-20

702 results · Clear filters · Feed

  • Critical 9.8

    White Rabbit Switch - Unauthenticated remote code execution

    White Rabbit Switch contains a vulnerability which makes it possible for an attacker to perform system commands under the context of the web application (the default installation makes the webserver run as the root user).

  • Critical 9.8

    An issue was discovered in ONOS 2.5.1. An intent with a large port number shows the CORRUPT state, which is misleading …

  • Critical 9.8
    CVE-2023-21554 Public exploit EPSS 95%

    Microsoft Message Queuing (MSMQ) Remote Code Execution Vulnerability

    Microsoft Message Queuing (MSMQ) Remote Code Execution Vulnerability

  • Critical 9.8
    CVE-2023-26068 Public exploit EPSS 12%

    Certain Lexmark devices through 2023-02-19 mishandle Input Validation (issue 2 of 4).

  • Critical 9.8

    Certain Lexmark devices through 2023-02-19 mishandle Input Validation (issue 4 of 4).

  • Critical 9.8

    Certain Lexmark devices through 2023-02-19 mishandle Input Validation (issue 3 of 4).

  • Critical 9.8

    Improper Input Validation in MODEM

    memory corruption in modem due to improper check while calculating size of serialized CoAP message

  • Critical 10.0

    RCE via file upload vulnerability in Generex CS141

    Generex UPS CS141 below 2.06 version, could allow a remote attacker to upload a firmware file containing a webshell that could allow him to execute arbitrary code as root.

  • Critical 9.8

    Unauthenticated RCE affecting the AcyMailing plugin for Joomla

    AnyMailing Joomla Plugin is vulnerable to unauthenticated remote code execution, when being granted access to the campaign's creation on front-office due to unrestricted file upload allowing PHP code to be injected. This issue affects AnyMailing Joomla Plugin…

  • Critical 9.9

    CairoSVG improperly processes SVG files loaded from external resources

    CairoSVG is an SVG converter based on Cairo, a 2D graphics library. Prior to version 2.7.0, Cairo can send requests to external hosts when processing SVG files. A malicious actor could send a specially crafted SVG file that allows them to perform a server-sid…

  • Critical 10.0

    TIOCLINUX can send commands outside sandbox if running on a virtual console

    Flatpak is a system for building, distributing, and running sandboxed desktop applications on Linux. Versions prior to 1.10.8, 1.12.8, 1.14.4, and 1.15.4 contain a vulnerability similar to CVE-2017-5226, but using the `TIOCLINUX` ioctl command instead of `TIO…

  • Critical 9.8
    CVE-2023-23397 Exploited Public exploit EPSS 97%

    Microsoft Outlook Elevation of Privilege Vulnerability

    Microsoft Outlook Elevation of Privilege Vulnerability

    KEV Mar 14, 2023
  • Critical 9.8

    Apache Airflow Hive Provider Beeline RCE

    Improper Input Validation vulnerability in the Apache Airflow Hive Provider. This issue affects Apache Airflow Hive Provider versions before 5.1.3.

  • Critical 9.8

    Sqoop Apache Airflow Provider Remote Code Execution Vulnerability

    Improper Input Validation vulnerability in the Apache Airflow Sqoop Provider. This issue affects Apache Airflow Sqoop Provider versions before 3.1.1.

  • Critical 9.8

    Apache Airflow Google Provider: Google Cloud Sql Provider Remote Command Execution

    Improper Input Validation vulnerability in the Apache Airflow Google Provider. This issue affects Apache Airflow Google Provider versions before 8.10.0.

  • Critical 9.8

    An issue found in Peacexie Imcat v5.4 allows attackers to execute arbitrary code via the incomplete filtering function.

  • Critical 9.1

    PHP code injection in watolib

    PHP code injection in watolib auth.php and hosttags.php in Tribe29's Checkmk <= 2.1.0p10, Checkmk <= 2.0.0p27, and Checkmk <= 1.6.0p29 allows an attacker to inject and execute PHP code which will be executed upon request of the vulnerable component.

  • Critical 9.8

    Improper Input Validation in MODEM

    Memory corruption in modem due to improper length check while copying into memory

  • Critical 9.8

    Local File Inclusion in Smartpower Web

    Improper Input Validation vulnerability in Group Arge Energy and Control Systems Smartpower Web allows PHP Local File Inclusion. This issue affects Smartpower Web: before 23.01.01.

  • Critical 9.8

    ChangingTec MegaServiSignAdapter - Improper Input Validation

    ChangingTech MegaServiSignAdapter component has a vulnerability of improper input validation. An unauthenticated remote attacker can exploit this vulnerability to access and modify HKEY_CURRENT_USER subkey (ex: AutoRUN) in Registry where malicious scripts can…

  • Critical 9.8
    CVE-2023-23560 EPSS 14%

    In certain Lexmark products through 2023-01-12, SSRF can occur because of a lack of input validation.

  • Critical 9.8
    CVE-2022-47966 Exploited · Ransomware Public exploit Scanner template EPSS 100%

    Multiple Zoho ManageEngine on-premise products, such as ServiceDesk Plus through 14003, allow remote code execution due…

    KEV Jan 23, 2023
  • Critical 9.8

    Apache DolphinScheduler: Remote command execution Vulnerability in script alert plugin

    Improper validation of script alert plugin parameters in Apache DolphinScheduler to avoid remote command execution vulnerability. This issue affects Apache DolphinScheduler version 3.0.1 and prior versions; version 3.1.0 and prior versions. This attack can be…

  • Critical 9.8

    ASN.1 parsing of an indefinite SEQUENCE inside an indefinite GROUP could have resulted in the parser accepting malforme…

  • Critical 9.8

    Apache Karaf: JDBC JAAS LDAP injection

    This vulnerable is about a potential code injection when an attacker has control of the target LDAP server using in the JDBC JNDI URL. The function jaas.modules.src.main.java.porg.apache.karaf.jass.modules.jdbc.JDBCUtils#doCreateDatasource use InitialContext.…

  • Critical 9.8

    An issue existed in the parsing of URLs. This issue was addressed with improved input validation. This issue is fixed i…

  • Critical 9.8

    iTerm2 before 3.4.18 mishandles a DECRQSS response.

  • Critical 9.8

    Elsight – Elsight Halo Remote Code Execution (RCE)

    Elsight – Elsight Halo  Remote Code Execution (RCE) Elsight Halo web panel allows us to perform connection validation. through the POST request : /api/v1/nics/wifi/wlan0/ping we can abuse DESTINATION parameter and leverage it to remote code execution.

  • Critical 9.9

    A vulnerability has been identified in POWER METER SICAM Q100 (All versions < V2.50), POWER METER SICAM Q100 (All versi…

  • Critical 9.9

    A vulnerability has been identified in POWER METER SICAM Q100 (All versions < V2.50), POWER METER SICAM Q100 (All versi…

  • Critical 9.9

    A vulnerability has been identified in POWER METER SICAM Q100 (7KG9501-0AA01-0AA1) (All versions < V2.50), POWER METER …

  • Critical 9.4

    xmldom allows multiple root nodes in a DOM

    xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) `DOMParser` and `XMLSerializer` module. xmldom parses XML that is not well-formed because it contains multiple top level elements, and adds all root nodes to the `childNodes` collection of …

  • Critical 9.8

    Incorrect parsing of the backslash characters in Dart library

    The implementation of backslash parsing in the Dart URI class for versions prior to 2.18 and Flutter versions prior to 3.30 differs from the WhatWG URL standards. Dart uses the RFC 3986 syntax, which creates incompatibilities with the '\' characters in URIs, …

  • Critical 9.8

    Apache Flume prior to 1.11.0 has an Improper Input Validation (JNDI Injection) in JMSSource

    Apache Flume versions 1.4.0 through 1.10.1 are vulnerable to a remote code execution (RCE) attack when a configuration uses a JMS Source with an unsafe providerURL. This issue is fixed by limiting JNDI to allow only the use of the java protocol or no protocol.

  • Critical 9.8

    Dataease Mysql Data Source JDBC Connection Parameters Not Verified Leads to Deserialization Vulnerability

    Dataease is an open source data visualization analysis tool. Dataease prior to 1.15.2 has a deserialization vulnerability. In Dataease, the Mysql data source in the data source function can customize the JDBC connection parameters and the Mysql server target …

  • Critical 10.0

    Socket.io - Improper type validation in attachment parsing

    Due to improper type validation in attachment parsing the Socket.io js library, it is possible to overwrite the _placeholder object which allows an attacker to place references to functions at arbitrary places in the resulting query object.

  • Critical 9.7

    isolated-vm has vulnerable CachedDataOptions in API

    isolated-vm is a library for nodejs which gives the user access to v8's Isolate interface. In versions 4.3.6 and prior, if the untrusted v8 cached data is passed to the API through CachedDataOptions, attackers can bypass the sandbox and run arbitrary code in …

  • Critical 9.8

    Improper Input Validation (JNDI Injection) in JMSMessageConsumer

    Apache Flume versions 1.4.0 through 1.10.0 are vulnerable to a remote code execution (RCE) attack when a configuration uses a JMS Source with a JNDI LDAP data source URI when an attacker has control of the target LDAP server. This issue is fixed by limiting J…

  • Critical 9.3

    loopback-connector-postgresql Vulnerable to Improper Sanitization of `contains` Filter

    Improper input validation on the `contains` LoopBack filter may allow for arbitrary SQL injection. When the extended filter property `contains` is permitted to be interpreted by the Postgres connector, it is possible to inject arbitrary SQL which may affect t…

  • Critical 9.6

    Improper URL parsing in Zoom Clients

    The Zoom Client for Meetings (for Android, iOS, Linux, macOS, and Windows) before version 5.11.0 are susceptible to a URL parsing vulnerability. If a malicious Zoom meeting URL is opened, the malicious link may direct the user to connect to an arbitrary netwo…