Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. express-xss-sanitizer
  4. ›
  5. CVE-2025-59364

CVE-2025-59364: express-xss-sanitizer has an unbounded recursion depth

September 26, 2025 (updated November 10, 2025)

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.

References

  • dbugs.ptsecurity.com/vulnerability/PT-2025-37434
  • gist.github.com/Spendroslav/177804eaef5acfb222a550de212a1b94
  • github.com/AhmedAdelFahim/express-xss-sanitizer
  • github.com/AhmedAdelFahim/express-xss-sanitizer/commit/62d6542a2a57298da7a2e02de623454007e4f6d6
  • github.com/AhmedAdelFahim/express-xss-sanitizer/pull/23
  • github.com/AhmedAdelFahim/express-xss-sanitizer/security/advisories/GHSA-hvq2-wf92-j4f3
  • github.com/advisories/GHSA-hvq2-wf92-j4f3
  • nvd.nist.gov/vuln/detail/CVE-2025-59364
  • www.npmjs.com/package/express-xss-sanitizer
  • www.tenable.com/cve/CVE-2025-59364

Code Behaviors & Features

Detect and mitigate CVE-2025-59364 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.0.1

Fixed versions

  • 2.0.1

Solution

Upgrade to version 2.0.1 or above.

Impact 5.3 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Learn more about CVSS

Weakness

  • CWE-674: Uncontrolled Recursion

Source file

npm/express-xss-sanitizer/CVE-2025-59364.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 30 Nov 2025 12:18:45 +0000.