目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1310

100%

CWE-116 对输出编码和转义不恰当 类漏洞列表 140

CWE-116 对输出编码和转义不恰当 类弱点 140 条 CVE 漏洞汇总,含 AI 中文分析。

CWE-116 属于输出编码或转义不当漏洞,指产品在向其他组件发送结构化消息时,未正确编码或转义数据,导致消息结构被破坏。攻击者常借此注入恶意命令,篡改预期逻辑以执行非法操作。开发者应避免此风险,需严格遵循上下文相关的编码规范,对输出数据进行彻底验证与转义,确保特殊字符被正确隔离,从而维持消息结构的完整性与安全性。

MITRE CWE 官方描述
CWE:CWE-116 输出编码或转义不当 英文:产品为与另一个组件通信而准备结构化消息,但数据的编码或转义缺失或执行不正确。结果,消息的预期结构未能得到保留。 编码或转义不当可能使攻击者能够更改发送给另一个组件的命令,并插入恶意命令。大多数产品遵循某种协议,该协议使用结构化消息在组件之间进行通信,例如查询或命令。这些结构化消息可以包含穿插着元数据或控制信息的原始数据。例如,“GET /index.html HTTP/1.1”是一个结构化消息,其中包含一个命令(“GET”)、一个参数(“/index.html”)以及关于正在使用的协议版本(“HTTP/1.1”)的元数据。如果应用程序使用攻击者提供的输入来构建结构化消息,而未进行适当的编码或转义,则攻击者可以插入特殊字符,导致数据被解释为控制信息或元数据。因此,接收输出的组件将执行错误的操作,或以其他错误的方式解释数据。
常见影响 (3)
IntegrityModify 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 ControlExecute 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.
ConfidentialityBypass 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.
缓解措施 (5)
Architecture and DesignUse a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, consider using the ESAPI Encoding control [REF-45] or a similar tool, library, or framework. These will help the programmer encode outputs in a manner less prone to error. Alternately, use built-in functions, but consider using wrappers in case t…
Architecture and DesignIf 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. For example, stored procedures can enforce database query structure and reduce the likel…
Architecture and Design, ImplementationUnderstand 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 e…
Architecture and DesignIn 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…
Architecture and DesignUse input validation as a defense-in-depth measure to reduce the likelihood of output encoding errors (see CWE-20).
代码示例 (2)
This code displays an email address that was submitted as part of a form.
<% String email = request.getParameter("email"); %> ... Email Address: <%= email %>
Bad · JSP
Consider a chat application in which a front-end web application communicates with a back-end server. The back-end is legacy code that does not perform authentication or authorization, so the front-end must implement it. The chat protocol supports two commands, SAY and BAN, although only administrators can use the BAN command. Each argument must be separated by a single space. The raw inputs are U…
$inputString = readLineFromFileHandle($serverFH); # generate an array of strings separated by the "|" character. @commands = split(/\|/, $inputString); foreach $cmd (@commands) { # separate the operator from its arguments based on a single whitespace ($operator, $args) = split(/ /, $cmd, 2); $args = UrlDecode($args); if ($operator eq "BAN") { ExecuteBan($args); } elsif ($operator eq "SAY") { ExecuteSay($args); } }
Bad · Perl
$inputString = GetUntrustedArgument("command"); ($cmd, $argstr) = split(/\s+/, $inputString, 2); # removes extra whitespace and also changes CRLF's to spaces $argstr =~ s/\s+/ /gs; $argstr = UrlEncode($argstr); if (($cmd eq "BAN") && (! IsAdministrator($username))) { die "Error: you are not the admin.\n"; } # communicate with file server using a file handle $fh = GetServerFileHandle("myserver"); print $fh "$cmd $argstr\n";
Bad · Perl
CVE ID标题CVSS风险等级Published
CVE-2025-48062 Discourse 安全漏洞 — discourse 7.1 High2025-06-09
CVE-2025-25029 IBM Security Guardium 安全漏洞 — Security Guardium 4.9 Medium2025-05-28
CVE-2021-25262 Yandex Browser 安全漏洞 — Browser 4.3AIMediumAI2025-05-21
CVE-2021-25254 Yandex Browser 安全漏洞 — Browser Lite 5.3AIMediumAI2025-05-21
CVE-2025-1308 Portworx Backup 安全漏洞 — PX Backup 6.5AIMediumAI2025-05-19
CVE-2025-47280 Umbraco Forms 安全漏洞 — Umbraco.Forms.Issues 4.7AIMediumAI2025-05-13
CVE-2025-32974 XWiki Platform 安全漏洞 — xwiki-platform 9.1 Critical2025-04-30
CVE-2025-24338 Bosch Rexroth ctrlX OS 安全漏洞 — ctrlX OS - Solutions 7.1 High2025-04-30
CVE-2025-46347 YesWiki 安全漏洞 — yeswiki 8.8AIHighAI2025-04-29
CVE-2025-31651 Apache Tomcat 安全漏洞 — Apache Tomcat 9.1AICriticalAI2025-04-28
CVE-2025-23377 Dell PowerProtect Data Manager Reporting 安全漏洞 — PowerProtect Data Manager 4.2 Medium2025-04-28
CVE-2025-32078 MediaWiki 安全漏洞 — Mediawiki - Version Compare Extension 6.1AIMediumAI2025-04-11
CVE-2025-32072 MediaWiki 安全漏洞 — Mediawiki Core - Feed Utils 6.5AIMediumAI2025-04-11
CVE-2025-32074 MediaWiki 安全漏洞 — Mediawiki - Confirm Account Extension 6.1AIMediumAI2025-04-11
CVE-2025-30657 Juniper Networks Junos OS 安全漏洞 — Junos OS 5.3 Medium2025-04-09
CVE-2025-30345 OpenSlides 安全漏洞 — OpenSlides 3.5 Low2025-03-21
CVE-2024-50629 Synology DiskStation Manager(DSM)和Synology BeeStation Manager 安全漏洞 — DiskStation Manager (DSM) 5.3 Medium2025-03-19
CVE-2024-10441 Synology DiskStation Manager(DSM)和Synology BeeStation Manager 安全漏洞 — DiskStation Manager (DSM) 9.8 Critical2025-03-19
CVE-2025-27109 solid 安全漏洞 — solid 7.3 High2025-02-21
CVE-2025-24025 Coolify 安全漏洞 — coolify 5.4 -2025-01-24
CVE-2024-56277 WordPress plugin Poll Maker 安全漏洞 — Poll Maker 5.3 Medium2025-01-21
CVE-2025-23207 KaTeX 安全漏洞 — KaTeX 6.3 Medium2025-01-17
CVE-2024-52005 Git 安全漏洞 — git 8.2 -2025-01-15
CVE-2024-50349 Git 安全漏洞 — git 8.8 -2025-01-14
CVE-2024-52006 Git 安全漏洞 — git 8.8 -2025-01-14
CVE-2024-9427 Koji 安全漏洞 5.4 Medium2024-12-24
CVE-2024-55663 XWiki Platform 安全漏洞 — xwiki-platform 8.8 -2024-12-12
CVE-2024-47845 MediaWiki 安全漏洞 — Mediawiki - CSS Extension 9.4 -2024-10-05
CVE-2024-47528 LibreNMS 代码问题漏洞 — librenms 4.8 -2024-10-01
CVE-2024-47531 Scout 安全漏洞 — scout 4.6 Medium2024-09-30

CWE-116(对输出编码和转义不恰当) 是常见的弱点类别,本平台收录该类弱点关联的 140 条 CVE 漏洞。