Skip to content

serve-static (npm)

Serve static files

Advisories
4
Latest version
2.2.1
Released Dec 15, 2025
License
MIT
OpenSSF Scorecard
6.5 / 10

How to fix

Upgrading to 2.1.0 or later clears every advisory below that has a fix.

Upgrade commands
npm
npm install serve-static@2.2.1
yarn
yarn add serve-static@2.2.1
pnpm
pnpm add serve-static@2.2.1

Known vulnerabilities

AdvisorySeverityAffectedFixed in
GHSA-cm22-4g7w-348p
serve-static vulnerable to template injection that can lead to XSS
Medium
EPSS 0.63%
< 1.16.0
1.16.0
GHSA-cm22-4g7w-348p
serve-static vulnerable to template injection that can lead to XSS
Medium
EPSS 0.63%
>= 2.0.0, < 2.1.0
2.1.0
GHSA-c3x7-gjmx-r2ff
Open Redirect in serve-static
Low
EPSS 2.62%
< 1.7.2
1.7.2
GHSA-c3x7-gjmx-r2ff
Open Redirect in serve-static
Low
EPSS 2.62%
>= 1.7.0, < 1.7.2
1.7.2

Source: git+https://github.com/expressjs/serve-static.git

Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor