Cross-Site Scripting (XSS) Vulnerability in serve

serve Updated 02 Oct 2025

Summary

11/09/2020
HIGH
Yes i
High
Not published

GHSA-xw79-hhv6-578c: Cross-Site Scripting in serve. Affects serve versions < 10.0.2. Fixed in 10.0.2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Serve is an npm package that allows developers to quickly create static file servers for local development or production deployment. It is commonly used to serve static websites or single-page applications. Serve is vulnerable to Cross-Site Scripting (XSS) attacks in versions prior to 10.0.2.

Vulnerability Detail

The vulnerability in serve arises from the package's failure to encode output, which enables attackers to execute arbitrary JavaScript in the victim's browser if user-supplied input is rendered. This can lead to various security risks, including the theft of sensitive information, session hijacking, or the injection of malicious content.

How To Fix

Latest published version: 14.2.6 as of 23 Oct 2026

npm install serve@14.2.6

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

10.0.2

This is the first release that contains the fix.

npm install serve@10.0.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Conclusion

The Cross-Site Scripting (XSS) vulnerability in the serve package prior to version 10.0.2 poses a significant security risk. It is crucial for developers to upgrade to the latest version to ensure the proper encoding of output and prevent the execution of arbitrary JavaScript in users' browsers. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for serve →

Share this vulnerability

FAQ

Cross-Site Scripting (XSS) is a type of security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users. This can lead to the execution of arbitrary code in the victim's browser, compromising their data and potentially enabling further attacks.

The serve package becomes vulnerable to XSS attacks because it fails to properly encode user-supplied input before rendering it. This allows attackers to inject malicious JavaScript code that is executed in the victim's browser.

XSS attacks can have various consequences, including the theft of sensitive information (such as login credentials or personal data), session hijacking, defacement of websites, or the injection of malicious content that can further compromise users or systems.

No, only versions prior to 10.0.2 of the serve package are affected by this XSS vulnerability. It is crucial to update to version 10.0.2 or later to mitigate the risk.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities, using just the package-lock.json file, without requiring access to the code or installation.

Related vulnerabilities

Recent vulnerabilities recorded for serve.

How To Fix

Latest published version: 14.2.6 as of 23 Oct 2026

npm install serve@14.2.6

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

10.0.2

This is the first release that contains the fix.

npm install serve@10.0.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback