{"id":"GHSA-hvq2-wf92-j4f3","summary":"express-xss-sanitizer has an unbounded recursion depth","details":"# Security Advisory: express-xss-sanitizer\n\n## Overview\nA vulnerability was discovered in express-xss-sanitizer that allowed unbounded recursion depth during sanitization of nested objects.\n\n## Affected Versions\n- All versions prior to 2.0.1\n\n## Patched Versions\n- 2.0.1 and later\n\n## Description\nThe 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.\n\n## Impact\nAn attacker could cause denial-of-service by sending a request with deeply nested structures, potentially crashing the Node.js process.\n\n## Solution\nUpgrade to version 2.0.1 or later:\n\n```bash\nnpm install express-xss-sanitizer@latest\n```","aliases":["CVE-2025-59364"],"modified":"2025-09-26T14:57:09.094984Z","published":"2025-09-26T14:38:13Z","database_specific":{"cwe_ids":["CWE-674"],"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2025-09-26T14:38:13Z","nvd_published_at":null},"references":[{"type":"WEB","url":"https://github.com/AhmedAdelFahim/express-xss-sanitizer/security/advisories/GHSA-hvq2-wf92-j4f3"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-59364"},{"type":"WEB","url":"https://github.com/AhmedAdelFahim/express-xss-sanitizer/pull/23"},{"type":"WEB","url":"https://github.com/AhmedAdelFahim/express-xss-sanitizer/commit/62d6542a2a57298da7a2e02de623454007e4f6d6"},{"type":"WEB","url":"https://dbugs.ptsecurity.com/vulnerability/PT-2025-37434"},{"type":"WEB","url":"https://gist.github.com/Spendroslav/177804eaef5acfb222a550de212a1b94"},{"type":"PACKAGE","url":"https://github.com/AhmedAdelFahim/express-xss-sanitizer"},{"type":"WEB","url":"https://www.npmjs.com/package/express-xss-sanitizer"},{"type":"WEB","url":"https://www.tenable.com/cve/CVE-2025-59364"}],"affected":[{"package":{"name":"express-xss-sanitizer","ecosystem":"npm","purl":"pkg:npm/express-xss-sanitizer"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.0.1"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/09/GHSA-hvq2-wf92-j4f3/GHSA-hvq2-wf92-j4f3.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"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"}]}