CWEweakness

CWE-80 Improper Neutralization of Script-Related HTML Tags in a Web Page

High Official page ↗
Alternate terms
Basic XSS
Abstraction
Variant
Structure
Simple
Status
Incomplete
Likelihood of exploit
High
Languages
Not Language-Specific
CWE version
5.0

Description

The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special characters such as "<", ">", and "&" that could be interpreted as web-scripting elements when they are sent to a downstream component that processes web pages.

Common consequences

• Confidentiality, Integrity, Availability: Read Application Data, Execute Unauthorized Code or Commands — An attacker could insert special characters that are processed client-side in the context of the user's session.

Potential mitigations

• [Implementation] Carefully check each input parameter against a rigorous positive specification (allowlist) defining the specific characters and format allowed. All input should be neutralized, not just parameters that the user is supposed to specify, but all data in the request, including hidden fields, cookies, headers, the URL itself, and so forth. A common mistake that leads to continuing XSS vulnerabilities is to validate only fields that are expected to be redisplayed by the site. We often encounter data from the request that is reflected by the application server or the application that the development team did not anticipate. Also, a field that is not currently reflected may be used by a future developer. Therefore, validating ALL parts of the HTTP request is recommended. • [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 browser to subtle XSS attacks. • [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.

Detection methods

• Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

Observed examples

• CVE-2002-0938: XSS in parameter in a link. • CVE-2002-1495: XSS in web-based email product via attachment filenames. • CVE-2003-1136: HTML injection in posted message. • CVE-2004-2171: XSS not quoted in error page.

Related

Attack pattern · CAPEC (4)

  • CAPEC-18 XSS Targeting Non-Script Elements attack pattern
  • CAPEC-193 PHP Remote File Inclusion attack pattern
  • CAPEC-32 XSS Through HTTP Query Strings attack pattern
  • CAPEC-86 XSS Through HTTP Headers attack pattern

Observed example · CVE (4)

  • CVE-2004-2171 Cross-site scripting (XSS) vulnerability in Cherokee before 0.4.8 allows remote attackers to inject arbitrary web script or HTML via the… vulnerability
  • CVE-2003-1136 Cross-site scripting (XSS) vulnerability in Chi Kien Uong Guestbook 1.51 allows remote attackers to inject arbitrary web script or HTML via… vulnerability
  • CVE-2002-1495 Cross-site scripting (XSS) vulnerability in JAWmail 1.0-rc1 allows remote attackers to insert arbitrary script or HTML via (1) attached… vulnerability
  • CVE-2002-0938 Cross-site scripting vulnerability in CiscoSecure ACS 3.0 allows remote attackers to execute arbitrary script or HTML as other web users… vulnerability

Child of · CWE (1)

  • CWE-79 Improper Neutralization of Input During Web Page Generation weakness

Referenced by CAPEC · weakness (4)

  • CAPEC-18 XSS Targeting Non-Script Elements attack pattern
  • CAPEC-193 PHP Remote File Inclusion attack pattern
  • CAPEC-32 XSS Through HTTP Query Strings attack pattern
  • CAPEC-86 XSS Through HTTP Headers attack pattern

Referenced by CVE · weakness (623)

  • CVE-2026-116402 Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) vulnerability in Brainstorm Force SureForms sureforms allows… vulnerability
  • CVE-2026-25467 Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) vulnerability in ThemeGrill User Registration… vulnerability
  • CVE-2026-42694 Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) vulnerability in Themeum Kirki kirki allows Code… vulnerability
  • CVE-2026-48202 Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) vulnerability in Brave Brave brave-popup-builder allows Code… vulnerability
  • CVE-2026-10511 The Jupiter X Core plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'forget_password_link' parameter in all… vulnerability
  • CVE-2026-116394 Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) vulnerability in Magepeople inc. vulnerability
  • CVE-2026-112945 Vite is a frontend tooling framework for JavaScript. vulnerability
  • CVE-2026-4418 IBM Cloud Pak System 2.3.6.0, and 2.3.6.1 is vulnerable to HTML injection. vulnerability
  • CVE-2026-106147 In Progress® Kendo® UI for jQuery releases starting with R1 2020 and prior to 2026.3.1015, the ListBox default item template renders the… vulnerability
  • CVE-2026-106148 In Progress® Kendo® UI for jQuery prior to 2026.3.1015, the TabStrip, Menu, and PanelBar components insert data source imageUrl values into… vulnerability
  • CVE-2026-106149 In Progress® Kendo® UI for jQuery prior to v2026.3.1015, the Menu component constructs HTML attributes from bound dataSource fields by… vulnerability
  • CVE-2026-106151 In Progress® Kendo® UI for jQuery versions starting with 2012.2.710 and prior to 2026.3.1015, the Validator decodes validation messages… vulnerability
  • CVE-2026-106157 In Progress® Kendo® UI for jQuery versions starting with 2019.2.514 and prior to 2026.3.1015, the PanelBar component inserts data source… vulnerability
  • CVE-2026-106158 In Progress® Kendo® UI for jQuery, in v2026.3.811 and earlier, the Scheduler Day, Timeline, Month, and Agenda views insert resource color… vulnerability
  • CVE-2026-106159 In Progress® Kendo® UI for jQuery versions starting with 2022.3.1109 and prior to 2026.3.1015, ToolBar ButtonGroup button URLs are… vulnerability
  • CVE-2026-106161 In Progress® Kendo® UI for jQuery releases starting with v2020.1.114 and prior to 2026.3.1015, the Badge text method renders string values… vulnerability
  • CVE-2026-106162 In Progress® Kendo® UI for jQuery versions starting with 2023.3.1010 and prior to 2026.3.1015, the FileManager component renders remotely… vulnerability
  • CVE-2026-106163 In Progress® Kendo® UI for jQuery versions starting with v2023.1.117 and prior to v2026.3.1015, the FileBrowser and ImageBrowser components… vulnerability
  • CVE-2023-54409 Frappe before 13.46.1 and 14.x before 14.20.0 contains a cross-site scripting vulnerability because the html2text function weakly sanitizes… vulnerability
  • CVE-2026-108925 Improper neutralization of Script-Related HTML tags in a web page (basic XSS) vulnerability in Cohesity NetBackup Administration Console… vulnerability
  • CVE-2026-106138 In Progress® KendoReact (@progress/kendo-react-charts) starting with version 1.1.0 and prior to 16.2.0, the default Chart tooltip renders… vulnerability
  • CVE-2026-106139 In Progress® Kendo UI for Vue (@progress/kendo-vue-charts) starting with version 2.5.0 and prior to 16.2.0, the default Chart tooltip… vulnerability
  • CVE-2026-105829 League CommonMark from 1.3.0 before 2.10.2 contains a cross-site scripting vulnerability that allows users posting Markdown to bypass the… vulnerability
  • CVE-2026-89290 Improper neutralization of Script-Related HTML tags in a web page (basic XSS) vulnerability in İzometri IT Services Domestic and Foreign… vulnerability
  • CVE-2026-103437 Improper neutralization of Script-Related HTML tags in a web page (basic XSS) vulnerability in The Wikimedia Foundation MediaWiki… vulnerability
  • CVE-2026-103438 Improper neutralization of Script-Related HTML tags in a web page (basic XSS) vulnerability in The Wikimedia Foundation MediaWiki… vulnerability
  • CVE-2026-103439 Improper neutralization of Script-Related HTML tags in a web page (basic XSS) vulnerability in The Wikimedia Foundation MediaWiki Wikbase… vulnerability
  • CVE-2026-103443 Improper neutralization of Script-Related HTML tags in a web page (basic XSS) vulnerability in The Wikimedia Foundation MediaWiki… vulnerability
  • CVE-2026-103444 Improper neutralization of Script-Related HTML tags in a web page (basic XSS) vulnerability in The Wikimedia Foundation MediaWiki WikiForum… vulnerability
  • CVE-2026-103445 Improper neutralization of Script-Related HTML tags in a web page (basic XSS) vulnerability in The Wikimedia Foundation MediaWiki… vulnerability
Show all 623 ›

Referenced by OWASP · mapped cwe (2)