{"id":"CVE-2025-59364","aliases":["GHSA-hvq2-wf92-j4f3"],"url":"https://o3.security/vulnerability/CVE-2025-59364","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```","published":"2025-09-14T00:00:00Z","modified":"2026-08-12T03:51:38.347039807Z","cvss":{"score":5.3,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"},"epss":{"score":0.00449,"percentile":0.37141,"asOf":"2026-08-24"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"express-xss-sanitizer","fixedVersion":"2.0.1"}],"fix":{"url":"https://github.com/AhmedAdelFahim/express-xss-sanitizer/pull/23","label":"AhmedAdelFahim/express-xss-sanitizer#23"},"references":[{"type":"WEB","url":"https://gist.github.com/Spendroslav/177804eaef5acfb222a550de212a1b94"},{"type":"WEB","url":"https://www.npmjs.com/package/express-xss-sanitizer"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/59xxx/CVE-2025-59364.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-59364"},{"type":"PACKAGE","url":"https://github.com/AhmedAdelFahim/express-xss-sanitizer"},{"type":"WEB","url":"https://github.com/AhmedAdelFahim/express-xss-sanitizer/security/advisories/GHSA-hvq2-wf92-j4f3"},{"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://www.tenable.com/cve/CVE-2025-59364"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:38.347039807Z"}}