GHSA-hvq2-wf92-j4f3

Suggest an improvement
Source
https://github.com/advisories/GHSA-hvq2-wf92-j4f3
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/09/GHSA-hvq2-wf92-j4f3/GHSA-hvq2-wf92-j4f3.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-hvq2-wf92-j4f3
Aliases
Published
2025-09-26T14:38:13Z
Modified
2025-09-26T14:57:09.094984Z
Severity
  • 6.9 (Medium) CVSS_V4 - 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 CVSS Calculator
Summary
express-xss-sanitizer has an unbounded recursion depth
Details

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:

npm install express-xss-sanitizer@latest
Database specific
{
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-674"
    ],
    "severity": "MODERATE",
    "github_reviewed_at": "2025-09-26T14:38:13Z",
    "nvd_published_at": null
}
References

Affected packages

npm / express-xss-sanitizer

Package

Name
express-xss-sanitizer
View open source insights on deps.dev
Purl
pkg:npm/express-xss-sanitizer

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2.0.1