Path Traversal Vulnerability in statics-server

statics-server Updated 02 Oct 2025

Summary

05/06/2019
MODERATE
No i
Moderate
Not published

GHSA-74cp-qw7f-7hpw: Path Traversal in statics-server. Affects statics-server versions < 0.0.9. 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 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

The statics-server package is an npm module used for serving static files over HTTP. It allows developers to quickly set up a server to serve static assets such as HTML, CSS, JavaScript, and images. The package is widely used in web development projects to facilitate the local testing and deployment of static files. However, all versions of statics-server are vulnerable to a Path Traversal vulnerability.

Vulnerability Detail

The Path Traversal vulnerability in statics-server arises from insufficient input sanitization. Attackers can exploit this vulnerability by using relative paths to access server files that should not be publicly accessible. By manipulating the file path in the HTTP request, an attacker can traverse the directory structure and access sensitive files on the server. This can lead to unauthorized disclosure of sensitive information or even remote code execution.

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 input validation and sanitization on the server-side to prevent path traversal attacks. This can be done by checking the requested file path against a whitelist of allowed paths or by using a library or framework that automatically handles input sanitization. Here is an example of how to implement input validation using Express.js:

const express = require('express');
const app = express();

app.get('/static/:file', (req, res) => {
  const { file } = req.params;
  // Validate and sanitize the file path
  const sanitizedFilePath = validateAndSanitizeFilePath(file);
  // Serve the file
  res.sendFile(sanitizedFilePath);
});

function validateAndSanitizeFilePath(filePath) {
  // Implement your validation and sanitization logic here
  // Return the sanitized file path
}

Conclusion

The statics-server package is vulnerable to a Path Traversal vulnerability that allows attackers to access sensitive files on the server. Currently, there is no fix available for this vulnerability. It is recommended to use an alternative module and implement input validation and sanitization on the server-side to mitigate the risk. Regularly checking for updates and security advisories related to statics-server is crucial to ensure the latest patched version is used once a fix is released. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for statics-server →

Share this vulnerability

FAQ

The Path Traversal vulnerability in statics-server allows attackers to access sensitive files on the server that should not be publicly accessible. This can lead to unauthorized disclosure of sensitive information or even remote code execution.

Yes, all versions of statics-server are vulnerable to this Path Traversal vulnerability.

No, currently there is no fix available for this vulnerability in the statics-server package. It is recommended to use an alternative module until a fix is released.

To protect your application from this vulnerability, you can implement input validation and sanitization on the server-side to prevent path traversal attacks. Additionally, regularly checking for updates and security advisories related to statics-server is important to ensure you are using the latest patched version once a fix is released.

You can find more information about this vulnerability in the GitHub Security Advisory Database. The vulnerability ID is GHSA-74cp-qw7f-7hpw.

Related vulnerabilities

Recent vulnerabilities recorded for statics-server.

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