CWE · MITRE source
CWE-116Improper Encoding or Escaping of Output
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.
Improper encoding or escaping can allow attackers to change the commands that are sent to another component, inserting malicious commands instead. Most products follow a certain protocol that uses structured messages for communication between components, such as queries or commands. These structured messages can contain raw data interspersed with metadata or control information. For example, "GET /index.html HTTP/1.1" is a structured message containing a command ("GET") with a single argument ("/index.html") and metadata about which protocol version is being used ("HTTP/1.1"). If an application uses attacker-supplied inputs to construct a structured message without properly encoding or escaping, then the attacker could insert special characters that will cause the data to be interpreted as control information or metadata. Consequently, the component that receives the output will perform the wrong operations, or otherwise interpret the data incorrectly.
Last updated: 09 May 2026 03:25 UTC
NIST 800-53 r5 controls that address this weakness (1)AI
| Control | Title | Family | Why it addresses this CWE |
|---|---|---|---|
SI-15 | Information Output Filtering | SI | Validating that output matches expected content directly mitigates failures to properly encode or escape data for its destination context. |
Top CVEs of this weakness type, ranked by Risk Priority
| CVE | Risk | CVSS | EPSS | Published |
|---|---|---|---|---|
CVE-2024-38475 KEV | 9.4 | 9.1 | 0.9378 | 2024-07-01 |
CVE-2022-24682 KEV | 8.5 | 6.1 | 0.8797 | 2022-02-09 |
CVE-2022-36446 | 7.5 | 9.8 | 0.9293 | 2022-07-25 |
CVE-2024-38473 | 6.9 | 8.1 | 0.8836 | 2024-07-01 |
CVE-2021-31806 | 6.4 | 6.5 | 0.8518 | 2021-05-27 |
CVE-2022-30781 | 6.3 | 7.5 | 0.8073 | 2022-05-16 |
CVE-2024-1874 | 5.7 | 9.4 | 0.6338 | 2024-04-29 |
CVE-2013-4547 | 5.5 | 0.0 | 0.9092 | 2013-11-23 |
CVE-2025-60787 | 5.4 | 7.2 | 0.6529 | 2025-10-03 |
CVE-2022-42948 KEV | 5.3 | 9.8 | 0.2182 | 2023-03-24 |
CVE-2024-39929 | 4.7 | 5.4 | 0.6031 | 2024-07-04 |
CVE-2023-32071 | 4.6 | 9.0 | 0.4678 | 2023-05-09 |
CVE-2022-41934 | 3.4 | 9.9 | 0.2362 | 2022-11-23 |
CVE-2022-36099 | 3.3 | 9.9 | 0.2170 | 2022-09-08 |
CVE-2018-8609 | 3.0 | 8.8 | 0.2028 | 2018-11-14 |
CVE-2020-24972 | 3.0 | 8.8 | 0.2134 | 2020-08-29 |
CVE-2022-25235 | 2.8 | 9.8 | 0.1332 | 2022-02-16 |
CVE-2023-26472 | 2.6 | 9.9 | 0.1031 | 2023-03-02 |
CVE-2017-8303 | 2.5 | 9.8 | 0.0964 | 2017-05-05 |
CVE-2022-36100 | 2.5 | 9.9 | 0.0828 | 2022-09-08 |
CVE-2025-56266 | 2.4 | 9.8 | 0.0713 | 2025-09-08 |
CVE-2019-0857 | 2.3 | 6.5 | 0.1638 | 2019-04-09 |
CVE-2019-11325 | 2.2 | 9.8 | 0.0469 | 2019-11-21 |
CVE-2021-28940 | 2.2 | 9.8 | 0.0458 | 2021-04-02 |
CVE-2022-35153 | 2.2 | 9.8 | 0.0442 | 2022-08-18 |