GitHub Advisoryadvisory · npm

GHSA-hvq2-wf92-j4f3 express-xss-sanitizer has an unbounded recursion depth

MEDIUM Published 2025-09-26 Modified 2025-09-26 Official page ↗
Aliases
CVE-2025-59364
Ecosystem
npm
Packages
express-xss-sanitizer
Severity
Moderate
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
Weaknesses
CWE-674
Reviewed
2025-09-26

Affected packages

• npm express-xss-sanitizer: < 2.0.1 → fixed in 2.0.1

Description

Security Advisory: express-xss-sanitizer Overview A vulnerability was discovered in express-xss-sanitizer that allowed unbounded recursion depth during sanitization of nested objects. Affected Versions • All versions prior to 2.0.1 Patched Versions • 2.0.1 and later Description The sanitize function in lib/sanitize.js performed recursive sanitization without depth limiting, making it vulnerable to stack overflow attacks via specially crafted deeply nested JSON objects. Impact An attacker could cause denial-of-service by sending a request with deeply nested structures, potentially crashing the Node.js process. Solution Upgrade to version 2.0.1 or later: ```bash npm install express-xss-sanitizer@latest ```

Related

Alias · CVE (1)

  • CVE-2025-59364 The express-xss-sanitizer (aka Express XSS Sanitizer) package through 2.0.0 for Node.js has an unbounded recursion depth in sanitize in… vulnerability

Weakness · CWE (1)

  • CWE-674 Uncontrolled Recursion weakness

References