8000 SECURITY: varlock: distrust emSign G3 (CVE-2026-111943) by bryan-minimal · Pull Request #1117 · gominimal/pkgs · GitHub
[go: up one dir, main page]

Skip to content

SECURITY: varlock: distrust emSign G3 (CVE-2026-111943) - #1117

Merged
bryan-minimal merged 2 commits into
mainfrom
security-varlock-node-lts
Oct 28, 2026
Merged

bryan-minimal merged 2 commits into
mainfrom
security-varlock-node-lts

Conversation

@bryan-minimal
Copy link
Copy Markdown
Member

Why

CVE-2026-111943 (eMudhra intermediate key compromise, Mozilla bug 2083449). The varlock 1.23.0 release binary is a bun build --compile executable around Bun 1.4.2, not 1.3.14 as pkgmgr-rs#1017 says. Its compiled-in root store still holds emSign ECC Root CA - G3.

The store matters here. varlock downloads @plugin code from registry.npmjs.org over HTTPS and runs it, and it sends telemetry. The truststore audit (pkgmgr-rs#1091, fleet run e75e32d0) lists it as shipped.

Why not a wrapper

Checked in a min box against the 1.23.0 binary. BUN_BE_BUN=1 makes the binary act as the bun CLI, so the probe runs on varlock's own runtime. The binary still connects to the emSign hosts with each of these:

  • NODE_USE_SYSTEM_CA=1
  • BUN_OPTIONS=--use-system-ca
  • NODE_OPTIONS=--use-openssl-ca
  • --use-system-ca on argv
  • --use-openssl-ca on argv

The bundled roots stay trusted.

Bun fixed its store in 1.4.4 (oven-sh/bun#46300: NSS 3.131.1 plus the 8 blocked keys; both merges are ancestors of bun-v1.4.4). But varlock hasn't released a binary built with it: the latest release is 1.23.0 from 2026-10-14. The upstream ask is a varlock release built with Bun 1.4.4 or later.

What

  • varlock runs on node-lts 24.22.1. That version drops the emSign roots and blocks the 8 compromised keys (tls: reject chains containing blocked public keys nodejs/node#66871, #66877). The CLI is upstream's npm package (npm i varlock; engines node >=22.3), which has no dependencies.
  • The native helper comes from npm too. This arch's @varlock/native-helper-linux-* package provides varlock-local-encrypt. It's byte-identical to the one in the release tarball (checked on arm64) and statically linked on both arches, so the glibc runtime dep is gone.
  • No npm and no network at build time. Both sha256-pinned tarballs are unpacked as node_modules under the private prefix usr/libexec/varlock. usr/bin/varlock and usr/bin/varlock-local-encrypt are relative symlinks. The varlock tarball is the first Source, so it's the primary source.
  • Runtime deps: coreutils (for /usr/bin/env) and subsetOf node-lts ["node"].
  • New test trust_store_without_emsign. /usr/bin/varlock must be a #!/usr/bin/env node script, and the default CA list of the node it runs on must have none of the 3 removed emSign roots. The smoke test also checks that the helper is executable.
  • Switching back: return to the release binary once one is built with Bun 1.4.4 or later, and re-run the harness. The recipe comment says so.

Evidence

The TLS trust harness from #976 was extended with vendor rows. The varlock row runs the probe on the runtime the installed CLI really uses: the shebang interpreter for a script, or BUN_BE_BUN=1 for the bun ELF. Live mode, 12 eMudhra hosts plus 2 positives, on arm64.

Before: pkgs main 44a31a3

client          | version
8000
                      | emSign      | AAA         | positive            | verdict
varlock         | 1.23.0 embedded              | 0F/6C/0?    | 6F/0C/0?    | OK,OK               | VULNERABLE
SELFTEST        | store minus anchors          | 6F/0C/0?    | 6F/0C/0?    | OK,OK               | FIXED
NEGCONTROL      | store plus anchors           | 0F/6C/0?    | 0F/6C/0?    | OK,OK               | VULNERABLE

After: this PR's head 4ecf8f0

client          | version                      | emSign      | AAA         | positive            | verdict
varlock         | 1.23.0 on v24.22.1           | 6F/0C/0?    | 6F/0C/0?    | OK,OK               | FIXED
SELFTEST        | store minus anchors          | 6F/0C/0?    | 6F/0C/0?    | OK,OK               | FIXED
NEGCONTROL      | store plus anchors           | 0F/6C/0?    | 0F/6C/0?    | OK,OK               | VULNERABLE

Other checks:

  • Functional check at this head, in a min box: varlock load resolves a schema. VARLOCK_DEBUG=1 varlock encrypt resolves the helper (resolved via SEA sibling: /usr/bin/varlock-local-encrypt), generates a key and encrypts a value.
  • Plugin resolution is runtime-independent: the same node_modules lookup, then the npm-download path, as the binary.
  • min session (arm64): min package build --rebuild varlock, then min check. Everything passes, standalone tests included.

amd64 is covered only by the build-bot build. The harness here runs on arm64.

🤖 Generated with Claude Code

CVE-2026-111943)

The release binary is a bun --compile executable around Bun 1.4.2, whose
compiled-in root store still holds emSign ECC Root CA - G3; no system-CA
switch removes it (they only add the system store). Bun 1.4.4 has the fix,
but varlock has not shipped a binary built with it. Lay out upstream's npm
package (dependency-free) plus this arch's native-helper package and run
it on node-lts 24.22.1. A new test checks varlock runs on the node runtime
dep and that its default store holds none of the removed emSign roots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bryan-minimal
bryan-minimal requested a review from a team as a code owner October 26, 2026 22:44
@coderabbitai
coderabbitai Bot commented Oct 26, 2026 •
Copy link
Copy Markdown
Contributor

Warning

Review limit reached

  • Run on-demand review

This review includes 2 billable files and costs up to $0.50.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 70 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 44a31a3 and ef9ff42.

Files selected for processing: 2
  • packages/varlock/build.ncl
  • packages/varlock/build.sh
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@mitodrummer mitodrummer left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified the three npm tarball sha256s (varlock 1.23.0 and both native-helper packages) against registry.npmjs.org. varlock 1.23.0 has no dependencies and bin/cli.js starts with #!/usr/bin/env node. The emSign fingerprints in the new test match node-lts's existing test. The layout follows the node-lts conventions in AGENTS.md (private usr/libexec prefix, subsetOf node-lts ["node"] at runtime), and CI is green.

@bryan-minimal
bryan-minimal added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit 1254bcf Oct 28, 2026
12 checks passed
@bryan-minimal
bryan-minimal deleted the security-varlock-node-lts branch October 28, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0