Improper Encoding or Escaping of Output (CWE-116)
CWE-116, Improper Encoding or Escaping of Output, is the MITRE CWE entry for weaknesses in which 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. The database tracks 5 CVE records mapped to CWE-116, and 5 of them are in the CISA Known Exploited Vulnerabilities catalog.
Updated
About CWE-116
MITRE lists these common consequences: Modify Application Data, Execute Unauthorized Code or Commands, Bypass Protection Mechanism, affecting integrity, confidentiality, availability, access control.
- MITRE name
- Improper Encoding or Escaping of Output
- Abstraction
- Class: a very abstract weakness, typically independent of language or technology
- Status
- Draft
Also Known As
- Output Sanitization
- Output Validation
- Output Encoding
Mitigations
- Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
- If available, use structured mechanisms that automatically enforce the separation between data and code. These mechanisms may be able to provide the relevant quoting, encoding, and validation automatically, instead of relying on the developer to provide this capability at every point where output is generated.
- 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.
- 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.
Detection
MITRE lists these detection methods: Automated Static Analysis (moderate), Automated Dynamic Analysis.
CWE-116 in the KEV Catalog
as of 2026-11-22- 5 CISA KEV entries name Improper Encoding or Escaping of Output (CWE-116) in their CVE record, tied for 49th among the 196 weaknesses named in the catalog.
- CISA added 0 CWE-116 entries to the KEV catalog in 2024, 1 in 2025, and 2 so far in 2026.
Related Attack Patterns
4 CAPEC patternsCAPEC-73User-Controlled FilenameStandard · Severity High · Likelihood High
Loading…
CAPEC-104Cross Zone ScriptingStandard · Severity High · Likelihood Medium
Loading…
CAPEC-81Web Server Logs TamperingDetailed · Severity High · Likelihood Medium
Loading…
CAPEC-85AJAX FootprintingDetailed · Severity Low · Likelihood High
Loading…
CWE-116 Vulnerabilities
5 CVEs| CVE | Title | Vendor | CVSS | EPSS | KEV | Published |
|---|---|---|---|---|---|---|
| CVE-2024-10441KEV Synology DiskStation Manager (DSM) Improper Encoding or Escaping of Output Vulnerability | Synology DiskStation Manager (DSM) Improper Encoding or Escaping of Output Vulnerability | Synology | 9.8 | 3.1% | KEV | 2025-03-19 |
| CVE-2026-20245KEV Cisco Catalyst SD-WAN Controller Authenticated Privilege Escalation Vulnerability | Cisco Catalyst SD-WAN Controller Authenticated Privilege Escalation Vulnerability | Cisco | 7.8 | 25.3% | KEV | 2026-06-04 |
| CVE-2024-38475KEV Apache HTTP Server weakness in mod_rewrite when first segment of substitution matches filesystem path. | Apache HTTP Server weakness in mod_rewrite when first segment of substitution matches filesystem path. | Apache Software Foundation | 9.1 | 99.957% | KEV | 2024-07-01 |
| CVE-2022-42948KEV Fortra Cobalt Strike User Interface Remote Code Execution Vulnerability | Fortra Cobalt Strike User Interface Remote Code Execution Vulnerability | - | 9.8 | 2.7% | KEV | 2023-03-24 |
| CVE-2022-24682KEV Synacor Zimbra Collaborate Suite (ZCS) Cross-Site Scripting Vulnerability | Synacor Zimbra Collaborate Suite (ZCS) Cross-Site Scripting Vulnerability | - | 6.1 | 30.9% | KEV | 2022-02-09 |
Frequently Asked Questions
What is CWE-116?→
CWE-116 (Improper Encoding or Escaping of Output) is a MITRE CWE entry. 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.
How many exploited vulnerabilities are classified as CWE-116?→
This database lists 5 CVE records mapped to CWE-116 by their CVE Numbering Authority. 5 of them are in the CISA Known Exploited Vulnerabilities catalog, and CISA links 1 to known ransomware campaigns. Examples include CVE-2024-10441, CVE-2026-20245, CVE-2024-38475.
Weakness description, consequences, and mitigations from the CWE List, © The MITRE Corporation, used under the CWE Terms of Use. CWE mappings come from each CVE record's CNA. Exploited-in-the-wild data from the CISA KEV catalog (CC0). This site is not affiliated with or endorsed by MITRE or CISA. Attack patterns from CAPEC 3.9, © The MITRE Corporation, used under the CAPEC Terms of Use.