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

2,578 results · Clear filters · Feed

  • Medium 4.4

    Word Replacer <= 0.4 - Authenticated (Administrator+) Stored Cross-Site Scripting via 'Replacement' Parameter

    The Word Replacer plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'replacement' parameter in all versions up to, and including, 0.4. This is due to insufficient input sanitization and output escaping. This makes it possible for authe…

  • Medium 5.3

    FoundationAgents MetaGPT schema.py Message.check_instruct_content deserialization

    A weakness has been identified in FoundationAgents MetaGPT up to 0.8.2. This affects the function Message.check_instruct_content of the file metagpt/schema.py. Executing a manipulation of the argument mapping can lead to deserialization. The attack is restric…

  • Medium 5.5

    In multiple functions of DevicePolicyManagerService.java, there is a possible desync from persistence due to improper i…

  • Medium 5.5

    In applySimpleFieldMaxSize of DataRowHandler.java, there is a possible way to insert a large contact name due to improp…

  • Medium 5.5

    In multiple functions of DevicePolicyManagerService.java, there is a possible way to hide a system critical package due…

  • Medium 6.5

    In multiple functions of ubsan_throwing_runtime.cpp, there is a possible way to cause a system crash due to improper in…

  • Medium 5.5

    In multiple functions of AccessibilityManagerService.java, there is a possible persistent denial of service due to impr…

  • Medium 6.9

    Capsule TenantResource RawItems Cluster-Scoped Resource Creation Vulnerability

    Capsule is a multi-tenancy and policy-based framework for Kubernetes. The Capsule Controller runs with cluster-admin privileges. Although the TenantResource RawItems processing logic forcibly sets the namespace, this is ineffective for cluster-scoped resource…

  • Medium —

    tar has a PAX header desynchronization issue

    ### Summary When a tar stream contains multiple "header" entries prior to a file entry, tar-rs applies the PAX header (`x`) to the _next_ entry in the stream, regardless of type. For example, a stream of `x -> L -> file` (PAX, GNU longname, file) would result…

  • Medium 5.3

    cpp-httplib DoS: Negative chunk-size in chunked Transfer-Encoding

    cpp-httplib is a C++11 single-file header-only cross platform HTTP/HTTPS library. Prior to 0.43.4, negative chunk-size in chunked Transfer-Encoding causes unbounded memory allocation and process crash. The ChunkedDecoder::read_payload function in cpp-httplib …

  • Medium —

    astral-tokio-tar has a PAX Header Desynchronization issue

    ### Impact Versions of astral-tokio-tar prior to 0.6.2 contain a PAX header interpretation bug that allows manipulated entries to be made selectively visible or invisible during extraction with astral-tokio-tar versus other tar implementations. An attacker co…

  • Medium 5.3

    liboqs: XMSS Buffer Overread Bug

    liboqs is a C-language cryptographic library that provides implementations of post-quantum cryptography algorithms. Prior to 0.16.0, an out-of-bounds read has been identified in the XMSS and XMSS^MT stateful signature verification code. When the verification …

  • Medium 5.4

    Insufficient validation of untrusted input in Passwords in Google Chrome prior to 148.0.7778.216 allowed a remote attac…

  • Medium 5.3

    Insufficient validation of untrusted input in Media in Google Chrome on ChromeOS prior to 148.0.7778.216 allowed a remo…

  • Medium 4.2

    Insufficient validation of untrusted input in OptimizationGuide in Google Chrome prior to 148.0.7778.216 allowed a remo…

  • Medium 5.0

    Insufficient validation of untrusted input in Printing in Google Chrome prior to 148.0.7778.216 allowed a remote attack…

  • Medium 5.0

    Insufficient validation of untrusted input in Input in Google Chrome prior to 148.0.7778.216 allowed a remote attacker …

  • Medium 5.0

    Insufficient validation of untrusted input in Site Isolation in Google Chrome prior to 148.0.7778.216 allowed a remote …

  • Medium 5.1

    Synapse pagination denial of service

    Synapse is an open source Matrix homeserver implementation. Prior to 1.152.1, in federated rooms, malicious homeservers can craft room events in such a way that prevents Synapse from providing full history to paginating clients. Clients could therefore fail t…

  • Medium 4.4

    NVIDIA Display Driver for Windows and Linux contains a vulnerability in the kernel driver, where a user could cause an …

  • Medium 6.3

    changmingxie tcc-transaction Fastjson AutoType REST API Fastjson.parseObject deserialization

    A flaw has been found in changmingxie tcc-transaction up to 2.1.0. This issue affects the function Fastjson.parseObject of the component Fastjson AutoType REST API. This manipulation causes deserialization. It is possible to initiate the attack remotely. The …

  • Medium 5.3

    Insufficient validation of untrusted input in Input in Google Chrome on prior to 148.0.7778.179 allowed a remote attack…

  • Medium 6.5

    Apache OFBiz: JSON Attribute Override and URL Allowlist Bypass Leads to Remote Code Execution

    Improper Input Validation vulnerability in Apache OFBiz. This issue affects Apache OFBiz: before 24.09.06. Users are recommended to upgrade to version 24.09.06, which fixes the issue.

  • Medium 5.4

    Microsoft Edge (Chromium-based) Security Feature Bypass Vulnerability

    Improper input validation in Microsoft Edge (Chromium-based) allows an unauthorized attacker to bypass a security feature over a network.

  • Medium 6.5

    eduMFA: Unauthenticated Failcounter Increment on Resolver Tokens via /validate/check

    ### Impact If the resolver parameter is passed, but the user does not exist, all failcounters of tokens in that resolver will be increased. ### Patches This, along with other issues, was fixed in eduMFA v2.9.1. ### Workarounds Limiting access to `/validate/ch…

  • Medium 6.5
    CVE-2026-20685 Public exploit

    An attacker in a privileged network position may be able to leak sensitive information. A path handling issue was addre…

  • Medium 6.3

    Oinone Pamirs appConfigQuery PamirsParserConfig.java JsonUtils.parseMap deserialization

    A vulnerability was identified in Oinone Pamirs up to 7.2.0. This affects the function JsonUtils.parseMap of the file PamirsParserConfig.java of the component appConfigQuery Interface. Such manipulation leads to deserialization. The attack can be launched rem…

  • Medium 4.6

    Open WebUI: Cross-Site Request Forgery (CSRF) via Image URL Manipulation

    Open WebUI is a self-hosted artificial intelligence platform designed to operate entirely offline. Prior to 0.9.3, an application-wide Cross-Site Request Forgery (CSRF) vulnerability was found Open-WebUl's image uploading functionality. An attacker can set an…

  • Medium 5.3

    Insufficient validation of untrusted input in GPU in Google Chrome prior to 148.0.7778.168 allowed a remote attacker wh…

  • Medium 4.3

    Insufficient validation of untrusted input in SiteIsolation in Google Chrome prior to 148.0.7778.168 allowed a remote a…

  • Medium 5.3

    Insufficient validation of untrusted input in DataTransfer in Google Chrome prior to 148.0.7778.168 allowed a remote at…

  • Medium 5.4

    ShellHub: Crash-DoS via field injection in filter and sort-by parameters

    ShellHub is a centralized SSH gateway. Prior to 0.24.2, the device list endpoint accepts user-controlled identifiers in the the name field of each filter property in the base64-encoded filter query parameter and the sort_by query parameter, which are then pas…

  • Medium 5.3

    MISP: Improper UUID validation in MISP Collections

    MISP is an open source threat intelligence and sharing platform. Prior to 2.5.37, MISP Collections did not enforce RFC 4122 UUID validation on the uuid field. As a result, a user able to create or modify Collection records could submit malformed UUID values, …

  • Medium 6.3

    Lack of Server-side validation in Instruction Input in TeamViewer DEX Platform (On-Premises)

    A command injection vulnerability was discovered in TeamViewer DEX Platform On-Premises (former 1E DEX Platform On-Premises) prior to version 9.2. Improper input validation allows authenticated users with at least questioner privileges to inject commands in s…

  • Medium 5.3

    protobufjs: Denial of service from crafted field names in generated code

    protobufjs compiles protobuf definitions into JavaScript (JS) functions. Prior to 7.5.6 and 8.0.2, protobufjs generated JavaScript property accessors from schema-controlled field and oneof names. Certain control characters in field names were not escaped befo…

  • Medium 6.0

    Improper Input Validation in OpenThread NAT64 Translator

    Improper Input Validation in the NAT64 translator in The OpenThread Authors OpenThread before commit 26a882d on all platforms allows an attacker on the adjacent IPv4 network to inject corrupted IPv6 packets into the Thread mesh or bypass security checks via c…

  • Medium 6.2

    CAI Content Credentials | Improper Input Validation (CWE-20)

    CAI Content Credentials versions c2pa-web@0.7.0, c2pa-v0.78.2 and earlier are affected by an Improper Input Validation vulnerability that could result in an application denial-of-service. An attacker could exploit this vulnerability to crash the application, …

  • Medium 6.2

    CAI Content Credentials | Improper Input Validation (CWE-20)

    CAI Content Credentials versions c2pa-web@0.7.0, c2pa-v0.78.2 and earlier are affected by an Improper Input Validation vulnerability that could result in an application denial-of-service. An attacker could exploit this vulnerability to crash the application, …

  • Medium 6.2

    CAI Content Credentials | Improper Input Validation (CWE-20)

    CAI Content Credentials versions c2pa-web@0.7.0, c2pa-v0.78.2 and earlier are affected by an Improper Input Validation vulnerability that could result in an application denial-of-service. An attacker could exploit this vulnerability to crash the application, …

  • Medium 6.2

    CAI Content Credentials | Improper Input Validation (CWE-20)

    CAI Content Credentials versions c2pa-web@0.7.0, c2pa-v0.78.2 and earlier are affected by an Improper Input Validation vulnerability that could result in an application denial-of-service. An attacker could exploit this vulnerability to crash the application, …