MAL-2026-10695
Dashboard / Malicious Package / MAL-2026-10695
MAL-2026-10695
Summary: Malicious code in ai-p2p (npm)
Details: Source: amazon-inspector (8addfcd7b527a107164a782a0a85fad3e318dcbe195643df859a15f159977baa) The package ships a single `index.html` that embeds a hardcoded Google Generative Language API key as a JavaScript constant (`const GEMINI_KEY = "AQ.Ab8RN6...";`) and calls `https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent?key=<KEY>` from the browser when the user clicks the chat button. The key belongs to the package author's own Google account. There are no npm lifecycle scripts (no preinstall/install/postinstall/prepare), and `main` points at the HTML file, so nothing executes on `npm install` or `require()`. The key is not a third-party credential being distributed to installers, nor does the code read or exfiltrate any installer-side data; the only consequence of using the package is that requests consume the author's own Gemini quota. Source: ghsa-malware (51af066ded725d3f36b41a5c4bdf9977a7976293b11fef6c4c63ee894c1f5da2) Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
References: https://github.com/advisories/GHSA-g5cv-hmr5-x42p, https://www.npmjs.com/package/ai-p2p/v/1.0.2, https://www.npmjs.com/package/ai-p2p/v/1.0.0, https://www.npmjs.com/package/ai-p2p/v/1.0.3, https://www.npmjs.com/package/ai-p2p/v/1.0.1, https://www.npmjs.com/package/ai-p2p/v/1.0.4
Affected packages
Package
Name: ai-p2p
Purl: pkg:npm/ai-p2p
Affected ranges
Type: SEMVER
Events:
