Malicious Code Detected in instagram-basic-display-api: A Critical Security Alert
Summary
MAL-2025-6934: Malicious code in instagram-basic-display-api (npm). Affects instagram-basic-display-api versions >= 5.9.2. 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 instagram-basic-display-api is an npm package designed to facilitate interaction with Instagram's Basic Display API. It allows developers to access user profile data and media, enabling seamless integration of Instagram features into applications. However, this package has been identified as having a vulnerability that exposes users to potential malicious activities.
Vulnerability Detail
The vulnerability arises from the package's communication with a domain associated with malicious activity. This can lead to unauthorized access to sensitive data, potential data breaches, and exploitation of the application using this package. The issue was introduced in version 5.9.2, making it critical for users of this version and later to take immediate action.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall instagram-basic-display-api
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 a temporary measure, you can avoid using the affected version of the package by downgrading to a previous version that does not have this vulnerability. Use the following command to install a specific version: npm install instagram-basic-display-api@5.9.1.
Conclusion
The instagram-basic-display-api package has a critical vulnerability that needs immediate attention. Users are advised to update to a patched version or implement workarounds to mitigate risks. Utilizing tools like Vulert can help monitor and manage vulnerabilities effectively.
See every vulnerability recorded for instagram-basic-display-api →
FAQ
The vulnerability involves the package communicating with a domain linked to malicious activities, posing risks to user data and application security.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check your application without needing to sign up.
If an immediate update is not possible, consider downgrading to a previous version of the package that is not affected by this vulnerability.
Yes, continuing to use the vulnerable version increases the risk of unauthorized access to sensitive data and potential exploitation of your application.
Detailed information about the vulnerability can be found in the package's repository and on security advisory platforms like GitHub.