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

What is CWE-74?

MITRE CWE

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.

CyStack is analyzing this CWE entry. The page will update automatically when the bilingual analysis is ready.

Official definition

MITRE CWE

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.

Detailed description

CyStack is analyzing this CWE entry. The page will update automatically when the bilingual analysis is ready.

Characteristics

CyStack is analyzing this CWE entry. The page will update automatically when the bilingual analysis is ready.

Modes of introduction

  • Implementation: REALIZATION: This weakness is caused during implementation of an architectural security tactic.

Common consequences

CyStack is analyzing this CWE entry. The page will update automatically when the bilingual analysis is ready.
  • Confidentiality

    Read Application Data

    Many injection attacks involve the disclosure of important information -- in terms of both data sensitivity and usefulness in further exploitation.

  • Access Control

    Bypass Protection Mechanism

    In some cases, injectable code controls authentication; this may lead to a remote vulnerability.

  • Other

    Alter Execution Logic

    Injection attacks are characterized by the ability to significantly change the flow of a given process, and in some cases, to the execution of arbitrary code.

  • Integrity, Other

    Other

    Data injection attacks lead to loss of data integrity in nearly all cases as the control-plane data injected is always incidental to data recall or writing.

  • Non-Repudiation

    Hide Activities

    Often the actions performed by injected control code are unlogged.

Mitigations

CyStack is analyzing this CWE entry. The page will update automatically when the bilingual analysis is ready.
  • RequirementsProgramming languages and supporting technologies might be chosen which are not subject to these issues.
  • ImplementationUtilize an appropriate mix of allowlist and denylist parsing to filter control-plane syntax from all input.

Detection methods

CyStack is analyzing this CWE entry. The page will update automatically when the bilingual analysis is ready.
  • Automated Static AnalysisAutomated 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.)Effectiveness: High

Representative vulnerabilities

CyStack is analyzing this CWE entry. The page will update automatically when the bilingual analysis is ready.

These examples illustrate this CWE entry and are not an exhaustive list of related vulnerabilities.

  • CVE-2024-5184API service using a large generative AI model allows direct prompt injection to leak hard-coded system prompts or execute other prompts.
  • CVE-2022-36069Python-based dependency management tool avoids OS command injection when generating Git commands but allows injection of optional arguments with input beginning with a dash (CWE-88), potentially allowing for code execution.
  • CVE-1999-0067Canonical example of OS command injection. CGI program does not neutralize "|" metacharacter when invoking a phonebook program.
  • CVE-2022-1509injection of sed script syntax ("sed injection")
  • CVE-2020-9054Chain: improper input validation (CWE-20) in username parameter, leading to OS command injection (CWE-78), as exploited in the wild per CISA KEV.
  • CVE-2021-44228Product does not neutralize ${xyz} style expressions, allowing remote code execution. (log4shell vulnerability)

Sources and references

References

CWE™ Program, operated by The MITRE Corporation. Copyright © 2006–2026, The MITRE Corporation. The MITRE Corporation hereby grants you a non-exclusive, royalty-free license to use CWE for research, development, and commercial purposes. CWE Terms of Use.

Learn more

Run an in-depth assessment with complete web risk management

CyStack VulnScan continuously discovers assets, validates vulnerabilities, and helps security teams prioritize remediation across the organization.

Explore CyStack VulnScan
CyStack VulnScan dashboard