ClassDraft

CWE-116Improper Encoding or Escaping of Output

Category: other

Description

The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.

Common consequences· 3

  • Integrity — Modify Application Data
    The communications between components can be modified in unexpected ways. Unexpected commands can be executed, bypassing other security mechanisms. Incoming data can be misinterpreted.
  • Integrity / Confidentiality / Availability / Access Control — Execute Unauthorized Code or Commands
    The communications between components can be modified in unexpected ways. Unexpected commands can be executed, bypassing other security mechanisms. Incoming data can be misinterpreted.
  • Confidentiality — Bypass Protection Mechanism
    The communications between components can be modified in unexpected ways. Unexpected commands can be executed, bypassing other security mechanisms. Incoming data can be misinterpreted.

Potential mitigations· 5

  • [Architecture and Design]
  • [Architecture and Design]
  • [Architecture and Design, Implementation]Understand the context in which your data will be used and the encoding that will be expected. This is especially important when transmitting data between different components, or when generating outputs that can contain multiple encodings at the same time, such as web pages or multi-part mail messages. Study all expected communication protocols and data representations to determine the required encoding strategies.
  • [Architecture and Design]In some cases, input validation may be an important strategy when output encoding is not a complete solution. For example, you may be providing the same output that will be processed by multiple consumers that use different encodings or representations. In other cases, you may be required to allow user-supplied input to contain control information, such as limited HTML tags that support formatting in a wiki or bulletin board. When this type of requirement must be met, use an extremely strict allowlist to limit which control sequences can be used. Verify that the resulting syntactic structure is what you expect. Use your normal encoding methods for the remainder of the input.
  • [Architecture and Design]Use input validation as a defense-in-depth measure to reduce the likelihood of output encoding errors (see CWE-20).

Related CAPEC attack patterns· 4

CAPEC-104CAPEC-73CAPEC-81CAPEC-85

References

  1. https://cwe.mitre.org/data/definitions/116.html

Exploits (incoming)4

TypeTargetConfidenceTier
AttackPatternAJAX Footprintingcapec-85100%live
AttackPatternUser-Controlled Filenamecapec-73100%live
AttackPatternWeb Server Logs Tamperingcapec-81100%live
AttackPatternCross Zone Scriptingcapec-104100%live

(incoming)33

TypeTargetConfidenceTier
VulnerabilityCVE-2025-11713cve-2025-117130%live
VulnerabilityCVE-2025-31651cve-2025-316510%live
VulnerabilityCVE-2025-32974cve-2025-329740%live
VulnerabilityCVE-2025-40547cve-2025-405470%live
VulnerabilityCVE-2025-46347cve-2025-463470%live
VulnerabilityCVE-2025-49013cve-2025-490130%live
VulnerabilityCVE-2025-55729cve-2025-557290%live
VulnerabilityCVE-2025-55730cve-2025-557300%live
VulnerabilityCVE-2025-55903cve-2025-559030%live
VulnerabilityCVE-2025-56266cve-2025-562660%live
VulnerabilityCVE-2025-59158cve-2025-591580%live
VulnerabilityCVE-2025-59936cve-2025-599360%live
VulnerabilityCVE-2025-61773cve-2025-617730%live
VulnerabilityCVE-2025-64325cve-2025-643250%live
VulnerabilityCVE-2026-22792cve-2026-227920%live
VulnerabilityCVE-2026-24737cve-2026-247370%live
VulnerabilityCVE-2026-25755cve-2026-257550%live
VulnerabilityCVE-2026-25940cve-2026-259400%live
VulnerabilityCVE-2026-27169cve-2026-271690%live
VulnerabilityCVE-2026-27812cve-2026-278120%live
VulnerabilityCVE-2026-28907cve-2026-289070%live
VulnerabilityCVE-2026-32754cve-2026-327540%live
VulnerabilityCVE-2026-33301cve-2026-333010%live
VulnerabilityCVE-2026-33941cve-2026-339410%live
VulnerabilityCVE-2026-35569cve-2026-355690%live
VulnerabilityCVE-2026-35582cve-2026-355820%live
VulnerabilityCVE-2026-40568cve-2026-405680%live
VulnerabilityCVE-2026-42810cve-2026-428100%live
VulnerabilityCVE-2026-43938cve-2026-439380%live
VulnerabilityCVE-2026-45375cve-2026-453750%live

Showing top 30 of 33 by confidence. Click any target to see the full neighbourhood.

Related by meaning· 6

Nearest entities by semantic similarity across the cs-graph corpus.

CWE
Inappropriate Encoding for Output Context
CWE
Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
CWE
Improper Handling of Alternate Encoding
CWE
Improper Neutralization
CWE
Improper Neutralization of Expression/Command Delimiters
CWE
Improper Neutralization of Escape, Meta, or Control Sequences
Sourced from MITRE CWE 4.20. Curated for EU compliance use cases by Adam Lundqvist, Founder at SQUR.