Malicious code in functions-framework-nodejs (npm)
functions-framework-nodejs is a typosquat package on npm that executes a postinstall script to exfiltrate the installer's Unix user/group identity to a hardcoded webhook.site URL. The package masquerades as Google's legitimate @google-cloud/functions-framework library.
- Disclosed
- Last updated
- Blast radius
- Any developer or CI/CD system that installed functions-framework-nodejs from npm
- Ecosystems
- Attack vectors
- Affected entities
- functions-framework-nodejsTyposquat of @google-cloud/functions-framework
The npm package functions-framework-nodejs is a typosquat of Google's legitimate @google-cloud/functions-framework. Upon installation, the package's postinstall hook executes install.js, which runs execSync("id") to capture the installer's Unix user and group identity.
The captured identity information—including the package name, version, and timestamp—is then exfiltrated via HTTP POST to a hardcoded webhook.site collector URL controlled by the attacker. The package's advertised library surface (index.js) is a minimal stub that only exports the package name and version, making identity exfiltration its sole functional effect.
The package metadata falsely labels itself as "For Security Research" by author "Berserk," but this disclaimer does not prevent the malicious behavior. Any developer or automated system installing this package will have their host identity sent to a third-party endpoint without explicit configuration or consent.
This incident was identified and credited to the OpenSSF's malicious-packages repository.
Indicators of compromise
- Packages
- functions-framework-nodejs
Remediation
- Immediately uninstall functions-framework-nodejs from all systems and CI/CD pipelines
- Use the legitimate @google-cloud/functions-framework package instead
- Audit npm install logs to identify systems that installed the malicious package
- Rotate credentials and review access logs for any systems that may have been compromised
- Add typosquat detection and package name verification to dependency management processes
- Monitor for similar typosquats of popular Google Cloud packages
Sources
- GitHub Advisory GHSA-7gwg-w46g-wm99 · GitHub Advisory Database
Cite this entry
"Malicious code in functions-framework-nodejs (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 13, 2026; last updated August 13, 2026. https://supplychainattack.org/incident/malicious-code-in-functions-framework-nodejs-npm-tdaqgf
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- resolvedcritical
Malicious code in akamai-sensor (npm)
A malicious npm package named akamai-sensor impersonated Akamai's legitimate sensor_data anti-bot SDK. The package contained hidden JavaScript code concealed using invisible Unicode characters and implemented a dynamic command-and-control channel via a Google Calendar dead-drop, enabling arbitrary code execution on installation.
npmCompromised packageTyposquatting - resolvedcritical
Malicious code in depcruise-wrap-stream-in-html (npm)
depcruise-wrap-stream-in-html@99.9.1 is a malicious npm package that mimics an internal helper of dependency-cruiser. It is a hollow package that downloads and executes arbitrary code from a Google Cloud Storage bucket during installation.
npmCompromised packageDependency confusionTyposquatting - resolvedcritical
Malicious code in @finaxis/common-js (npm)
The npm package @finaxis/common-js was published with a README and keywords copied from lodash v4.18.1, but contained a heavily obfuscated Xelis (XEL) proof-of-work cryptominer instead of lodash functionality. Consumers installing this package would unknowingly run a covert CPU/GPU miner on their systems.
npmCompromised packageTyposquatting - containedcritical
Malicious code in @polymarkets/clob-client-v2 (npm)
@polymarkets/clob-client-v2 (npm) is a malicious package that typosquats the legitimate @polymarket scope and redirects its inquirer dependency to a lookalike npm registry (registrynpmjs.to) to deliver arbitrary code execution during installation and on first require.
npmTyposquattingCompromised packageDependency confusion