Input Validation / Unidentified Code Injection

Web and API


Unidentified code injection (CWE-94) is a type of input validation vulnerability that occurs when a web or API application fails to properly validate user input before sending it to a web server or database. This type of vulnerability allows malicious users to inject arbitrary code into the application, potentially allowing them to take control of the system or access confidential data. As defined in the CWE directory, "the software does not neutralize or incorrectly neutralizes special elements that could be interpreted as commands by a downstream component," which is what allows attackers to inject code into the application. Additionally, the OWASP Testing Guide states that "input validation should not rely on client side validation, such as JavaScript, as these can be bypassed."


This type of vulnerability can lead to serious security issues, such as data theft and the execution of malicious code. If the vulnerability is exploited, it can lead to a variety of different malicious activities, such as data theft, denial of service attacks, or even the unauthorized execution of malicious code. Furthermore, as attackers can inject code into the application, they can potentially gain access to sensitive information or even gain control of the system.


The first step in preventing this type of vulnerability is to ensure that all user input is properly validated. This can be done by using a whitelist of acceptable character sets, as well as using a combination of client-side and server-side validation. Additionally, input should also be sanitized before being sent to the web server or database. All output should also be properly encoded and escaped to prevent malicious code from being executed.

Curious? Convinced? Interested?

Arrange a no-obligation consultation with one of our product experts today.