Malicious code in example-helpers (npm)

example-helpers Updated 02 Oct 2025

Summary

25/06/2024
CRITICAL
No i
Critical
Not published

MAL-2024-2349: Malicious code in example-helpers (npm). Affects example-helpers versions 25.0.1-ep.2. 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 example-helpers package is an npm package that provides helper functions and utilities for use in example code. It is commonly used by developers to simplify the process of creating example code and demonstrations. The package is an integral part of many projects and is widely relied upon in the npm ecosystem. However, it has been discovered that a malicious code injection has occurred in the package, posing a significant security risk to any project that includes it.

Vulnerability Detail

The vulnerability in the example-helpers package originates from a malicious code injection. The injected code can potentially execute arbitrary commands or perform unauthorized actions on the host system. This can lead to various consequences, including unauthorized access, data breaches, and system compromise. The specific technical details of the code injection are not provided in the vulnerability report. However, it is crucial to address this vulnerability promptly to prevent any potential harm to the affected systems.

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

npm uninstall example-helpers

If it arrived as a transitive dependency, remove the package that pulled it in, then reinstall.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As the vulnerability report does not provide a specific workaround, the recommended course of action is to update the package to a secure version. It is not advisable to attempt manual code modifications or removal of the malicious code without a deep understanding of the package's internals and potential impact on its functionality.

Conclusion

The example-helpers package, commonly used in the npm ecosystem, has been found to contain a malicious code injection. This vulnerability can lead to unauthorized access, data breaches, and compromise of the host system. To mitigate the risk, it is crucial to update the package to a secure version and conduct a thorough security audit. Developers should also follow best practices for secure coding and regularly review package dependencies for potential vulnerabilities.

See every vulnerability recorded for example-helpers →

Share this vulnerability

FAQ

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply provide the package-lock.json file of your project, and Vulert will analyze it in real-time to identify any open-source vulnerabilities, including this specific one.

The vulnerability report indicates that version 25.0.1-ep.2 is affected. Therefore, it is recommended to upgrade to a version beyond this release. However, it is essential to consult the package maintainers and their official documentation for the latest information on secure versions.

The malicious code injection in the example-helpers package can lead to unauthorized access, data breaches, and compromise of the host system. Attackers may exploit this vulnerability to execute arbitrary commands or perform unauthorized actions, potentially causing significant harm to the affected systems.

The primary mitigation for this vulnerability is to update the example-helpers package to a secure version that does not contain the malicious code. Additionally, conducting regular security audits, reviewing package source code, and following best practices for secure coding can help mitigate the risk of similar vulnerabilities in the future.

It is not advisable to attempt manual removal of the malicious code without a deep understanding of the package's internals and potential impact on its functionality. It is recommended to update to a secure version provided by the package maintainers.

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

npm uninstall example-helpers

If it arrived as a transitive dependency, remove the package that pulled it in, then reinstall.

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