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

655 results · Clear filters · Feed

  • Medium 5.4
    CVE-2024-34064 Public exploit

    Jinja vulnerable to HTML attribute injection when passing user input as keys to xmlattr filter

    Jinja is an extensible templating engine. The `xmlattr` filter in affected versions of Jinja accepts keys containing non-attribute characters. XML/HTML attributes cannot contain spaces, `/`, `>`, or `=`, as each would then be interpreted as starting a separat…

  • Medium 5.4
    CVE-2024-33111 Public exploit

    D-Link DIR-845L router <=v1.01KRb03 is vulnerable to Cross Site Scripting (XSS) via /htdocs/webinc/js/bsc_sms_inbox.php.

  • Medium 5.3
    CVE-2024-33113 Public exploit

    D-LINK DIR-845L <=v1.01KRb03 is vulnerable to Information disclosurey via bsc_sms_inbox.php.

  • Medium 6.5
    CVE-2024-33648 Public exploit

    WordPress Recencio Book Reviews plugin <= 1.66.0 - Cross Site Scripting (XSS) vulnerability

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') vulnerability in Kemory Grubb Recencio Book Reviews recencio-book-reviews allows DOM-Based XSS.This issue affects Recencio Book Reviews: from n/a through <= 1.66.0.

  • Medium 6.1
    CVE-2024-23995 Public exploit

    Cross Site Scripting (XSS) in Beekeeper Studio 4.1.13 and earlier allows remote attackers to execute arbitrary code in …

  • Medium 6.1
    CVE-2024-3867 Public exploit

    Tainacan Interface <= 2.7.2 - Reflected Cross-Site Scripting

    The archive-tainacan-collection theme for WordPress is vulnerable to Reflected Cross-Site Scripting due to the use of add_query_arg without appropriate escaping on the URL in version 2.7.2. This makes it possible for unauthenticated attackers to inject arbitr…

  • Medium 4.8
    CVE-2024-31839 Public exploit

    tiagorlampert CHAOS vulnerable to Cross Site Scripting

    Cross Site Scripting vulnerability in tiagorlampert CHAOS v.5.0.1 allows a remote attacker to escalate privileges via the sendCommandHandler function in the handler.go component.

  • Medium 5.4
    CVE-2024-27665 Public exploit

    Unifiedtransform v2.X is vulnerable to Stored Cross-Site Scripting (XSS) via file upload feature in Syllabus module.

  • Medium 6.8
    CVE-2023-49965 Public exploit

    SpaceX Starlink Wi-Fi router Gen 2 before 2023.48.0 allows XSS via the ssid and password parameters on the Setup Page.

  • Medium 4.7
    CVE-2024-25503 Public exploit

    Cross Site Scripting (XSS) vulnerability in Advanced REST Client v.17.0.9 allows a remote attacker to execute arbitrary…

  • Medium 6.5
    CVE-2024-29278 Public exploit

    funboot v1.1 is vulnerable to Cross Site Scripting (XSS) via the title field in "create a message ."

  • Medium 5.4
    CVE-2024-28784 Public exploit

    IBM QRadar cross-site scripting

    IBM QRadar SIEM 7.5 is vulnerable to cross-site scripting. This vulnerability allows users to embed arbitrary JavaScript code in the Web UI thus altering the intended functionality potentially leading to credentials disclosure within a trusted session. IBM X-…

  • Medium 6.1
    CVE-2024-25175 Public exploit

    An issue in Kickdler before v1.107.0 allows attackers to provide an XSS payload via a HTTP response splitting attack.

  • Medium 5.3
    CVE-2024-27914 Public exploit

    Reflected Cross-Site Scripting (XSS) in search engine when debug mode is enabled in GLPI

    GLPI is a Free Asset and IT Management Software package, Data center management, ITIL Service Desk, licenses tracking and software auditing. An unauthenticated user can provide a malicious link to a GLPI administrator in order to exploit a reflected XSS vulne…

  • Medium 6.1
    CVE-2024-2242 Public exploit

    Contact Form 7 <= 5.9 - Reflected Cross-Site Scripting

    The Contact Form 7 plugin for WordPress is vulnerable to Reflected Cross-Site Scripting via the ‘active-tab’ parameter in all versions up to, and including, 5.9 due to insufficient input sanitization and output escaping. This makes it possible for unauthentic…

  • Medium 6.4
    CVE-2024-1234 Public exploit

    Exclusive Addons for Elementor <= 2.6.9 - Authenticated (Contributor+) Stored Cross-Site Scripting

    The Exclusive Addons for Elementor plugin for WordPress is vulnerable to Stored Cross-Site Scripting via data attribute in all versions up to, and including, 2.6.9 due to insufficient input sanitization and output escaping. This makes it possible for authenti…

  • Medium 6.1
    CVE-2024-28623 Public exploit

    RiteCMS v3.0.0 was discovered to contain a cross-site scripting (XSS) vulnerability via the component main_menu/edit_se…

  • Medium 6.3
    CVE-2024-1304 Public exploit

    Multiple Vulnerabilities in Badger Meter's Monitool

    Cross-site scripting vulnerability in Badger Meter Monitool that affects versions up to 4.6.3 and earlier. This vulnerability allows a remote attacker to send a specially crafted javascript payload to an authenticated user and partially hijack their browser s…

  • Medium 4.8
    CVE-2024-26521 Public exploit

    HTML Injection vulnerability in CE Phoenix v1.0.8.20 and before allows a remote attacker to execute arbitrary code, esc…

  • Medium 5.4
    CVE-2023-51281 Public exploit

    Cross Site Scripting vulnerability in Customer Support System v.1.0 allows a remote attacker to escalate privileges via…

  • Medium 5.4
    CVE-2023-49987 Public exploit

    A cross-site scripting (XSS) vulnerability in the component /management/term of School Fees Management System v1.0 allo…

  • Medium 4.7
    CVE-2023-49986 Public exploit

    A cross-site scripting (XSS) vulnerability in the component /admin/parent of School Fees Management System 1.0 allow at…

  • Medium 6.1
    CVE-2024-24035 Public exploit

    Cross Site Scripting (XSS) vulnerability in Setor Informatica SIL 3.1 allows attackers to run arbitrary code via the hm…

  • Medium 6.5
    CVE-2023-49985 Public exploit

    A cross-site scripting (XSS) vulnerability in the component /management/class of School Fees Management System v1.0 all…

  • Medium 4.7
    CVE-2023-49971 Public exploit

    A cross-site scripting (XSS) vulnerability in Customer Support System v1 allows attackers to execute arbitrary web scri…

  • Medium 6.1
    CVE-2023-49973 Public exploit

    A cross-site scripting (XSS) vulnerability in Customer Support System v1 allows attackers to execute arbitrary web scri…

  • Medium 6.1
    CVE-2023-49974 Public exploit

    A cross-site scripting (XSS) vulnerability in Customer Support System v1 allows attackers to execute arbitrary web scri…

  • Medium 6.1
    CVE-2023-49984 Public exploit

    A cross-site scripting (XSS) vulnerability in the component /management/settings of School Fees Management System v1.0 …

  • Medium 6.8
    CVE-2023-49983 Public exploit

    A cross-site scripting (XSS) vulnerability in the component /management/class of School Fees Management System v1.0 all…

  • Medium 5.4
    CVE-2023-49976 Public exploit

    A cross-site scripting (XSS) vulnerability in Customer Support System v1 allows attackers to execute arbitrary web scri…

  • Medium 5.4
    CVE-2023-49977 Public exploit

    A cross-site scripting (XSS) vulnerability in Customer Support System v1 allows attackers to execute arbitrary web scri…

  • Medium 6.1
    CVE-2023-49539 Public exploit

    Book Store Management System v1.0 was discovered to contain a cross-site scripting (XSS) vulnerability in /bsms_ci/inde…

  • Medium 6.1
    CVE-2023-49540 Public exploit

    Book Store Management System v1.0 was discovered to contain a cross-site scripting (XSS) vulnerability in /bsms_ci/inde…

  • Medium 6.1
    CVE-2024-27743 Public exploit

    Cross Site Scripting vulnerability in Petrol Pump Mangement Software v.1.0 allows an attacker to execute arbitrary code…

  • Medium 6.1
    CVE-2024-27744 Public exploit

    Cross Site Scripting vulnerability in Petrol Pump Mangement Software v.1.0 allows an attacker to execute arbitrary code…

  • Medium 6.1
    CVE-2023-51800 Public exploit

    Cross Site Scripting (XSS) vulnerability in School Fees Management System v.1.0 allows a remote attacker to execute arb…

  • Medium 6.1
    CVE-2023-51802 Public exploit

    Cross Site Scripting (XSS) vulnerability in the Simple Student Attendance System v.1.0 allows a remote attacker to exec…

  • Medium 6.1
    CVE-2024-25381 Public exploit

    There is a Stored XSS Vulnerability in Emlog Pro 2.2.8 Article Publishing, due to non-filtering of quoted content.

  • Medium 6.5
    CVE-2024-23724 Public exploit

    Ghost has possible Cross-site Scripting issue

    Ghost through 5.76.0 allows stored XSS, and resultant privilege escalation in which a contributor can take over any account, via an SVG profile picture that contains JavaScript code to interact with the API on localhost TCP port 3001. NOTE: The discoverer rep…

  • Medium 6.1
    CVE-2024-24494 Public exploit EPSS 26%

    Cross Site Scripting vulnerability in Daily Habit Tracker v.1.0 allows a remote attacker to execute arbitrary code via …