Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CWE-79 (在Web页面生成时对输入的转义处理不恰当(跨站脚本)) — Vulnerability Class 21615

21615 vulnerabilities classified as CWE-79 (在Web页面生成时对输入的转义处理不恰当(跨站脚本)). AI Chinese analysis included.

CWE-79 represents a critical input validation weakness where software fails to properly sanitize user-supplied data before rendering it in web pages. Attackers typically exploit this vulnerability by injecting malicious scripts, often JavaScript, into trusted websites. When other users view the compromised page, the embedded code executes in their browsers, allowing the attacker to steal session cookies, hijack accounts, or redirect victims to phishing sites. This breach of trust undermines user privacy and application integrity. To prevent such attacks, developers must implement robust input validation and output encoding strategies. By strictly filtering incoming data and ensuring that all dynamic content is properly escaped before being processed by the browser, developers can neutralize dangerous inputs and effectively mitigate the risk of cross-site scripting vulnerabilities.

MITRE CWE Description
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. There are many variants of cross-site scripting, characterized by a variety of terms or involving different attack topologies. However, they all indicate the same fundamental weakness: improper neutralization of dangerous input between the adversary and a victim.
Common Consequences (3)
Access Control, ConfidentialityBypass Protection Mechanism, Read Application Data
The most common attack performed with cross-site scripting involves the disclosure of private information stored in user cookies, such as session information. Typically, a malicious user will craft a client-side script, which -- when parsed by a web browser -- performs some activity on behalf of the…
Integrity, Confidentiality, AvailabilityExecute Unauthorized Code or Commands
In some circumstances it may be possible to run arbitrary code on a victim's computer when cross-site scripting is combined with other flaws, for example, "drive-by hacking."
Confidentiality, Integrity, Availability, Access ControlExecute Unauthorized Code or Commands, Bypass Protection Mechanism, Read Application Data
The consequence of an XSS attack is the same regardless of whether it is stored or reflected. The difference is in how the payload arrives at the server. XSS can cause a variety of problems for the end user that range in severity from an annoyance to complete account compromise. Some cross-site scri…
Mitigations (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 [REF-1482]. Examples of libraries and frameworks that make it easier to generate properly encoded output include Microsoft's Anti-XSS library, the OWASP ESAPI Encoding module, and Apache Wicket.
Implementation, Architecture and DesignUnderstand 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 Design, ImplementationUnderstand all the potential areas where untrusted inputs can enter your software: parameters or arguments, cookies, anything read from the network, environment variables, reverse DNS lookups, query results, request headers, URL components, e-mail, files, filenames, databases, and any external systems that provide data to the application. Remember that such inputs may be obtained indirectly throug…
Effectiveness: Limited
Architecture and DesignFor any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
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.
Examples (2)
The following code displays a welcome message on a web page based on the HTTP GET username parameter (covers a Reflected XSS (Type 1) scenario).
$username = $_GET['username']; echo '<div class="header"> Welcome, ' . $username . '</div>';
Bad · PHP
http://trustedSite.example.com/welcome.php?username=<Script Language="Javascript">alert("You've been attacked!");</Script>
Attack
The following code displays a Reflected XSS (Type 1) scenario.
<% String eid = request.getParameter("eid"); %> ... Employee ID: <%= eid %>
Bad · JSP
<% protected System.Web.UI.WebControls.TextBox Login; protected System.Web.UI.WebControls.Label EmployeeID; ... EmployeeID.Text = Login.Text; %> <p><asp:label id="EmployeeID" runat="server" /></p>
Bad · ASP.NET
CVE IDTitleCVSSSeverityPublished
CVE-2016-9130 Revive Adserver 跨站脚本漏洞 — Revive Adserver All versions before 3.2.3 5.4 -2017-03-28
CVE-2016-9454 Revive Adserver 跨站脚本漏洞 — Revive Adserver All versions before 3.2.3 5.4 -2017-03-28
CVE-2016-9457 Revive Adserver 跨站脚本漏洞 — Revive Adserver All versions before 3.2.3 4.8 -2017-03-28
CVE-2016-9465 Nextcloud Server和ownCloud Server 跨站脚本漏洞 — Nextcloud Server & ownCloud Server Nextcloud Server before 10.0.1 & ownCloud Server before 9.0.6 and 9.1.2 5.4 -2017-03-28
CVE-2016-9466 ownCloud Server和Nextcloud Server 跨站脚本漏洞 — Nextcloud Server & ownCloud Server Nextcloud Server before 10.0.1 & ownCloud Server before 9.0.6 and 9.1.2 6.1 -2017-03-28
CVE-2016-9470 Revive Adserver 安全漏洞 — Revive Adserver All versions before 3.2.5 and 4.0.0 8.8 -2017-03-28
CVE-2016-9472 Revive Adserver 跨站脚本漏洞 — Revive Adserver All versions before 3.2.5 and 4.0.0 6.1 -2017-03-28
CVE-2017-2683 Siemens RUGGEDCOM NMS 跨站脚本漏洞 — RUGGEDCOM NMS All versions < V2.1 (Windows and Linux) 8.2 -2017-02-27
CVE-2014-5408 Nordex NC2 Cross-site Scripting — Nordex Control 2 (NC2) SCADA 6.1 -2014-11-05
CVE-2014-5411 Schneider Electric SCADA Expert ClearSCADA Cross-site Scripting — ClearSCADA 5.4 -2014-09-18
CVE-2014-5397 Schneider Electric Wonderware Cross-site Scripting — Wonderware Information Server Portal 6.1 -2014-08-28
CVE-2014-2370 Omron NS Series HMI Improper Neutralization of Input During Web Page Generation — NS15 5.4 -2014-07-24
CVE-2011-2920 Spacewalk: spacewalk: cross-site scripting vulnerability allows arbitrary web script execution. — Red Hat Enterprise Linux 6 5.5 Medium2014-02-05
CVE-2011-2927 Spacewalk: spacewalk and red hat network satellite: cross-site scripting vulnerability via search forms — Red Hat Enterprise Linux 6 5.4 Medium2014-02-05
CVE-2011-3344 Spacewalk: spacewalk: cross-site scripting via uri in lookup login/password form — Red Hat Enterprise Linux 6 5.4 Medium2014-02-05

Vulnerabilities classified as CWE-79 (在Web页面生成时对输入的转义处理不恰当(跨站脚本)) represent 21615 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.