Skip to main content
MalwarePublished Updated

@sql-trigger/nodesql (npm) · Malicious Code

Affects @sql-trigger/nodesqlSource GCVE Database

0

Malicious package : remove @sql-trigger/nodesql and rotate any secrets on hosts that installed it.

Data as of 10 Jul 2026, 09:29 UTC

Classification

Malicious package

Published to npm · OSV MAL-2026-5395

What to do

Remove @sql-trigger/nodesql from every project, lockfile and image that pulls it in. Treat any host that installed it as compromised: rotate the credentials, tokens and keys it could read, from a clean machine.

Affected software

ProductAffectedFixed in
npm@sql-trigger/nodesqlAffected
  • =1.0.1
  • =1.0.0
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

Description

--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (39e37d95fb040c83277583e2bf90b56363f86360337f1c30e63c85eb56579ada) The package advertises itself as a simple SQL helper but its main entry index.js is heavily obfuscated (obfuscator.io string-array + RC4 + base64, 218-entry shuffled literal array, two RC4 decoders) with no human-readable logic. After deobfuscation, the top-level IIFE requires os/fs/path/child_process/axios, installs uncaughtException and unhandledRejection handlers to suppress errors, then assembles an IPv4 address at runtime by concatenating four numeric octets with '.', issues an axios HTTP GET to that host, writes the response body into os.tmpdir() with flag 'w+', and invokes child_process exec/spawn on the written file with windowsHide:true and cwd set to the tmp directory. This is a generic remote-binary dropper: the destination is mutable, the payload is opaque and unverified, the URL is built at runtime to evade static scanners, and the fetched file is unrelated to any SQL functionality. The dropper fires the moment any consumer require()s the package, so installing this dependency results in attacker-controlled code being downloaded to and executed from the consumer's temp directory. ## Source: ghsa-malware (af206fa9674f6676548fa54503b38eaa9a0cd31b267e4b7a39598bfde93c0e54) 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

Community reviews

Loading reviews…