{"id":"CVE-2025-59364","aliases":["CVE-2025-59364","GHSA-hvq2-wf92-j4f3"],"related":[],"kind":"vulnerability","state":"published","title":"express-xss-sanitizer has an unbounded recursion depth","summary":"The express-xss-sanitizer (aka Express XSS Sanitizer) package through 2.0.0 for Node.js has an unbounded recursion depth in sanitize in lib/sanitize.js for a JSON request body.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"The express-xss-sanitizer (aka Express XSS Sanitizer) package through 2.0.0 for Node.js has an unbounded recursion depth in sanitize in lib/sanitize.js for a JSON request body.","source":"cvelist"},{"lang":"en","text":"# 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```","format":"markdown","source":"ghsa"}],"published":"2025-09-14T00:00:00.000Z","modified":"2026-06-17T09:46:01.287Z","severity":{"scorer":"mitre","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"mitre","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"MEDIUM"}],"cwes":["CWE-674"],"affected":[{"ranges":[{"type":"semver","version":"2.0.0","status":"affected"}],"vendor":"Express XSS Sanitizer project","product":"Express XSS Sanitizer","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.0.1"}],"ecosystem":"npm","package":"express-xss-sanitizer","purl":"pkg:npm/express-xss-sanitizer","source":"ghsa"}],"references":[{"url":"https://github.com/AhmedAdelFahim/express-xss-sanitizer","tags":["package"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.npmjs.com/package/express-xss-sanitizer","tags":["web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://gist.github.com/Spendroslav/177804eaef5acfb222a550de212a1b94","tags":["web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/AhmedAdelFahim/express-xss-sanitizer/security/advisories/GHSA-hvq2-wf92-j4f3","tags":["web"],"sources":["ghsa"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-59364","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/AhmedAdelFahim/express-xss-sanitizer/pull/23","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/AhmedAdelFahim/express-xss-sanitizer/commit/62d6542a2a57298da7a2e02de623454007e4f6d6","tags":["web"],"sources":["ghsa"]},{"url":"https://dbugs.ptsecurity.com/vulnerability/PT-2025-37434","tags":["web"],"sources":["ghsa"]},{"url":"https://www.tenable.com/cve/CVE-2025-59364","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-09-15T15:57:46.719Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-59364","url":"https://www.cve.org/CVERecord?id=CVE-2025-59364","licence":"CVE Terms of Use","modified":"2025-09-15T15:57:53.693Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-hvq2-wf92-j4f3","url":"https://github.com/advisories/GHSA-hvq2-wf92-j4f3","licence":"CC-BY-4.0","modified":"2025-09-26T14:57:09.094Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-59364","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-59364","licence":"Public domain","modified":"2026-06-17T09:46:01.287Z"}],"updatedAt":"2026-11-25T22:59:04.632Z","epss":{"score":0.00467,"percentile":0.42132,"date":"2026-12-01T12:00:22.000Z"}}