Uncontrolled Recursion Affecting express-xss-sanitizer package, versions *


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-EXPRESSXSSSANITIZER-12670886
  • published15 Sept 2025
  • disclosed14 Sept 2025
  • creditSpendroslav

Introduced: 14 Sep 2025

NewCVE-2025-59364  (opens in a new tab)
CWE-674  (opens in a new tab)

How to fix?

There is no fixed version for express-xss-sanitizer.

Overview

express-xss-sanitizer is an Express 4.x middleware which sanitizes user input data (in req.body, req.query, req.headers and req.params) to prevent Cross Site Scripting (XSS) attack.

Affected versions of this package are vulnerable to Uncontrolled Recursion via the sanitize function in lib/sanitize.js when processing a JSON request body. An attacker can cause the application to become unresponsive or crash by submitting specially crafted input that triggers unbounded recursion.

References

CVSS Base Scores

version 4.0
version 3.1