CVE-2018-3716: Stored Cross-Site Scripting in simplehttpserver

simplehttpserver Updated 02 Oct 2025

Summary

26/07/2018
Yes i
Moderate
5.4

CVE-2018-3716: Stored Cross-Site Scripting in simplehttpserver. Affects simplehttpserver versions < 0.1.0. Fixed in 0.1.0. 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Simplehttpserver is an npm package that provides a basic HTTP server for serving static files. It allows users to easily create a local web server for testing and development purposes. However, versions prior to 0.1.0 are vulnerable to stored cross-site scripting (XSS) attacks. This means that an attacker can inject malicious code into the directory listing output by controlling the filename of a file. The vulnerability has a CVSS score of 5.4, indicating a moderate severity level.

Vulnerability Detail

The stored cross-site scripting vulnerability in simplehttpserver arises from a lack of proper input sanitization. When generating the directory listing, the package fails to properly escape or filter user-controlled input, allowing an attacker to inject arbitrary JavaScript code. If a victim accesses the directory listing and interacts with the malicious file, the injected code will execute in their browser, potentially leading to session hijacking, data theft, or other malicious activities.

How To Fix

Latest published version: 0.3.0 as of 22 Oct 2026

npm install simplehttpserver@0.3.0

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

If you need the minimum change

0.1.0

This is the first release that contains the fix.

npm install simplehttpserver@0.1.0

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

Workaround

If updating the package is not immediately feasible, a temporary workaround is to disable the directory listing feature or implement input sanitization manually. Disabling the directory listing can be achieved by modifying the server configuration or removing the affected files. However, it is strongly advised to update to the patched version as soon as possible.

Conclusion

In conclusion, simplehttpserver versions prior to 0.1.0 are vulnerable to stored cross-site scripting (XSS). This can allow attackers to inject and execute malicious code in the browsers of users accessing the directory listing. To mitigate this vulnerability, it is crucial to update to version 0.1.0 or later. Disabling the directory listing feature or implementing input sanitization manually can serve as temporary workarounds. For further assistance with vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for simplehttpserver →

Share this vulnerability

FAQ

Stored cross-site scripting (XSS) is a type of web vulnerability where an attacker injects malicious code into a website or web application. The injected code is then stored on the server and served to other users, potentially leading to the execution of the malicious code in their browsers.

To exploit this vulnerability, an attacker needs to control the filename of a file used in the directory listing output. By injecting malicious code into the filename, the attacker can trick victims into executing the code when accessing the directory listing.

The consequences of this vulnerability can vary depending on the attacker's intentions. Possible outcomes include session hijacking, data theft, defacement of the website, or the injection of additional malware onto the victim's system.

Yes, the vulnerability is fixed in version 0.1.0 of the simplehttpserver package. It is recommended to update to this version or later to mitigate the risk of exploitation.

Yes, disabling the directory listing feature can serve as a temporary workaround. By modifying the server configuration or removing the affected files, you can prevent the exposure of the vulnerable directory listing. However, updating to the patched version is still the recommended long-term solution.

Related vulnerabilities

Recent vulnerabilities recorded for simplehttpserver.

How To Fix

Latest published version: 0.3.0 as of 22 Oct 2026

npm install simplehttpserver@0.3.0

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

If you need the minimum change

0.1.0

This is the first release that contains the fix.

npm install simplehttpserver@0.1.0

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