CVE-2022-2908: Malicious code in example-api-routes (npm)

example-api-routes Updated 02 Oct 2025

Summary

20/06/2022
CRITICAL
No i
Critical
Not published

MAL-2022-2908: Malicious code in example-api-routes (npm). Affected versions are not published. 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

The example-api-routes package is an npm package that provides API routes for building web applications. It is commonly used in Node.js projects to handle HTTP requests and define the routes for different endpoints. This package is vulnerable to a malicious code injection attack, which can compromise the security of the system it is installed on.

Vulnerability Detail

The vulnerability in example-api-routes (npm) is due to the presence of malicious code in the package. This code can be used by an attacker to gain full control of the computer where the package is installed. As a result, all secrets and keys stored on that computer should be rotated immediately from a different computer. Removing the package may not guarantee the removal of all malicious software installed as a result of its installation. The impact of this vulnerability can be severe, as it can lead to unauthorized access to sensitive information and potential further exploitation of the compromised system.

How To Fix

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

npm uninstall example-api-routes

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

There is no specific workaround mentioned for this vulnerability. It is crucial to follow the steps mentioned in the 'how_to_fix' section to mitigate the risk and ensure the security of the system.

Conclusion

The presence of malicious code in the example-api-routes package poses a significant security risk. It is crucial to take immediate action by rotating all secrets and keys, removing the package, conducting a security audit, updating dependencies, and monitoring the system for any suspicious activities. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for example-api-routes →

Share this vulnerability

FAQ

example-api-routes is an npm package used for defining API routes in Node.js web applications.

The malicious code can give full control of the computer to an outside entity, potentially leading to unauthorized access and compromise of sensitive information.

If the example-api-routes package is installed, all secrets and keys stored on the computer should be rotated immediately from a different computer. The package should be removed, but it is important to note that removing the package may not remove all malicious software installed as a result of its installation.

To fix the vulnerability, it is recommended to rotate all secrets and keys, remove the example-api-routes package, perform a security audit, update other packages and dependencies, and monitor the system for any suspicious activities.

The potential consequences of this vulnerability include unauthorized access to sensitive information, further exploitation of the compromised system, and potential damage to the affected organization.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

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

npm uninstall example-api-routes

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