Critical Malicious Code Vulnerability in api-anthropic Package
Summary
MAL-2026-18055: Malicious code in api-anthropic (npm). Affected versions are not published. No fix is published. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
The api-anthropic package is a Node.js library designed for integrating with the Anthropic API, providing developers with tools to interact with AI models. It is widely used in applications that require natural language processing capabilities. However, this package has been compromised, leading to significant security concerns for any system utilizing it.
Vulnerability Detail
The vulnerability stems from the presence of malicious code embedded within the api-anthropic package. This code can compromise any computer that has the package installed, potentially allowing unauthorized access to sensitive information such as secrets and keys. The malicious nature of this code is classified under CWE-506, indicating that it appears to be intentionally harmful. Users should treat any system running this package as fully compromised.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall api-anthropic
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 are no effective workarounds for this vulnerability other than removing the package entirely. Ensure that your application does not rely on the api-anthropic package and consider using alternative libraries that provide similar functionality without the associated risks.
Conclusion
The api-anthropic package has been identified as containing malicious code, posing a significant security threat to any system using it. Immediate action is required to remove the package and secure sensitive information. Users are encouraged to utilize tools like Vulert for ongoing monitoring of vulnerabilities in their software.
See every vulnerability recorded for api-anthropic →
FAQ
Immediately uninstall the package using npm uninstall api-anthropic and rotate any sensitive information stored on the affected system.
You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check your application without any signup.
Failing to remove the package may lead to unauthorized access to sensitive data and complete compromise of your system.
After removing the package, rotate all secrets and keys stored on the affected system and monitor for any unusual activity.
Yes, consider using other libraries that provide similar functionalities without the associated security risks.