Vulnerability · Published Sep 10, 2024 · Assigned by GitHub_M

CVE-2024-43800serve-static affected by template injection that can lead to XSS

Medium 5.0

In plain English

A medium-severity cross-site scripting in serve-static from expressjs. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 50% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.0Medium
Exploit odds (30 days)0.6%top 49.6% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

serve-static serves static files. serve-static passes untrusted user input - even after sanitizing it - to redirect() may execute untrusted code. This issue is patched in serve-static 1.16.0.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12node-serve-staticno fix listedDEBIAN-CVE-2024-43800
Debian:13node-serve-static2.1.0+~1.15.7-1DEBIAN-CVE-2024-43800
Debian:14node-serve-static2.1.0+~1.15.7-1DEBIAN-CVE-2024-43800
Ubuntu:22.04:LTSnode-serve-staticno fix listedUBUNTU-CVE-2024-43800
Ubuntu:24.04:LTSnode-serve-staticno fix listedUBUNTU-CVE-2024-43800
Ubuntu:25.10node-serve-staticno fix listedUBUNTU-CVE-2024-43800
Ubuntu:26.04:LTSnode-serve-staticno fix listedUBUNTU-CVE-2024-43800
Ubuntu:26.10node-serve-staticno fix listedUBUNTU-CVE-2024-43800
npmserve-static2.1.0GHSA-cm22-4g7w-348p
npmserve-static1.16.0GHSA-cm22-4g7w-348p

Affected products (as reported)

VendorProductVersions
expressjs serve-static < 1.16.0>= 2.0.0, < 2.1.0

Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L

References