
Scan a filesystem for traces of the compromised eMudhra CA certificates (CVE-2026-111943) and get an upgrade plan
“I can count to four!” — because at least one of the leaked eMudhra private keys turned out to be the integer
4. The name is the joke; the tool is serious.
A small, fast Rust tool that walks a whole filesystem and tells you what to upgrade because of the compromised eMudhra intermediate CA certificates — the ones behind CVE-2026-111943 (Red Hat tracking: CVE-2026-114406 / RHSB-2026-012).
It answers one question: which programs on this machine still trust that CA, and how do I fix them?
① CONTAINS THE COMPROMISED CERTIFICATE — act on these
CLEAR Browser cache • cached downloads (Firefox/Chrome) 6 file(s)
② UPGRADE PLAN — 485 files across 126 items
Python project (poetry) • 60 files, 17 unit(s)
• ~/dev/jonator/api (9)
cd "$HOME/dev/jonator/api" && poetry update
Toolchain (managers & version managers) • 10 tool(s)
• uv
uv self update
In April 2025 an eMudhra key-generation ceremony produced a second, weak set of P-384 keys during a wrap/unwrap step. Eight intermediate CA certificates were issued with those keys. The private keys turned out to be single- and double-digit integers, so anyone can recover them from the public certificates and mint fraudulent certificates for any domain.
The eight certificates are shipped in the crate (see certs/),
verified byte-for-byte against the published SHA-256 fingerprints. Embedding the
real bytes is what makes matching exact instead of guesswork.
For a deeper write-up, see the Cisco Talos advisory, Mozilla's Firefox and Chrome posts, and the Red Hat bulletin.
Detection is layered, cheap first:
.der files, blobs inside NSS /
JKS / PKCS#12 keystores, memory dumps, ...);emSign Root … CA - G3),
the vendor name, and the PEM header.Every match is classified and ranked:
| Rank | Findings | Meaning |
|---|---|---|
| HIGH | exact-cert-bytes, exact-cert-pem, subject-public-key | The certificate (or its key) is provably present. |
| low | cert-sha256-fingerprint, spki-sha256-fingerprint, serial-number | The value is referenced as text (configs, CRLs, logs, allowlists). |
| low | subject-cn, issuer-cn, vendor-name | A weaker mention worth a look. |
No name allow-lists. It does not skip /usr, node_modules, .git, or
any tool directory. The only thing it refuses to descend into is the
kernel's pseudo filesystems, discovered from /proc/self/mounts
(proc, sysfs, devtmpfs, cgroup2, ...). So /dev and /sys are
skipped, but /tmp, /run, /dev/shm, overlayfs and network mounts are all
scanned.
Content sniffing, not name sniffing. The bulk of a disk is a handful of enormous files that cannot hold a certificate (model weights, disk images, media). Each file's head is classified by content:
--thorough disables the shortcut and reads every file completely. On a
machine with an 82 GiB model-blob directory this turns a ~160 s pass into
~0.02 s while still inspecting every file's head and tail.
Symlinks are not followed (avoids loops and double-reporting) and only regular files are read.
Streaming, not slurping. Files are read in 8 MiB chunks with a bounded per-thread buffer, so memory stays flat regardless of file size.
Parallel across files, with --threads workers (default: CPU count).
cargo build --release
# binary at target/release/i-can-count-to-four
# Scan the whole disk from / (default)
sudo ./target/release/i-can-count-to-four
# Scan specific roots, human-readable output
./target/release/i-can-count-to-four /etc /home /opt
# Machine-readable JSON
./target/release/i-can-count-to-four / --json > findings.json
# Stay on one filesystem, limit depth, pick thread count
./target/release/i-can-count-to-four / --one-file-system --max-depth 4 --threads 8
# CI: exit non-zero (status 2) if the certificate is actually present
./target/release/i-can-count-to-four / --quiet --fail-on-found
# Show what is being hunted
./target/release/i-can-count-to-four --list-targets
Running as root avoids permission denied noise; without root the tool simply
counts unreadable files and keeps going.
| Flag | Description |
|---|---|
ROOT... | One or more roots to scan (default /). |
--json | Emit JSON (summary + findings) instead of text. |
--one-file-system | Do not cross mount points. |
--follow-links | Follow symlinks (off by default). |
--max-depth N | Limit directory depth. |
--max-file-size BYTES | Skip files larger than N bytes (default: no limit). |
--thorough | Read every file in full (disables content sniffing). |
--threads N | Worker threads (default: CPU count). |
-q, --quiet | Suppress the progress line. |
--fail-on-found | Exit 2 if any high-confidence finding exists. |
--list-targets | Print the embedded target certificates and exit. |
--no-color | Disable ANSI colors in the report (auto-off when not a TTY). |
--from-json FILE | Re-render the grouped report from a saved --json file (no scan). |
--html FILE | Also write a self-contained colored HTML report. |
Exit codes: 0 success, 2 high-confidence finding present (with
--fail-on-found), 3 could not read the --from-json file.
The default output is a remediation plan, not a file dump. Findings are collapsed into the things you actually act on, with the right command for each:
① CONTAINS THE COMPROMISED CERTIFICATE — act on these
CLEAR Browser cache • cached downloads (Firefox/Chrome) 6 file(s)
REMOVE Temporary files • /tmp 29 file(s)