Skip to content

fix: emSign CA distrust (CVE-2026-111943) + open RustSec advisories - #343

Merged
mario-reown merged 2 commits into
mainfrom
fix/emudhra-ca-roots
Nov 10, 2026
Merged

mario-reown merged 2 commits into
mainfrom
fix/emudhra-ca-roots

Conversation

@mario-reown

@mario-reown mario-reown commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Why

A node operator (MetaMask) reported the eMudhra/emSign CA distrust, CVE-2026-111943: the private keys of some emSign intermediate certificates have leaked. They asked for a rebuild with the updated CA bundle and rustls-webpki >= 0.103.16.

The advisories:

  • RUSTSEC-2026-0382: rustls-webpki accepts certificate chains through the distrusted emSign intermediates. Fixed in 0.103.16.
  • RUSTSEC-2026-0381: webpki-roots ships emSign ECC Root CA - G3. Fixed in 1.0.10.

Since operators will roll a new image for this anyway, this PR also fixes the other open RustSec advisories that have semver-compatible patches. Several of them are in quinn-proto and rustls, which handle node-to-node traffic on the public ports.

Where the CVE actually applies

  • wcn_node: its only connection that trusts public certificate authorities is the wss:// link to the chain RPC (alloy → tokio-tungstenite). That link checks certs against the roots compiled in from webpki-roots, not /etc/ssl/certs. The webpki-roots bump is the actual fix.
  • wcn_db: makes no connections that trust public certificate authorities.
  • Node-to-node QUIC (libp2p-tls): uses self-signed peer certificates with its own verification, so CA roots don't apply.
  • Image CA bundle: neither binary reads it. Updating it only clears scanner findings, which operators still expect.

Changes

Base image: alpine:3.22 → alpine:3.22.8, plus apk upgrade --no-cache. ca-certificates-bundle goes from 20250911 (146 roots, emSign C1/C3/G1/G3) to 20261020 (118 roots, only emSign G1, matching Mozilla's store).

Crates: each one is pinned with --precise to a version that has the fix, using the CI toolchain (1.89.0):

crate from → to advisories
rustls-webpki 0.103.6 → 0.103.16 RUSTSEC-2026-0382 (this CVE), 0049, 0098, 0099, 0104
webpki-roots 1.0.2 → 1.0.11 RUSTSEC-2026-0381 (this CVE)
quinn-proto 0.11.13 → 0.11.18 RUSTSEC-2026-0037, 0185, 0338, 0339, 0340, 0341, 0342, 0343 (remote panics, memory exhaustion, DoS)
rustls 0.23.31 → 0.23.46 RUSTSEC-2026-0285, 0346, 0347, 0348, 0349
h2 0.4.12 → 0.4.16 RUSTSEC-2026-0258
bytes 1.10.1 → 1.11.1 RUSTSEC-2026-0007
time 0.3.43 → 0.3.47 RUSTSEC-2026-0009
crossbeam-epoch 0.9.18 → 0.9.20 RUSTSEC-2026-0204
openssl 0.10.73 → 0.10.80 RUSTSEC-2026-0463, 0473–0479
libz-sys 1.1.22 → 1.1.31 RUSTSEC-2026-0418

Transitive changes that come with these bumps:

  • quinn-proto 0.11.18 adds rand 0.10.3, with rand_core 0.10.1, rand_pcg 0.10.2, chacha20 0.10.2, getrandom 0.4.3, cpufeatures 0.3.1 and r-efi 6.0.0 (UEFI only).
  • time 0.3.47 brings time-core 0.1.6 → 0.1.8, time-macros 0.2.24 → 0.2.27 and num-conv 0.1.0 → 0.2.2.
  • openssl 0.10.80 brings openssl-sys 0.9.109 → 0.9.118.
  • h2 0.4.16 drops the duplicate hashbrown 0.16.0.

VERSION: 261110.0

Deliberately not fixed here

  • alloy-dyn-abi (RUSTSEC-2025-0073, DoS when hashing TypedData): the fix pulls alloy-core 1.3 → 1.7, and wcn doesn't use TypedData.
  • ruint (RUSTSEC-2025-0137, 2026-0220): tied to alloy, and the newest version needs Rust 1.90. Not reachable from remote input in a meaningful way.
  • crypto-bigint 0.5 (RUSTSEC-2026-0387, timing issues): comes in through alloy-signer / elliptic-curve, and the fix is in 0.7, a breaking upgrade. Worth a follow-up alloy upgrade.

Testing (local, Rust 1.89.0)

  • cargo build --workspace --all-features, plus release builds of wcn_node and wcn_db: ✅
  • Unit tests (cargo test --all-features --workspace --exclude wcn_testing): ✅
  • Integration tests (wcn_testing): test_suite is flaky on main, and this PR doesn't change that. I alternated 5 runs each with a clean /tmp/wcn_db: the branch passed 1 of 5, main 2 of 5. Both fail at the same assertions: load_simulator.rs:363 (hcard count off by one), :448 (hscan field mismatch) and :475. These look like expiry-timing races in the load simulator. Worth a separate issue.
    • Side note: the suite writes to a hardcoded /tmp/wcn_db/<peer> and never cleans up. About 2–3G of RocksDB data per run builds up, and on a tmpfs /tmp this eventually makes runs fail.
  • cargo audit against the advisory DB as of 2026-11-10: open vulnerabilities down from 20 to the 3 crates listed above.
  • Base image checked with openssl x509 over the bundle: only emSign G1 remains.

Follow-ups (not in this PR)

  • CI's cargo-deny job only runs check license, and only when a Cargo.toml changes, so security advisories are never checked. That's how 0.103.6 shipped with known advisories. A separate PR should add check advisories on lockfile changes.

Before merging

Check that the production RPC providers' TLS chains don't use an emSign root, e.g. openssl s_client -connect <rpc-host>:443 -showcerts.

After merge

Run the package workflow with wcn-node, wcn-db and release enabled to publish 261110.0, then send the tag to the operator.

CVE-2026-111943:
- webpki-roots 1.0.2 -> 1.0.11 (RUSTSEC-2026-0381; roots embedded in
  wcn_node for the wss:// chain RPC link, the actual fix)
- rustls-webpki 0.103.6 -> 0.103.16 (RUSTSEC-2026-0382)
- alpine 3.22 -> 3.22.8 + apk upgrade (ca-certificates-bundle 20261020);
  scanner hygiene, the binaries don't read the OS store

Other advisories, pinned to the lowest patched version with Rust 1.89:
- quinn-proto 0.11.13 -> 0.11.18, rustls 0.23.31 -> 0.23.46,
  h2 0.4.12 -> 0.4.16, bytes 1.10.1 -> 1.11.1, time 0.3.43 -> 0.3.47,
  crossbeam-epoch 0.9.18 -> 0.9.20, openssl 0.10.73 -> 0.10.78,
  libz-sys 1.1.22 -> 1.1.31

VERSION -> 261110.0
@claude

claude Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Claude finished @mario-reown's task in 2m 15s —— View job


PR Review: CVE-2026-111943 + RustSec Advisories

Issues Found

Issue 1: Non-Deterministic Dockerfile Builds

File: Dockerfile:4
Severity: Medium

The apk upgrade --no-cache command pulls the latest package versions at build time, making builds non-reproducible. Different builds at different times will have different package versions, causing drift.

RUN apk upgrade --no-cache

Recommendation: Pin ca-certificates-bundle to a specific version for reproducibility:

RUN apk add --no-cache ca-certificates-bundle=20261020-r0

Or document that non-deterministic builds are acceptable for this use case (e.g., always pulling latest security fixes is preferred over reproducibility).


Issue 2: New Transitive Dependencies Not Documented

File: Cargo.lock (multiple)
Severity: Low

The PR description mentions rand 0.10 being added, but several other new crates were also introduced without documentation:

  • chacha20 0.10.2
  • getrandom 0.4.3
  • r-efi 6.0.0
  • rand_core 0.10.1
  • rand_pcg 0.10.2
  • cpufeatures 0.3.1 (new version)

Additionally, some indirect version bumps occurred:

  • num-conv 0.1.0 → 0.2.2
  • time-core 0.1.6 → 0.1.8
  • time-macros 0.2.24 → 0.2.27
  • openssl-sys 0.9.109 → 0.9.118

Recommendation: Document whether these transitive dependencies were reviewed for compatibility and if they introduce any new advisories. The PR description should acknowledge these changes to show they were intentionally accepted, not overlooked.


Verification Completed

✅ All primary security updates match PR description:

  • rustls-webpki: 0.103.6 → 0.103.16 (fixes CVE-2026-111943 + RUSTSEC-2026-0382)
  • webpki-roots: 1.0.2 → 1.0.11 (fixes RUSTSEC-2026-0381)
  • quinn-proto: 0.11.13 → 0.11.18
  • rustls: 0.23.31 → 0.23.46
  • h2: 0.4.12 → 0.4.16
  • bytes: 1.10.1 → 1.11.1
  • time: 0.3.43 → 0.3.47
  • crossbeam-epoch: 0.9.18 → 0.9.20
  • openssl: 0.10.73 → 0.10.78
  • libz-sys: 1.1.22 → 1.1.31

✅ Alpine base image: 3.22 → 3.22.8

✅ VERSION: 260810.0 → 261110.0 (date-based: 2026-11-10)

✅ No external domain URLs detected (only github.com/rust-lang and github.com/WalletConnect)

✅ No static resource cache-control issues (no static resources in changed files)


@mario-reown
mario-reown merged commit c7dd692 into main Nov 10, 2026
13 checks passed
@mario-reown
mario-reown deleted the fix/emudhra-ca-roots branch November 10, 2026 18:32
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