Skip to content

← Public intelligence

npm package

express-xss-sanitizer

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

3 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. High, CVSS 8.2npmAmendedPublished

    Express XSS Sanitizer: allowedTags/allowedAttributes bypass leads to permissive sanitization (XSS risk)

    CVE-2026-33979 · GHSA-3843-rr4g-m8jq

    Affected
    • npm express-xss-sanitizer < 2.0.2
    Fixed in
    2.0.2· Vendor fix available
    Issue
    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 . 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. Impact Developers intending to fully strip HTML content by providing empty allowedTags or allowedAttributes configurations may unknowingly allow a wide range of HTML elements and attributes. This can result in: - Injection of unintended HTML content - Injection of links via - Potential XSS vectors depending on downstream usage The impact depends…

    Recommended action: Upgrade to 2.0.2 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  2. Medium, CVSS 6.9npmAmendedPublished

    express-xss-sanitizer has an unbounded recursion depth

    CVE-2025-59364 · GHSA-hvq2-wf92-j4f3

    Affected
    • npm express-xss-sanitizer < 2.0.1
    Fixed in
    2.0.1· Vendor fix available
    Issue
    Security Advisory: express-xss-sanitizer Overview A vulnerability was discovered in express-xss-sanitizer that allowed unbounded recursion depth during sanitization of nested objects. Affected Versions - All versions prior to 2.0.1 Patched Versions - 2.0.1 and later Description The 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. Impact An attacker could cause denial-of-service by sending a request with deeply nested structures, potentially crashing the Node.js process. Solution Upgrade to version 2.0.1 or later:

    Recommended action: Upgrade to 2.0.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  3. Medium, CVSS 6.1npmAmendedPublished

    express-xss-sanitizer vulnerable to Prototype Pollution via allowedTags attribute

    CVE-2022-21169 · GHSA-grjp-4jmr-mjcw

    Affected
    • npm express-xss-sanitizer < 1.1.3
    Fixed in
    1.1.3· Vendor fix available
    Issue
    The package express-xss-sanitizer before 1.1.3 is vulnerable to Prototype Pollution via the allowedTags attribute, allowing the attacker to bypass xss sanitization.

    Recommended action: Upgrade to 1.1.3 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →