Express XSS Sanitizer: allowedTags/allowedAttributes bypass leads to permissive sanitization (XSS risk)
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- Low · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| AhmedAdelFahim | express-xss-sanitizer | before 2.0.2 | 2.0.2 | Patch available | CNA |
| — | express-xss-sanitizer (npm) | before 2.0.2 | 2.0.2 | Patch available | GHSA-3843-rr4g-m8jq |
- express-xss-sanitizer VendorAhmedAdelFahim Affected before 2.0.2 Fixed in 2.0.2 Patch available CNA
- express-xss-sanitizer (npm) Vendor— Affected before 2.0.2 Fixed in 2.0.2 Patch available GHSA-3843-rr4g-m8jq
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:express_xss_sanitizer_project:express_xss_sanitizer:*:*:*:*:*:node.js:*:* | before 2.0.2 | Vulnerable | Express XSS Sanitizer project |
- cpe:2.3:a:express_xss_sanitizer_project:express_xss_sanitizer:*:*:*:*:*:node.js:*:* Versions before 2.0.2 Vulnerable ·Express XSS Sanitizer project
Remediation
- Fix · CNA express-xss-sanitizer (AhmedAdelFahim) Fixed in 2.0.2
- Fix · GHSA-3843-rr4g-m8jq express-xss-sanitizer (npm) Fixed in 2.0.2 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-33979
- 2026-10-03 Alias added: GHSA-3843-rr4g-m8jq
References
Exploit 1
More Express XSS Sanitizer project Express Xss Sanitizer vulnerabilities
- TI-2022-05570 Prototype pollution in express-xss-sanitizer CVSS 3.1HIGH 7.3
Sources
- CVE-2026-33979 · CVE Program
- CVE-2026-33979 · NVD
- FIRST EPSS
- GHSA-3843-rr4g-m8jq · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences