CWE-79: Improper Neutralization of Input During Web Page Generation
48900 CVEs have CWE-79 as their primary weakness. 32 of them are in the CISA KEV catalog. The highest EPSS score among them is 99.215%.
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.
Child of CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component
Mitigations
- Architecture and Design: Use 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 Design: 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. For any data that will be output to another web page, especially any data that was received from external inputs, use the appropriate encoding on all non-alphanumeric characters. Parts of the same output document may require different encodings, which will vary depending on whether the output is in the: HTML body Element attributes (such as src=XYZ) URIs JavaScript sections Cascading Style Sheets and style property etc. Note that HTML Entity Encoding is only appropriate for the HTML body. Consult the XSS Prevention Cheat Sheet…
- Architecture and Design Implementation: Understand 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 through API calls.
- Architecture and Design: For 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 Design: 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.
- Implementation: Use and specify an output encoding that can be handled by the downstream component that is reading the output. Common encodings include ISO-8859-1, UTF-7, and UTF-8. When an encoding is not specified, a downstream component may choose a different encoding, either by assuming a default encoding or automatically inferring which encoding is being used, which can be erroneous. When the encodings are inconsistent, the downstream component might treat some character or byte sequences as special, even if they are not special in the original encoding. Attackers might then be able to exploit this discrepancy and conduct injection attacks; they even might be able to bypass protection mechanisms that assume the original encoding is also being used by the downstream component. The problem of inconsistent output encodings often arises in web pages. If an encoding is not specified in an HTTP header, web browsers often guess about which encoding is being used. This can open up the…
- Implementation: With Struts, write all data from form beans with the bean's filter attribute set to true.
- Implementation: To help mitigate XSS attacks against the user's session cookie, set the session cookie to be HttpOnly. In browsers that support the HttpOnly feature (such as more recent versions of Internet Explorer and Firefox), this attribute can prevent the user's session cookie from being accessible to malicious client-side scripts that use document.cookie. This is not a complete solution, since HttpOnly is not supported by all browsers. More importantly, XmlHttpRequest and other powerful browser technologies provide read access to HTTP headers, including the Set-Cookie header in which the HttpOnly flag is set.
- Implementation: Assume all input is malicious. Use an accept known good input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, boat may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as red or blue. Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However,…
- Architecture and Design: When the set of acceptable objects, such as filenames or URLs, is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames or URLs, and reject all other inputs.
- Operation: Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth [REF-1481].
- Operation Implementation: When using PHP, configure the application so that it does not use register_globals. During implementation, develop the application so that it does not rely on this feature, but be wary of implementing a register_globals emulation that is subject to weaknesses such as CWE-95, CWE-621, and similar issues.
Observed examples
- CVE-2024-49038: XSS in AI assistant
- CVE-2024-54142: Plugin that enables AI features allows input with html entities, leading to XSS
- CVE-2021-25926: Python Library Manager did not sufficiently neutralize a user-supplied search term, allowing reflected XSS.
- CVE-2021-25963: Python-based e-commerce platform did not escape returned content on error pages, allowing for reflected Cross-Site Scripting attacks.
- CVE-2021-1879: Universal XSS in mobile operating system, as exploited in the wild per CISA KEV.
- CVE-2020-3580: Chain: improper input validation (CWE-20) in firewall product leads to XSS (CWE-79), as exploited in the wild per CISA KEV.
- CVE-2014-8958: Admin GUI allows XSS through cookie.
- CVE-2017-9764: Web stats program allows XSS through crafted HTTP header.
- CVE-2014-5198: Web log analysis product allows XSS through crafted HTTP Referer header.
- CVE-2008-5080: Chain: protection mechanism failure allows XSS
- CVE-2006-4308: Chain: incomplete denylist (CWE-184) only checks javascript: tag, allowing XSS (CWE-79) using other tags
- CVE-2007-5727: Chain: incomplete denylist (CWE-184) only removes SCRIPT tags, enabling XSS (CWE-79)
- CVE-2008-5770: Reflected XSS using the PATH_INFO in a URL
- CVE-2008-4730: Reflected XSS not properly handled when generating an error message
- CVE-2008-5734: Reflected XSS sent through email message.
- CVE-2008-0971: Stored XSS in a security product.
- CVE-2008-5249: Stored XSS using a wiki page.
- CVE-2006-3568: Stored XSS in a guestbook application.
- CVE-2006-3211: Stored XSS in a guestbook application using a javascript: URI in a bbcode img tag.
- CVE-2006-3295: Chain: library file is not protected against a direct request (CWE-425), leading to reflected XSS (CWE-79).
Top released CVEs
KEV first, then the highest EPSS score, the highest CVSS score and the newest.
| CVE | Published | Severity | CVSS | EPSS | Description |
|---|---|---|---|---|---|
| CVE-2019-3929 | 2019-04-30 | CRITICAL | 9.8 | 98.952% | The Crestron AM-100 firmware 1.6.0.2, Crestron AM-101 firmware 2.7.0.1, Barco wePresent WiPG-1000P firmware 2.3.0.10, Barco wePresent WiPG-1600W before… |
| CVE-2020-3580 | 2020-10-21 | MEDIUM | 6.1 | 85.575% | Multiple vulnerabilities in the web services interface of Cisco Adaptive Security Appliance (ASA) Software and Cisco Firepower Threat Defense (FTD) Software… |
| CVE-2020-11023 | 2020-04-29 | MEDIUM | 6.9 | 84.887% | In jQuery versions greater than or equal to 1.0.3 and before 3.5.0, passing HTML containing <option> elements from untrusted sources - even after sanitizing it… |
| CVE-2024-42009 | 2024-08-05 | CRITICAL | 9.3 | 82.882% | A Cross-Site Scripting vulnerability in Roundcube through 1.5.7 and 1.6.x through 1.6.7 allows a remote attacker to steal and send emails of a victim via a… |
| CVE-2023-34192 | 2023-07-06 | CRITICAL | 9.0 | 77.266% | Cross Site Scripting vulnerability in Zimbra ZCS v.8.8.15 allows a remote authenticated attacker to execute arbitrary code via a crafted script to the… |
| CVE-2020-13965 | 2020-06-09 | MEDIUM | 6.1 | 76.596% | An issue was discovered in Roundcube Webmail before 1.3.12 and 1.4.x before 1.4.5. There is XSS via a malicious XML attachment because text/xml is among the… |
| CVE-2023-5631 | 2023-10-18 | MEDIUM | 6.1 | 76.337% | Roundcube before 1.4.15, 1.5.x before 1.5.5, and 1.6.x before 1.6.4 allows stored XSS via an HTML e-mail message with a crafted SVG document because of… |
| CVE-2024-37383 | 2024-06-07 | MEDIUM | 6.1 | 73.995% | Roundcube Webmail before 1.5.7 and 1.6.x before 1.6.7 allows XSS via SVG animate attributes. |
| CVE-2019-9978 | 2019-03-24 | MEDIUM | 6.1 | 72.946% | The social-warfare plugin before 3.5.3 for WordPress has stored XSS via the wp-admin/admin-post.php?swp_debug=load_options swp_url parameter, as exploited in… |
| CVE-2026-42897 | 2026-05-14 | HIGH | 8.1 | 70.662% | Improper neutralization of input during web page generation ('cross-site scripting') in Microsoft Exchange Server allows an unauthorized attacker to perform… |
| CVE-2019-18426 | 2020-01-21 | HIGH | 8.2 | 68.082% | A vulnerability in WhatsApp Desktop versions prior to 0.3.9309 when paired with WhatsApp for iPhone versions prior to 2.20.10 allows cross-site scripting and… |
| CVE-2023-43770 | 2023-09-22 | MEDIUM | 6.1 | 63.660% | Roundcube before 1.4.14, 1.5.x before 1.5.4, and 1.6.x before 1.6.3 allows XSS via text/plain e-mail messages with crafted links because of… |
| CVE-2013-5223 | 2013-11-15 | MEDIUM | 5.4 | 50.833% | Multiple cross-site scripting (XSS) vulnerabilities in D-Link DSL-2760U Gateway (Rev. E1) allow remote authenticated users to inject arbitrary web script or… |
| CVE-2023-37580 | 2023-07-31 | MEDIUM | 6.1 | 49.083% | Zimbra Collaboration (ZCS) 8 before 8.8.15 Patch 41 allows XSS in the Zimbra Classic Web Client. |
| CVE-2021-26829 | 2021-06-11 | MEDIUM | 5.4 | 47.836% | OpenPLC ScadaBR through 0.9.1 on Linux and through 1.12.4 on Windows allows stored XSS via system_settings.shtm. |
| CVE-2024-43573 | 2024-10-08 | MEDIUM | 6.5 | 46.109% | Windows MSHTML Platform Spoofing Vulnerability |
| CVE-2022-39197 | 2022-09-22 | MEDIUM | 6.1 | 44.145% | An XSS (Cross Site Scripting) vulnerability was found in HelpSystems Cobalt Strike through 4.7 that allowed a remote attacker to execute HTML on the Cobalt… |
| CVE-2024-11182 | 2024-11-15 | MEDIUM | 6.1 | 33.494% | An XSS issue was discovered in MDaemon Email Server before version 24.5.1c. An attacker can send an HTML e-mail message with JavaScript in an img tag. This… |
| CVE-2020-35730 | 2020-12-28 | MEDIUM | 6.1 | 30.944% | An XSS issue was discovered in Roundcube Webmail before 1.2.13, 1.3.x before 1.3.16, and 1.4.x before 1.4.10. The attacker can send a plain text e-mail… |
| CVE-2018-19953 | 2020-10-28 | MEDIUM | 6.1 | 30.527% | If exploited, this cross-site scripting vulnerability could allow remote attackers to inject malicious code. QNAP has already fixed the issue in the following… |
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cwe_lookup/CWE-79'curl 'https://api.contrastcyber.com/cve_search?cwe_id=CWE-79'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).