Repository navigation
SECURITY: dotenvx: distrust emSign G3 (CVE-2026-111943) - #1116
Conversation
CVE-2026-111943) The release binary embeds Node v20.20.0, whose compiled-in root store still holds emSign ECC Root CA - G3. yao-pkg's node ignores NODE_OPTIONS and Node 20 has no NODE_USE_SYSTEM_CA, so no wrapper can change its store. Install upstream's source release with its package-lock (npm ci, prod deps, all pure JS) and run it on node-lts 24.22.1, which drops the emSign roots and blocks the 8 compromised keys. A new test checks the CLI runs on the node runtime dep and that its default store holds none of the removed roots. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reached
This review includes 2 billable files and costs up to $0.50.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 59 minutes for your next included review. View limit details
Comment |
mitodrummer
left a comment
There was a problem hiding this comment.
Verified the v2.38.2 source tarball sha256 (521cee25...) against GitHub. The lockfile's 9 production deps carry no install scripts, and src/cli/dotenvx.js is mode 0775 with a #!/usr/bin/env node shebang, so the symlinked entry point runs. The emSign fingerprints match node-lts's test and the layout follows the node-lts conventions in AGENTS.md; CI is green.
Why
CVE-2026-111943 (eMudhra intermediate key compromise, Mozilla bug 2083449). The dotenvx release binary is a yao-pkg executable around Node v20.20.0. Its compiled-in root store still holds emSign ECC Root CA - G3.
This matters for dotenvx in particular. It talks HTTPS to its key service (
dotenvx armor,dotenvx curl, and the background event worker) and sends bearer tokens. The truststore audit (pkgmgr-rs#1091, fleet run e75e32d0) lists it asshipped, and pkgmgr-rs#1017 tracks it.Why not a wrapper
The planned fix was a wrapper that exports
NODE_USE_SYSTEM_CA=1orNODE_OPTIONS=--use-openssl-ca. Neither works here. Checked in a min box against the 2.38.2 binary:NODE_OPTIONSis ignored. yao-pkg's node doesn't read it:process.execArgvstays empty, and the binary still connects to the emSign hosts withNODE_OPTIONS=--use-openssl-ca, with or withoutSSL_CERT_FILE.NODE_USE_SYSTEM_CAcan't remove the root. Node 20 doesn't have it. On node 22.15+ it only adds the system store to the bundled one, so the bundled root would still be trusted.NODE_OPTIONSto its worker anyway. The background worker that does the HTTP gets only an allowlisted environment (src/lib/events/workerEnvironment.js), andNODE_OPTIONSisn't on it.An upstream bump wouldn't help either: a newer embedded node keeps its own bundled store unless it's rebuilt with the fixed roots.
What
npm ci --omit=dev --ignore-scriptsuses upstream'spackage-lock.json. The 9 production deps are all pure JS, with no install scripts. It installs into the private prefixusr/libexec/dotenvx, withusr/bin/dotenvxa relative symlink tosrc/cli/dotenvx.js. This is the convention cf and mermaid-cli use.npm i -g @dotenvx/dotenvx). The code branches onprocess.pkgfor the binary-only paths.dotenvx updatenow prints the npm command. It no longer pipeshttps://dotenvx.shintosh.coreutils(for/usr/bin/env) andsubsetOf node-lts ["node"]. The arch match is gone, since there's one source for both arches.trust_store_without_emsign./bin/dotenvxmust be a#!/usr/bin/env nodescript, so it can never be an embedded runtime again. And the default CA list of the node it runs on must have at least 100 certs and none of the 3 emSign roots NSS 3.131.1 removed. The fingerprints are the same as in node-lts'semsign_roots_removedtest. The--versionsmoketest now checks the exact version.Evidence
The TLS trust harness from #976 was extended with vendor rows. The dotenvx row runs the probe on the runtime the installed CLI really uses: the shebang interpreter for a script, or
PKG_EXECPATH=PKG_INVOKE_NODEJSfor the yao-pkg ELF. Live mode, 12 eMudhra hosts plus 2 positives, on arm64.Before: pkgs main 44a31a3
After: this PR's head 534ae80
Other checks:
min package build --rebuild dotenvx, thenmin check. Everything passes, including the standalone tests (smoketest,run,trust_store_without_emsign).amd64 is covered only by the build-bot build. The harness here runs on arm64.
🤖 Generated with Claude Code