Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. express-xss-sanitizer
  4. ›
  5. CVE-2026-33979

CVE-2026-33979: Express XSS Sanitizer: allowedTags/allowedAttributes bypass leads to permissive sanitization (XSS risk)

March 27, 2026 (updated March 30, 2026)

A vulnerability has been identified in express-xss-sanitizer (<= 2.0.1) where restrictive sanitization configurations are silently ignored.

When a developer explicitly sets:

allowedTags: [] allowedAttributes: {}

the library incorrectly treats these values as “not provided” due to length/emptiness checks, and falls back to sanitize-html’s default configuration.

As a result, instead of stripping all HTML tags and attributes, the sanitizer allows a permissive set of tags (e.g., <a>, <p>, <div>, etc.) and attributes (e.g., href on <a>).

This behavior violates the expected API contract and may lead to security issues such as content injection or XSS, depending on how the sanitized output is used.

References

  • github.com/AhmedAdelFahim/express-xss-sanitizer
  • github.com/AhmedAdelFahim/express-xss-sanitizer/commit/5623009ef11dcf095c163a38dea07b9cc22ad19f
  • github.com/AhmedAdelFahim/express-xss-sanitizer/releases/tag/v2.0.2
  • github.com/AhmedAdelFahim/express-xss-sanitizer/security/advisories/GHSA-3843-rr4g-m8jq
  • github.com/advisories/GHSA-3843-rr4g-m8jq
  • nvd.nist.gov/vuln/detail/CVE-2026-33979

Code Behaviors & Features

Detect and mitigate CVE-2026-33979 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 2.0.2

Fixed versions

  • 2.0.2

Solution

Upgrade to version 2.0.2 or above.

Impact 8.2 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-183: Permissive List of Allowed Inputs
  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

npm/express-xss-sanitizer/CVE-2026-33979.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:09 +0000.