CVE-2019-15600: Cross-Site Scripting in http_server

http_server Updated 02 Oct 2025

Summary

31/03/2020
No i
High
7.5

CVE-2019-15600: Cross-Site Scripting in http_server. Affects http_server versions < 1.0.12. No fix is published. 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

The http_server package is an npm package used for creating HTTP servers in Node.js applications. It provides functionality for handling HTTP requests and serving static files. The package is vulnerable to Cross-Site Scripting (XSS) attacks due to a lack of sanitization of filenames. This allows attackers to execute arbitrary JavaScript code in the victim's browser by uploading files with malicious names.

Vulnerability Detail

The vulnerability in the http_server package arises from the failure to properly sanitize filenames. When a user uploads a file with a name containing malicious JavaScript code, the code gets executed in the victim's browser when they access the file. This can lead to various consequences, including unauthorized access to sensitive information, session hijacking, and defacement of web pages. The vulnerability has a severity rating of HIGH and is classified under CWE-22.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As there is no fix available, a possible workaround is to implement additional server-side validation and sanitization of filenames before processing or serving them. This can be done by checking for potentially malicious characters or patterns in the filenames and rejecting or sanitizing them accordingly. Here's an example in Node.js:

const sanitizeFilename = (filename) => {
  // Implement your sanitization logic here
};

const handleFileUpload = (req, res) => {
  const uploadedFilename = req.body.filename;
  const sanitizedFilename = sanitizeFilename(uploadedFilename);
  // Process or serve the file with the sanitized filename
};

Conclusion

The http_server package is vulnerable to Cross-Site Scripting (XSS) attacks due to a lack of sanitization of filenames. Currently, no fix is available, and it is recommended to consider using an alternative package that addresses this issue. Implementing additional server-side validation and sanitization of filenames can help mitigate the risk. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for http_server →

Share this vulnerability

FAQ

The vulnerability allows attackers to execute arbitrary JavaScript code in the victim's browser, potentially leading to unauthorized access, session hijacking, or defacement of web pages.

No, currently there is no fix available for the http_server package. It is recommended to consider using an alternative package that addresses this issue.

To mitigate the risk, you can implement additional server-side validation and sanitization of filenames before processing or serving them. This can help prevent the execution of malicious JavaScript code.

Cross-Site Scripting (XSS) is a type of security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users. It can be used to steal sensitive information, perform actions on behalf of the victim, or deface websites.

You can find more information about this vulnerability in the GitHub Advisory Database. Additionally, you can use Vulert (https://vulert.com) to monitor and receive real-time alerts for open-source vulnerabilities in your software.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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