CVE-2025-59364 express-xss-sanitizer has an unbounded recursion depth

Medium 5.3 Published Updated

An attacker can cause a denial of service via unbounded recursion in the Express XSS Sanitizer library when processing JSON request bodies.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-59364?

CVE-2025-59364 is a medium-severity denial of service vulnerability in Express XSS Sanitizer, published on 14 Sep 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

The express-xss-sanitizer (aka Express XSS Sanitizer) package through 2.0.0 for Node.js has an unbounded recursion depth in sanitize in lib/sanitize.js for a JSON request body.

Weakness: CWE-674

Which versions are affected by CVE-2025-59364?

2 open source packages ship an affected version, including express-xss-sanitizer.

PackageAffectedFixed in
express-xss-sanitizer npmAll versions2.0.1
express-xss-sanitizer npmAll versions2.0.1

How do I fix CVE-2025-59364?

Upgrade express-xss-sanitizer to 2.0.1 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2025-59364 being exploited?

There is no known exploitation of CVE-2025-59364 in the wild and no public exploit code.

Sources

Also known as GHSA-hvq2-wf92-j4f3.

Is CVE-2025-59364 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free