Malicious code in ambera (npm)
The npm package ambera contains malicious code that performs arbitrary remote code execution via a hardcoded HTTPS endpoint with disabled TLS verification. The getPlugin() function fetches and executes JavaScript from a lookalike Avalanche RPC endpoint, injecting the Node require function to enable full system access.
- Disclosed
- Last updated
- Blast radius
- Any npm consumer of the ambera package
- Ecosystems
- Attack vectors
- Affected entities
- amberanpm package presenting as SVG helper with embedded remote code execution
The npm package ambera was published with deliberately concealed malicious functionality. While presented as a zero-dependency SVG helper utility, the package's exported getPlugin() function contains embedded remote code execution capability.
When getPlugin() is called, it performs an HTTPS GET request to the hardcoded host https://api.avax-test.dev/ext/bc/rpc with TLS certificate verification disabled (rejectUnauthorized: false). The response body is then passed directly to new Function('require', data)(require), executing arbitrary JavaScript with the Node.js require function injected into the execution context.
The destination host api.avax-test.dev is a deliberate lookalike of the legitimate Avalanche Fuji RPC endpoint api.avax-test.network. The package's use of Avalanche/Snowtrace variable naming serves as cover story labeling unrelated to its actual SVG utility purpose, further indicating intentional obfuscation of the malicious functionality.
The combination of disabled TLS verification, hardcoded remote execution, and deceptive packaging indicates this was a deliberately concealed supply chain attack vector. Any caller of getPlugin() would execute attacker-controlled code with full Node.js capabilities on their machine.
Indicators of compromise
- Packages
- ambera
- Domains
- api.avax-test.dev
Remediation
- Immediately remove the ambera package from all projects and dependencies
- Audit all systems where ambera was installed for signs of compromise or unauthorized access
- Review npm audit logs and package-lock.json files to identify all affected installations
- If getPlugin() was called, assume arbitrary code execution occurred and perform full security incident response
- Update to a safe alternative SVG helper library with proper security review
- Consider implementing package pinning and integrity verification in your dependency management
Sources
- GitHub Advisory GHSA-2c89-35wj-62r2 · GitHub Advisory Database
Cite this entry
"Malicious code in ambera (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 19, 2026; last updated August 19, 2026. https://supplychainattack.org/incident/malicious-code-in-ambera-npm-75w0w0
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- containedcritical
Malicious code in 3-buildsight-web (npm)
The npm package 3-buildsight-web contains malicious code that fetches and executes arbitrary JavaScript from a remote Bitbucket URL on module load, granting full page privileges to an unverified third party.
npmCompromised package - resolvedcritical
Malicious code in @usaa-grp-personal-profile/personal-profile-common (npm)
Malicious package @usaa-grp-personal-profile/personal-profile-common version 999.0.0 published to public npm as a dependency-confusion attack targeting an organization's internal registry. The package contains preinstall and postinstall hooks that exfiltrate hostname, username, and working directory to an attacker-controlled OAST endpoint on every install.
npmDependency confusionCompromised package - resolvedcritical
Malicious code in create-coin (npm)
create-coin@20.1.1 on npm contained malicious postinstall code that collected sensitive environment variables, credentials, and host reconnaissance data. The package impersonated an esbuild platform build and exfiltrated data to a hardcoded endpoint.
npmCompromised packageTyposquatting - resolvedcritical
Malicious code in @syncraft-labs/vue (npm)
The npm package @syncraft-labs/vue version 0.4.1 contained malicious obfuscated code in its ESM build that implements a blockchain-hosted C2 dropper (EtherHiding pattern), enabling remote code execution on any consumer importing the package.
npmCompromised package