VYPR
Moderate severityNVD Advisory· Published Apr 18, 2018· Updated Aug 5, 2024

CVE-2018-1000160

CVE-2018-1000160

Description

RisingStack protect before 1.2.0 fails to detect 26 XSS vectors, allowing malicious scripts to be validated as safe.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

RisingStack protect before 1.2.0 fails to detect 26 XSS vectors, allowing malicious scripts to be validated as safe.

Vulnerability

RisingStack protect version 1.2.0 and earlier contains a Cross-Site Scripting (XSS) vulnerability in the isXss() function within lib/rules/xss.js. The function uses two regular expressions (xssSimple and xssImgSrc) to detect XSS strings, but these regex patterns fail to catch at least 26 documented XSS attack vectors [1]. The affected package is meant to provide proactive protection against common security issues, yet the insufficient regex logic allows dangerous XSS payloads to be incorrectly validated as safe [3][4].

Exploitation

An attacker can craft any of the 26 XSS strings detailed in the GitHub issue #16 (e.g., using `, , , or event handler attributes) that bypasses the regex-based checks in isXss(). The attacker does not require special authentication; if the application uses the isXss()` function to sanitize user-supplied input before rendering it on a page, the malicious string will be treated as safe and subsequently rendered in a victim’s browser [1][2][3].

Impact

Successful exploitation allows an attacker to inject arbitrary JavaScript or HTML into the context of a victim’s browser session. This can lead to session hijacking, credential theft, defacement, or redirection to malicious sites. The compromise occurs at the same privilege level as the affected web application, without requiring any additional permissions [1][4].

Mitigation

No patched version of @risingstack/protect has been released; the package is effectively unmaintained and no fix is available [4]. The only reliable mitigation is to stop using the isXss() function for HTML sanitization and instead adopt proper output escaping or a dedicated, well-tested XSS prevention library (e.g., using HTML entity encoding) as advised in reference [3]. Users of the RisingStack protect package should consider replacing it with an actively maintained alternative [3][4].

AI Insight generated on May 22, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
@risingstack/protectnpm
<= 1.2.0

Affected products

1

Patches

0

No patches discovered yet.

Vulnerability mechanics

Root cause

"The isXss() function uses incomplete regular expressions (xssSimple and xssImgSrc) that fail to detect many valid XSS attack vectors, causing dangerous strings to be validated as safe."

Attack vector

An attacker can supply one of at least 26 XSS vectors (detailed in GitHub issue #16) that bypass the `isXss()` function's regex-based detection [ref_id=1][ref_id=2]. The vectors include `

Affected code

The vulnerability resides in the `isXss()` function in `lib/rules/xss.js` of the RisingStack protect library version 1.2.0 and earlier [ref_id=1]. The function relies on two regular expressions — `xssSimple` and `xssImgSrc` — to detect XSS payloads [ref_id=3]. These regexes fail to match many valid XSS vectors, causing dangerous strings to be classified as safe [ref_id=1][ref_id=2].

What the fix does

The advisory recommends replacing the regex-based `isXss()` approach with proper HTML entity escaping, such as escaping characters like `

Preconditions

  • configThe application must use the RisingStack protect library version 1.2.0 or earlier and rely on the isXss() function to validate user-supplied input for XSS.
  • inputThe attacker must be able to inject HTML/JavaScript into input that is later rendered in a web page served to other users.

Generated on May 25, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

7

News mentions

0

No linked articles in our index yet.