CVE-2018-3718: serve - Improper Handling of URL Encoding

serve Updated 02 Oct 2025

Summary

09/08/2021
Yes i
Moderate
5.3

CVE-2018-3718: vercel/serve allows access to restricted files if filename is URL encoded. Affects serve versions < 6.5.2. Fixed in 6.5.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 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 node module is an npm package that provides a simple HTTP server for static files. It allows developers to quickly serve static content such as HTML, CSS, and JavaScript files. The package is widely used in web development projects to facilitate local development and testing.

Vulnerability Detail

The serve node module suffers from an improper handling of URL encoding vulnerability. This vulnerability allows access to ignored files if a filename is URL encoded. An attacker can exploit this vulnerability by crafting a specially encoded filename to bypass the intended file access restrictions. This can lead to unauthorized access to sensitive files and potential information disclosure.

How To Fix

Minimum fixed version

6.5.2

This is the first release that contains the fix.

npm install serve@6.5.2

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

Workaround

There is no known workaround for this vulnerability. It is essential to update the serve module to the latest version to mitigate the risk.

Conclusion

The serve node module is vulnerable to an improper handling of URL encoding, which can lead to unauthorized access to ignored files. To mitigate this vulnerability, it is crucial to update the serve module to version 6.5.2 or later. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for serve →

Share this vulnerability

FAQ

This vulnerability allows unauthorized access to ignored files, potentially leading to information disclosure.

You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply upload your package-lock.json file to the playground, and it will alert you if the serve module is vulnerable.

There are no known public exploits for this vulnerability at the time of this report. However, it is crucial to update the serve module to the latest version to prevent potential exploitation.

No, updating the serve module to the latest version is the recommended solution to mitigate the risk associated with this vulnerability.

Related vulnerabilities

Recent vulnerabilities recorded for serve.

How To Fix

Minimum fixed version

6.5.2

This is the first release that contains the fix.

npm install serve@6.5.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