Repository navigation
Fix rustls-webpki and follow-redirects advisories [SECURITY] - #3020
Merged
Merged
Conversation
Bump rustls-webpki to 0.103.16 in the workspace and fuzz lockfiles (RUSTSEC-2026-0382), which rejects chains through the distrusted emSign intermediate keys, and override the Azurite runner's follow-redirects to 1.16.1 (GHSA-8r9p-f939-6h3c, GHSA-q3jh-wrc6-jgq8). Regression tests fail on the previous versions: a rustls verifier test with a test-root leaf carrying a distrusted emSign key, and cross-host redirect tests for array-form and metacharacter sensitive headers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The forbid-binary-files pre-commit hook rejects DER fixtures. The files hold public certificates only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Build the test root and both leaves with rcgen inside the test instead of committing certificate fixtures. Generation takes about a millisecond. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
amankrx
approved these changes
Oct 22, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Fixes three advisories that dependency scanning still reports after #2987:
rustls-webpki< 0.103.16): certificate verification can accept paths through emSign intermediates whose private keys are now public. This is the verifier-side counterpart of thewebpki-rootsfix in Update Rust crate webpki-roots to v1.0.10 [SECURITY] #2987. 0.103.16 adds a built-in list of the distrusted intermediate public keys and rejects any chain that contains one. Bumped to 0.103.16 in the workspaceCargo.lockand innativelink-test/fuzz/Cargo.lock, withMODULE.bazel.lockregenerated.follow-redirects1.16.0): on a cross-host redirect, credential headers leak when they are passed as an array, or when asensitiveHeadersname contains|or^. The package reaches us only through the Azurite test runner (azurite→axios→follow-redirects), not anything NativeLink ships. Pinned to^1.16.1with an override innativelink-store/tests/azurite_runner/package.json, next to the existingmomentanduuidoverrides.These fixes were pushed to #2987's branch after it had merged, so they are not on
main. This PR carries them over.How was this verified?
Each new test fails on the vulnerable version and passes on the fixed one. I checked both directions locally on macOS.
tls_verifier_rejects_distrusted_emsign_intermediate_key(nativelink-store/tests/azure_blob_store_test.rs): the test generates a throwaway root withrcgen, which issues two leaf certificates. One carries a distrusted emSign public key (eMudhra's OV TLS CA - G3, taken from rustls-webpki's distrust list); the control has a fresh key. The test runs both through rustls'WebPkiServerVerifier. On 0.103.15 the distrusted leaf verified. On 0.103.16 it fails withCertDistrusted, and the control still verifies. No emSign private key is needed, and no certificate files are committed: the test builds all three certificates itself, in about a millisecond. The distrusted public key is a 97-byte constant in the test, the same public value rustls-webpki ships in its distrust list.rcgen(with only itsringfeature) is a new dev-dependency ofnativelink-storeand also pulls inyasna;MODULE.bazel.lockwas regenerated with Bazel 9.3.1.dependency-security.test.cjs: each starts two local servers,127.0.0.1redirecting tolocalhost, and checks which headers the second server received. One sendsAuthorizationas an array-form header; the other declaressensitiveHeaders: ["X-Api|Key"]. On 1.16.0 both credentials reached the second host. On 1.16.1 they are stripped, and a non-sensitive header still gets through.cargo test -p nativelink-store --test azure_blob_store_test: 39 passed.bun install --frozen-lockfilethenbun run test: 6 passed.cargo metadata --lockedpasses for both Cargo workspaces. RegeneratingMODULE.bazel.lockwith Bazel 9.1.1 (bazel mod deps --lockfile_mode=update) leaves it unchanged after the bump.cargo clippyon the test target, rustfmt, Biome and typos are clean on the changed files.Not run locally: the full Bazel build, including the asan and pedantic-Clippy lanes. CI covers those.
Risk
Low. Production code is not modified.
rustls-webpki0.103.16 is a patch release; its only behavior change is rejecting the distrusted emSign keys. A NativeLink deployment talking to an endpoint whose certificate chain runs through one of those intermediates will now get a TLS verification failure, which is the intended fix. Whoever operates that endpoint would notice first.follow-redirectschange affects only the Azurite test runner.rcgen, is not part of the server binary.AI assistance
Claude Code (Claude Opus 5.5) did this as an agent at my direction. It wrote the lockfile bumps, both sets of tests and this description, and checked each test against the vulnerable versions. Reviewers should look hardest at the certificate generation in the Rust test and the redirect test helper.
🤖 Generated with Claude Code