Malicious Package in precode.js

precode.js Updated 02 Oct 2025

Summary

11/09/2020
CRITICAL
No i
Critical
Not published

GHSA-5w4r-wwc3-6qcp: Malicious Package in precode.js. Affects precode.js versions 1.1.1. 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

precode.js is an npm package that provides functionality for pre-formatting code snippets in web applications. It is commonly used to display code examples with syntax highlighting. The package is designed to enhance the user experience by making code snippets more readable and visually appealing. However, version 1.1.1 of precode.js contained a malicious code that poses a significant security risk to applications using this version.

Vulnerability Detail

The vulnerability in precode.js version 1.1.1 involves the inclusion of malicious code that extracts sensitive information from web forms. When executed in the browser, the code specifically targets password, cvc, and cardnumber fields in forms and sends the extracted values to a remote server at https://js-metrics.com/minjs.php?pl=. This unauthorized data collection can lead to severe consequences, including unauthorized access to user accounts, financial fraud, and privacy breaches. It is crucial to remove the affected package and assess the potential compromise of user data.

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 →

Conclusion

In conclusion, the precode.js package version 1.1.1 contains a critical vulnerability that allows unauthorized extraction of sensitive user information. It is crucial to remove the affected package, evaluate the potential compromise of user data, and take necessary steps to mitigate the risk. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for precode.js →

Share this vulnerability

FAQ

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Vulert analyzes your package-lock.json file and provides real-time alerts for open-source vulnerabilities.

The potential consequences of this vulnerability include unauthorized access to user accounts, financial fraud, and privacy breaches. It is crucial to take immediate action to mitigate these risks.

Unfortunately, there is no known workaround for this vulnerability. It is recommended to remove the affected package and evaluate your application for potential compromise of user data.

Yes, version 1.1.0 of precode.js is not affected by this vulnerability. If possible, consider downgrading to this version to mitigate the risk.

To protect user data, it is recommended to implement input validation to prevent malicious code execution and encryption to secure sensitive information. Regular security audits and updates of dependencies are also essential.

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