Weakness · High

CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')

What it is

The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.

Likelihood of exploit: High12 exploited in the wildMITRE CWE 4.19.1

Severity (our rating)
High
Likelihood of exploit
High
Introduced during
Implementation
Exploited in the wild
12 known exploited CVEs

What an attacker can do

  • Read Application Data (Confidentiality)
  • Bypass Protection Mechanism (Access Control)
  • Alter Execution Logic (Other)
  • Other (Integrity, Other)
  • Hide Activities (Non-Repudiation)

How to prevent it

Requirements

  • Programming languages and supporting technologies might be chosen which are not subject to these issues.

Implementation

  • Utilize an appropriate mix of allowlist and denylist parsing to filter control-plane syntax from all input.

How to find it

  • Automated Static Analysis. Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

CWE-74 on MITRE's CWE site

Exploited in the wild: 12 CVEs

Vulnerabilities caused by CWE-74 that attackers have used, from CISA's Known Exploited Vulnerabilities catalog, newest first.

All known exploited vulnerabilities

H2 Security

Found it in your code?

We review where it appears, fix it with your team, and check it was not already used against you.

Talk to our team

T Academy

Stop writing it in the first place

Learn to build software and systems without weaknesses like this one, with practice on real hosts in your browser, every objective checked on the machine.

Start free

Source: MITRE Common Weakness Enumeration, CWE version 4.19.1. CWE is a trademark of The MITRE Corporation.