CVE-2018-3747: Cross-Site Scripting in public

public Updated 02 Oct 2025

Summary

10/10/2018
Yes i
Moderate
6.1

CVE-2018-3747: Cross-Site Scripting in public. Affects public versions < 0.1.4. Fixed in 0.1.4. 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 module that is used for handling public files. It allows users to upload and manage files on a web server. However, versions prior to 0.1.4 of the 'public' package are vulnerable to Cross-Site Scripting (XSS) attacks. This vulnerability occurs due to the package's failure to properly sanitize filenames, which allows attackers to execute arbitrary JavaScript code in the victim's browser through files with malicious names.

Vulnerability Detail

The Cross-Site Scripting (XSS) vulnerability in the 'public' package can have severe consequences. Attackers can exploit this vulnerability by uploading files with malicious names that contain JavaScript code. When a user accesses these files, the JavaScript code is executed in their browser, allowing the attacker to perform various malicious actions, such as stealing sensitive information, manipulating web content, or performing unauthorized actions on behalf of the user. This vulnerability has a CVSS score of 6.1, indicating a moderate severity level.

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

This is the first release that contains the fix.

npm install public@0.1.4

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

Conclusion

The 'public' package prior to version 0.1.4 is vulnerable to Cross-Site Scripting (XSS) attacks. Upgrading to version 0.1.4 or later is necessary to fix this vulnerability. It is recommended to regularly update packages and use tools like Vulert to monitor and mitigate open-source vulnerabilities. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for public →

Share this vulnerability

FAQ

This vulnerability allows attackers to execute arbitrary JavaScript code in the victim's browser, potentially leading to unauthorized actions, data theft, or manipulation of web content.

You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. The playground analyzes your package-lock.json file and provides real-time alerts for open-source vulnerabilities, including this XSS vulnerability in the 'public' package.

No, there are no known workarounds for this vulnerability. It is recommended to upgrade to the latest version of the 'public' package to fix the issue.

There is no specific evidence of active exploits targeting this vulnerability. However, it is crucial to promptly upgrade to the patched version to mitigate the risk of potential attacks.

This vulnerability was discovered and reported by the GitHub Security Lab.

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

This is the first release that contains the fix.

npm install public@0.1.4

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