Path Traversal Vulnerability in public npm package

public Updated 02 Oct 2025

Summary

03/09/2020
MODERATE
No i
Moderate
Not published

GHSA-4vvp-x9h2-x2vf: Path Traversal in public. Affects public versions >= 0.0.0. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The public npm package is a module used for serving static files in Node.js applications. It allows developers to easily serve files from a specified directory. However, all versions of public are vulnerable to a Path Traversal vulnerability. This vulnerability enables an attacker to access files outside the webroot by exploiting symlink navigation in the URL.

Vulnerability Detail

The Path Traversal vulnerability in the public npm package allows an attacker to bypass the intended restrictions and access files outside the webroot. By manipulating the URL and utilizing symlink navigation, an attacker can traverse the file system and retrieve sensitive information or execute arbitrary code. This vulnerability poses a moderate risk and can lead to unauthorized access, data leakage, or 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 official fix for this vulnerability, a workaround is to implement additional security measures in your application. One possible approach is to manually validate and sanitize user input to prevent any malicious attempts at path traversal. Additionally, you can implement access controls and enforce strict file permissions to limit the potential impact of this vulnerability.

Conclusion

The public npm package is vulnerable to a Path Traversal vulnerability that allows attackers to access files outside the webroot. Currently, there is no fix available, and it is recommended to avoid using this package in production environments. Implementing additional security measures and monitoring for updates can help mitigate the risk. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for public →

Share this vulnerability

FAQ

The Path Traversal vulnerability in the public npm package allows an attacker to access files outside the webroot, potentially leading to unauthorized access, data leakage, or remote code execution.

Yes, all versions of the public npm package are vulnerable to this Path Traversal vulnerability.

Currently, there is no fix available for this vulnerability. It is recommended to avoid using the public package in production environments or consider using an alternative module.

To mitigate the risk, you can implement additional security measures such as input validation and access controls. It is also recommended to monitor the official repository for any updates or patches that may address this vulnerability.

Related vulnerabilities

Recent vulnerabilities recorded for public.

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