react-svg-chunk@1.1.0
Malicious code in react-svg-chunk (npm)
Analysis
Package "react-svg-chunk" pretends to be a React SVG helper but is a C2-controlled remote code execution loader. Its `getPlugin()` function (exported as a public API) fetches JavaScript payloads from `bet[.]slotgambit[.]com/icons/101` and executes them via `new Function(...)` with full Node.js capability (`require`, `process`, `Buffer`, etc.) — making it a remote-access trojan controlled by the attacker's server. The dependency list directly supports credential theft and exfiltration: `@primno/dpapi` (Windows DPAPI credential decryption), `node-machine-id` (machine fingerprinting), `better-sqlite3` (local data store), `axios` + `socket[.]io-client` + `request` (multiple exfiltration channels). The package additionally ships a real OpenSSH ED25519 private key (`package/gitlab` with matching `package/gitlab.pub`) belonging to `testm@DESKTOP-PO28IS1`, suggesting the attacker leaked their own SSH credential. The publisher (`[account] No lifecycle hook is needed — the malware activates when a victim imports the package and calls any function that triggers the C2 fetch-and-eval chain.
- analyzed by
- Leitwacht
- first seen
- Jun 13, 2026, 01:38 AM
- analyzed
- Jun 13, 2026, 01:39 AM
Related advisories
- pt-logger-telemetry-eax0x1@1.0.0
- pretty-pino-logger@2.0.2
- prettlog@1.0.10
- ttspc-server-sample@9.0.0
- polymarket-onchain-plugin@2.1.3
- polymarket-ai-agent@0.1.0
- polygon-bitquery-apis@2.2.3
- pocbitbarrontest@1.0.0
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.