Skip to content
OpenAdvisories

Weakness (CWE)

CWE-79: Cross-site Scripting

Base Improper Neutralization of Input During Web Page Generation

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.

How to prevent it (8 mitigations)
  1. 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.

  2. 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 [REF-724] for more details on the types of encoding and escaping that are needed.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. Implementation

    With Struts, write all data from form beans with the bean's filter attribute set to true.

  8. 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.

Source: MITRE CWE-79

591 results · Clear filters · Feed

  • Critical 9.3

    XSS in csvimport in 3.0.0-beta versions

    Combodo iTop is a web based IT Service Management tool. In versions prior to 3.0.0-beta6 the export CSV page don't properly escape the user supplied parameters, allowing for javascript injection into rendered csv files. Users are advised to upgrade. There are…

  • Critical 9.6

    Cross Site Scripting in Wire Webapp

    wire-webapp is the web application interface for the wire messaging service. Insufficient escaping in markdown “code highlighting” in the wire-webapp resulted in the possibility of injecting and executing arbitrary HTML code and thus also JavaScript. If a use…

  • Critical 9.1

    Stored Cross Site Scripting vulnerability in Item name parameter in snipe/snipe-it

    Stored Cross Site Scripting vulnerability in Item name parameter in GitHub repository snipe/snipe-it prior to v5.4.3. The vulnerability is capable of stolen the user Cookie.

  • Critical 9.3

    XSS via Embedded SVG in SVG Diagram Format in plantuml/plantuml

    XSS via Embedded SVG in SVG Diagram Format in GitHub repository plantuml/plantuml prior to 1.2022.4. Stored XSS in the context of the diagram embedder. Depending on the actual context, this ranges from stealing secrets to account hijacking or even to code exe…

  • Critical 9.6

    Stored XSS in the "Username" & "Email" input fields leads to account takeover of Admin & Co-admin users in causefx/organizr

    Stored XSS in the "Username" & "Email" input fields leads to account takeover of Admin & Co-admin users in GitHub repository causefx/organizr prior to 2.1.1810. Account takeover and privilege escalation

  • Critical 9.0

    Multiple Stored XSS in causefx/organizr

    Multiple Stored XSS in GitHub repository causefx/organizr prior to 2.1.1810. This allows attackers to execute malicious scripts in the user's browser and it can lead to session hijacking, sensitive data exposure, and worse.

  • Critical 9.0

    Stored XSS due to no sanitization in the filename in causefx/organizr

    Stored XSS due to no sanitization in the filename in GitHub repository causefx/organizr prior to 2.1.1810. This allows attackers to execute malicious scripts in the user's browser and it can lead to session hijacking, sensitive data exposure, and worse.

  • Critical 9.4

    stored xss due to unsantized anchor url in alvarotrigo/fullpage.js

    stored xss due to unsantized anchor url in GitHub repository alvarotrigo/fullpage.js prior to 4.0.4. stored xss .

  • Critical 9.0

    Stored XSS in "Name", "Group Name" & "Title" in polonel/trudesk

    Stored XSS in "Name", "Group Name" & "Title" in GitHub repository polonel/trudesk prior to v1.2.0. This allows attackers to execute malicious scripts in the user's browser and it can lead to session hijacking, sensitive data exposure, and worse.

  • Critical 9.8
    CVE-2022-28368 Public exploit EPSS 84%

    Remote code injection in dompdf/dompdf

    Dompdf 1.2.1 allows remote code execution via a .php file in the src:url field of an @font-face Cascading Style Sheets (CSS) statement (within an HTML input file).

  • Critical 9.8

    Arbitrary Code Execution

    The package post-loader from 0.0.0 are vulnerable to Arbitrary Code Execution which uses a markdown parser in an unsafe way so that any javascript code inside the markdown input files gets evaluated and executed.

  • Critical 9.0

    Stored XSS viva .ofd file upload in star7th/showdoc

    Stored XSS viva .ofd file upload in GitHub repository star7th/showdoc prior to 2.10.4.

  • Critical 9.4

    Stored XSS due to Unrestricted File Upload in star7th/showdoc

    Stored XSS due to Unrestricted File Upload in GitHub repository star7th/showdoc prior to 2.10.4.

  • Critical 9.0

    Stored XSS viva axd and cshtml file upload in star7th/showdoc in star7th/showdoc

    Stored XSS viva axd and cshtml file upload in star7th/showdoc in GitHub repository star7th/showdoc prior to v2.10.4.

  • Critical 9.0

    Stored XSS viva .webma file upload in star7th/showdoc

    Stored XSS viva .webma file upload in GitHub repository star7th/showdoc prior to 2.10.4.

  • Critical 9.0

    Stored XSS viva .properties file upload in star7th/showdoc

    Stored XSS viva .properties file upload in GitHub repository star7th/showdoc prior to 2.10.4.

  • Critical 9.0

    Stored XSS viva cshtm file upload in star7th/showdoc

    Stored XSS viva cshtm file upload in GitHub repository star7th/showdoc prior to v2.10.4.

  • Critical 9.6

    A vulnerability has been identified in RUGGEDCOM i800, RUGGEDCOM i800NC, RUGGEDCOM i801, RUGGEDCOM i801NC, RUGGEDCOM i8…

  • Critical 9.8

    Cross-site Scripting (XSS) - Stored in microweber/microweber

    Cross-site Scripting (XSS) - Stored in Packagist microweber/microweber prior to 1.2.11.

  • Critical 9.0

    Teedy - Stored Cross-Site Scripting (XSS) in Tag Name

    In Teedy, versions v1.5 through v1.9 are vulnerable to Stored Cross-Site Scripting (XSS) in the name of a created Tag. Since the Tag name is not being sanitized properly in the edit tag page, a low privileged attacker can store malicious scripts in the name o…

  • Critical 9.6

    Teedy - Reflected Cross-Site Scripting (XSS) in the Search Functionality

    In Teedy, versions v1.5 through v1.9 are vulnerable to Reflected Cross-Site Scripting (XSS). The “search term" search functionality is not sufficiently sanitized while displaying the results of the search, which can be leveraged to inject arbitrary scripts. T…

  • Critical 9.0

    Cross-site Scripting (XSS) - Stored in elgg/elgg

    elgg is vulnerable to Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

  • Critical 9.0

    XSS via prototype pollution

    Nodebb is an open source Node.js based forum software. In affected versions a prototype pollution vulnerability in the uploader module allowed a malicious user to inject arbitrary data (i.e. javascript) into the DOM, theoretically allowing for an account take…

  • Critical 9.3

    WPO365 | LOGIN - Wordpress Plugin Persistent Cross-Site Scripting

    The “WPO365 | LOGIN” WordPress plugin (up to and including version 15.3) by wpo365.com is vulnerable to a persistent Cross-Site Scripting (XSS) vulnerability (also known as Stored or Second-Order XSS). Persistent XSS vulnerabilities occur when the application…

  • Critical 9.6

    In uClibc and uClibc-ng before 1.0.39, incorrect handling of special characters in domain names returned by DNS servers…

  • Critical 9.8

    Inconsistent input sanitisation leads to XSS vectors

    OMERO.web provides a web based client and plugin infrastructure. In versions prior to 5.11.0, a variety of templates do not perform proper sanitization through HTML escaping. Due to the lack of sanitization and use of ``jQuery.html()``, there are a whole host…

  • Critical 10.0

    Reflected Cross-Site-Scripting

    The web server is vulnerable to reflected XSS and therefore an attacker might be able to execute scripts on a client’s computer by sending the client a manipulated URL.

  • Critical 10.0

    Cross site scripting via unsafe defaults in remark-html

    remark-html is an open source nodejs library which compiles Markdown to HTML. In affected versions the documentation of remark-html has mentioned that it was safe by default. In practice the default was never safe and had to be opted into. That is, user input…

  • Critical 9.0

    Stored XSS in “Dolibarr” leads to privilege escalation

    In “Dolibarr ERP CRM”, WYSIWYG Editor module, v2.8.1 to v13.0.2 are affected by a stored XSS vulnerability that allows low privileged application users to store malicious scripts in the “Private Note” field at “/adherents/note.php?id=1” endpoint. These script…

  • Critical 10.0

    Failure to Sanitize Special Elements into a Different Plane (Special Element Injection) in notebook

    The Jupyter notebook is a web-based notebook environment for interactive computing. In affected versions untrusted notebook can execute code on load. Jupyter Notebook uses a deprecated version of Google Caja to sanitize user inputs. A public Caja bypass can b…

  • Critical 9.6
    CVE-2021-21803 Scanner template

    This vulnerability is present in device_graph_page.php script, which is a part of the Advantech R-SeeNet web applicatio…

  • Critical 9.6
    CVE-2021-21802 Scanner template

    This vulnerability is present in device_graph_page.php script, which is a part of the Advantech R-SeeNet web applicatio…

  • Critical 9.6
    CVE-2021-21801 Scanner template EPSS 59%

    This vulnerability is present in device_graph_page.php script, which is a part of the Advantech R-SeeNet web applicatio…

  • Critical 9.6
    CVE-2021-21800 Scanner template EPSS 14%

    Cross-site scripting vulnerabilities exist in the ssh_form.php script functionality of Advantech R-SeeNet v 2.4.12 (20.…

  • Critical 9.6
    CVE-2021-21799 Scanner template EPSS 12%

    Cross-site scripting vulnerabilities exist in the telnet_form.php script functionality of Advantech R-SeeNet v 2.4.12 (…

  • Critical 10.0
    CVE-2021-32671 EPSS 40%

    XSS vulnerability with translator

    Flarum is a forum software for building communities. Flarum's translation system allowed for string inputs to be converted into HTML DOM nodes when rendered. This change was made after v0.1.0-beta.16 (our last beta before v1.0.0) and was not noticed or docume…

  • Critical 9.6

    keycloak Self Stored Cross-site Scripting vulnerability

    A flaw was found in keycloak in versions before 13.0.0. A Self Stored XSS attack vector escalating to a complete account takeover is possible due to user-supplied data fields not being properly encoded and Javascript code being used to process the data. The h…

  • Critical 9.6

    XSS Cross Site Scripting

    XWiki Platform is a generic wiki platform offering runtime services for applications built on top of it. It is possible to persistently inject scripts in XWiki versions prior to 12.6.3 and 12.8. Unregistred users can fill simple text fields. Registered users …

  • Critical 9.0

    Dell EMC SourceOne, versions 7.2SP10 and prior, contain a Stored Cross-Site Scripting vulnerability. A remote low privi…

  • Critical 9.6

    Cross-site Scripting (XSS) in Eclipse Theia

    In Eclipse Theia versions up to and including 1.2.0, the Markdown Preview (@theia/preview), can be exploited to execute arbitrary code.