envfile-sync-cli@1.0.2
Malicious code in envfile-sync-cli (npm)
Analysis
Package advertises itself as a zero-dependency .env-to-.env.example sync/validation CLI, and indeed ships a complete pure-JavaScript .env parser that does all of the advertised work. Hidden at the end of its main module (src/index.js) is a module-load-time block that resolves bin/native/parser.node and calls process.dlopen on it inside a nested try/catch that silently swallows every error and discards the result. The comment claims this is a native parser loaded for performance, but the parser is implemented entirely in JavaScript and the loaded binary is never used. The bundled bin/native/parser.node is not a Node native addon at all but a Windows PE executable, so on Windows simply importing the package (or running its CLI) loads and executes attacker-controlled native code with no further interaction. The package was freshly published from a disposable email account and stuffed with dotenv/env-sync keywords to attract installs.
- analyzed by
- Leitwacht
- first seen
- Jun 17, 2026, 02:24 AM
- analyzed
- Jun 17, 2026, 02:28 AM
- weekly installs
- 228
hxxps://github[.]com/envfile-sync/envfile-sync Request takedown / dispute →Related advisories
- webpack-patch@1.1.7
- request-js-validator@1.0.3
- qr-code-styling-temp@9.9.10
- chai-utils-test@4.5.1
- chai-utils-test@4.5.4
- dotenv-pack@2.3.7
- chai-as-init@1.4.6
- nullsub@1.11.16
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.