{"id":"CVE-2026-33979","published":"2026-03-27T21:29:19Z","modified":"2026-03-31T14:29:43Z","title":"Express XSS Sanitizer: allowedTags/allowedAttributes bypass leads to permissive sanitization (XSS risk)","vendor":"AhmedAdelFahim","product":"express-xss-sanitizer","tier":"tail","description":{"text":"Express XSS Sanitizer is Express 4.x and 5.x middleware which sanitizes user input data (in req.body, req.query, req.headers and req.params) to prevent Cross Site Scripting (XSS) attack. A vulnerability has been identified in versions prior to 2.0.2 where restrictive sanitization configurations are silently ignored. In version 2.0.2, the validation logic has been updated to respect explicitly provided empty configurations. Now, if allowedTags or allowedAttributes are provided (even if empty), they are passed directly to sanitize-html without being overridden.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.2,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00422,"percentile":0.37273,"provenance":"source"},"cwes":[{"id":"CWE-183","name":"Permissive List of Allowed Inputs"},{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/AhmedAdelFahim/express-xss-sanitizer/security/advisories/GHSA-3843-rr4g-m8jq","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/AhmedAdelFahim/express-xss-sanitizer/commit/5623009ef11dcf095c163a38dea07b9cc22ad19f","tags":["x_refsource_MISC"]},{"url":"https://github.com/AhmedAdelFahim/express-xss-sanitizer/releases/tag/v2.0.2","tags":["x_refsource_MISC"]}],"priority":{"score":13.2,"factors":[{"name":"EPSS percentile","points":7.45},{"name":"CVSS severity","points":5.74}]},"vendorSlug":"ahmedadelfahim","affectedVersions":[{"vendor":"AhmedAdelFahim","product":"express-xss-sanitizer","versions":["< 2.0.2"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2026-03-31T14:29:20.307360Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"express-xss-sanitizer","vulnerableRanges":["<2.0.2"],"patched":["2.0.2"],"from":["GHSA-3843-rr4g-m8jq"],"provenance":"source"}],"summary":{"text":"The express-xss-sanitizer middleware, used in Express 4.x and 5.x applications to sanitize req.body, req.query, req.headers and req.params, silently ignores restrictive allowedTags and allowedAttributes settings in versions prior to 2.0.2, passing them through a permissive default instead. An unauthenticated remote attacker who can send crafted input to an affected application can get script-injecting markup past the sanitizer, enabling cross-site scripting, with no special configuration or user interaction required.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:46:25Z"},"euvd":{"id":"EUVD-2026-16876","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-express-xss-sanitizer-cve-2022-21169","parents":[{"from":"CVE-2025-59364","to":"CVE-2026-33979","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"npm:express-xss-sanitizer","fromFixed":"2.0.1","toFixed":"2.0.2","daysApart":194},{"kind":"same-code","provenance":"machine","files":["lib/sanitize.js"],"commits":["https://github.com/AhmedAdelFahim/express-xss-sanitizer/commit/62d6542a2a57298da7a2e02de623454007e4f6d6","https://github.com/AhmedAdelFahim/express-xss-sanitizer/commit/5623009ef11dcf095c163a38dea07b9cc22ad19f"],"basis":"rarely changed file"}]},{"from":"CVE-2022-21169","to":"CVE-2026-33979","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["lib/sanitize.js"],"commits":["https://github.com/AhmedAdelFahim/express-xss-sanitizer/commit/3bf8aaaf4dbb1c209dcb8d87a82711a54c1ab39a","https://github.com/AhmedAdelFahim/express-xss-sanitizer/commit/5623009ef11dcf095c163a38dea07b9cc22ad19f"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2022-21169","published":"2022-09-26","fixed":"1.1.3","kev":false},{"cve":"CVE-2025-59364","published":"2025-09-14","fixed":"2.0.1","kev":false},{"cve":"CVE-2026-33979","published":"2026-03-27","fixed":"2.0.2","kev":false}],"package":"npm:express-xss-sanitizer"}}