QID 153005

Date Published: 2023-07-18

QID 153005: Ruby On Rails - Stored Cross Site Scripting (XSS) Vulnerability

XSS vulnerabilities occur when the Web application echoes user-supplied data in an HTML response sent to the Web browser. For example, a Web application might include the user's name as part of a welcome message, or display a home address when confirming a shipping destination. If the user-supplied data contains characters that are interpreted as part of an HTML element instead of literal text, then an attacker can modify the HTML that is received by the victim's Web browser.

The XSS payload persists within one or more Web pages after it has been injected into the Web application by an attacker. An XSS payload may consist of HTML, JavaScript or other content that will be rendered by the browser. This exposes any user who views the vulnerable page to attack, and exploits the expectation of trust that the victim has in the Web application.

The malicious content of the XSS payload remains in the Web application after it has been submitted. Any user who visits the vulnerable page will be affected by the attack. The victim does not have to click on a suspicious link or otherwise receive malicious content from the attacker.

XSS exploits pose a significant threat to a Web application, its users and user data. XSS exploits target the users of a Web application rather than the Web application itself. An exploit can lead to theft of the user's credentials and personal or financial information. Complex exploits and attack scenarios are possible via XSS because it enables an attacker to execute dynamic code. Consequently, any capability or feature available to the Web browser (for example HTML, JavaScript, Flash and Java applets) can be used as part of a compromise.

  • CVSS V3 rated as Medium - 4.7 severity.
  • CVSS V2 rated as High - 6.4 severity.
  • Solution
    Filter all data collected from the client including user-supplied content and browser content such as Referrer and User-Agent headers.

    Any data collected from the client and displayed in a Web page should be HTML-encoded to ensure the content is rendered as text instead of an HTML element or JavaScript.

    Vendor References

    CVEs related to QID 153005

    Software Advisories
    Advisory ID Software Component Link

    © CVE.report 2026

    Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

    CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

    Free CVE JSON API cve.report/api

    CVE.report and Source URL Uptime Status status.cve.report