CVE-2019-5417: Directory Traversal in serve

serve Updated 02 Oct 2025

Summary

25/03/2019
Yes i
High
7.5

CVE-2019-5417: Directory Traversal in serve. Affects serve versions < 7.1.3. Fixed in 7.1.3. 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 Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The serve package is an npm package used for serving static files locally. It provides a simple command-line interface to start a local server and serve files from a specified directory. The package is commonly used in web development projects to quickly test and preview static content. However, versions of serve before 7.1.3 are vulnerable to a Directory Traversal attack.

Vulnerability Detail

The vulnerability in serve versions before 7.1.3 is due to the lack of proper sanitization of file paths. This allows an attacker to manipulate the file path and access unauthorized system files. By exploiting this vulnerability, an attacker can potentially read sensitive files, modify critical system files, or execute arbitrary code on the target system. The impact of this vulnerability can be severe, leading to unauthorized access and potential compromise of the system.

How To Fix

Minimum fixed version

7.1.3

This is the first release that contains the fix.

npm install serve@7.1.3

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

Conclusion

The serve package versions before 7.1.3 are vulnerable to a Directory Traversal attack. This vulnerability allows unauthorized access to system files, potentially leading to severe consequences such as unauthorized data access or system compromise. To protect against this vulnerability, it is crucial to upgrade to version 7.1.3 or later of the serve package. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for serve →

Share this vulnerability

FAQ

The serve package is an npm package used for serving static files locally. It provides a simple command-line interface to start a local server and serve files from a specified directory.

Directory Traversal is a vulnerability that allows an attacker to access files and directories outside the intended scope. In this case, it allows unauthorized access to system files.

The potential consequences of this vulnerability include unauthorized access to sensitive files, modification of critical system files, and potential execution of arbitrary code on the target system.

You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. The playground allows you to analyze your package-lock.json file and identify any open-source vulnerabilities, including this one.

No, there is no known workaround for this vulnerability. It is recommended to upgrade to the latest version of the serve package to mitigate the risk.

Related vulnerabilities

Recent vulnerabilities recorded for serve.

How To Fix

Minimum fixed version

7.1.3

This is the first release that contains the fix.

npm install serve@7.1.3

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