gugodapis@1.0.0
Malicious code in gugodapis (npm)
Analysis
gugodapis@1.0.0 ships no real library functionality. Its only file, gugodapis.js, exports a single function, executeRemoteBatchScript(), that downloads a Windows batch file named anmern.bat from a Discord CDN attachment URL and executes it on the host. The function fetches hxxps://cdn[.]discordapp[.]com/attachments/1230359189717782621/1238125874927108219/anmern[.]bat?[.][.]. with axios (arraybuffer response), writes the response body to path.join(process.env.TEMP || '/tmp', 'anmern.bat'), and immediately runs the written file with child_process.exec(). There is no signature check, hash check or destination allowlist, so whatever the remote attachment contains executes with the caller's privileges. The package declares no bin entry and no install-time lifecycle hook, so the download-and-execute only happens when a consuming application calls the exported function; the dropper is therefore disguised as a utility module (its file header is labelled "myapi.js"). The staging host is a Discord attachment (cdn[.]discordapp[.]com), a service commonly abused to host short-lived payloads, and the URL carries expiring signed parameters (ex=/is=/hm=). package.json additionally lists Node built-ins fs, path and child_process as ordinary npm dependencies, which resolves them to unrelated third-party registry packages. The second-stage batch file (anmern.bat) is remote and not part of the package, so its contents are unknown from the package bytes.
- analyzed by
- Leitwacht
- first seen
- Nov 4, 2026, 09:05 AM
- analyzed
- Nov 4, 2026, 09:05 AM
Related advisories
- calkyippie@1.0.0
- @tjmlgd/svg@1.0.5
- nebulaai-sdk@1.0.0
- chromatitle@1.0.0
- @syncraft-labs/vue@0.4.1
- @wizloft/harness-kernel@0.1.1-alpha.3
- @wizloft/harness-context@0.1.1-alpha.3
- @wizloft/harness@0.1.1-alpha.3
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.