CVE-2018-3731: Path Traversal in public

public Updated 02 Oct 2025

Summary

18/07/2018
Yes i
High
7.5

CVE-2018-3731: Path Traversal in public. Affects public versions < 0.1.3. Fixed in 0.1.3. 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 'public' package is an npm package that provides functionality for handling file paths. It is used by various applications to manage file operations. However, versions of 'public' before 0.1.3 are vulnerable to a path traversal attack. This vulnerability arises due to the lack of file path sanitization, allowing a malicious user to read any file accessible to the parent process on the server.

Vulnerability Detail

The path traversal vulnerability in 'public' allows an attacker to bypass file access restrictions and read sensitive files on the server. By manipulating file paths, an attacker can traverse directories and access files outside the intended scope. This can lead to unauthorized disclosure of sensitive information or the execution of arbitrary code.

How To Fix

Latest published version: 0.1.5 as of 22 Oct 2026

npm install public@0.1.5

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.3

This is the first release that contains the fix.

npm install public@0.1.3

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

Workaround

There is no specific workaround mentioned for this vulnerability. Updating to the latest version of the 'public' package is the recommended solution.

Conclusion

The 'public' package versions prior to 0.1.3 are vulnerable to a path traversal attack, allowing unauthorized access to sensitive files on the server. To mitigate this risk, it is recommended to update to version 0.1.3 or later. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for public →

Share this vulnerability

FAQ

This vulnerability allows an attacker to read sensitive files on the server, potentially leading to unauthorized disclosure of information or the execution of arbitrary code.

You can use the Vulert Playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. It analyzes the package-lock.json file to identify vulnerable dependencies.

While there are no known public exploits for this specific vulnerability, it is important to update to the latest version of the 'public' package to prevent any potential attacks.

The recommended approach is to update to the latest version of the 'public' package. However, if updating is not feasible, you can consider implementing additional security measures such as access controls and input validation to mitigate the risk.

There is no evidence of active exploitation of this vulnerability at the moment. However, it is crucial to update to the latest version of the 'public' package to ensure the security of your application.

Related vulnerabilities

Recent vulnerabilities recorded for public.

How To Fix

Latest published version: 0.1.5 as of 22 Oct 2026

npm install public@0.1.5

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.3

This is the first release that contains the fix.

npm install public@0.1.3

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