Skip to content

Patch nine dependency advisories and verify security regressions - #86

Open
b7r6 wants to merge 2 commits into
mainfrom
fix/october-dependency-security
Open

b7r6 wants to merge 2 commits into
mainfrom
fix/october-dependency-security

Conversation

@b7r6

@b7r6 b7r6 commented Oct 23, 2026

Copy link
Copy Markdown
Owner

What and why

Patch the four dependency versions still present on this fork's main, covering the nine advisories reviewed in TraceMachina/nativelink#3022. The first commit cherry-picks Marcus Eagan's original security patch with attribution; the second adds behavioral regression coverage from the review.

Package Before After Advisories
rustls-webpki 0.103.15 0.103.16 Distrusted intermediate keys
follow-redirects 1.16.0 1.16.1 Array headers, sensitive header names
DOMPurify 3.4.16 3.4.17 XHTML SVG, shadow-root templates, detached subtrees
Next.js, both apps 16.3.8 16.4.2 Image optimization, cached typed arrays, Server Actions

The redirect test now supplies Host for raw array headers. Without it, Node returns HTTP 400 before the vulnerable request reaches the redirect, so the old test fails for the wrong reason. Separate cases verify array credentials and each sensitive-header metacharacter (^ and |), confirm credentials reach the origin, and require a successful response with harmless headers preserved at the target.

Four DOM tests exercise the sanitizer resolved by Mermaid: XHTML SVG href animation, template fragments joined inside a shadow root, and event handlers on subtrees detached by parent/sibling hooks. Each also checks that harmless content survives. jsdom and its types are development dependencies.

How was this verified?

On Linux with Bun 1.4.2 and Node 22.23.2/24.21.0:

  • Frozen installs succeed in web/ and the Azurite runner.
  • bun run test in web/: 12 passed. Azurite's suite: 7 passed on both Node versions.
  • Substituting only the library under test in temporary harnesses: DOMPurify 3.4.16 fails all four new DOM assertions; follow-redirects 1.16.0 fails all three redirect cases with credential leaks, after reaching both servers. Patched versions pass.
  • bun run build in web/: both apps build on Next.js 16.4.2.
  • bazel mod deps --lockfile_mode=error and bazel build //nativelink-util:nativelink-util --lockfile_mode=error --jobs=8 pass with the fork's Bazel 9.1.1.
  • Changed tests pass Biome and typos; package manifests pass the repository's JSON formatter. The four patched versions and 35 newly resolved development packages returned no OSV advisories on October 23, 2026.

Limits: DOM tests inspect sanitized content rather than executing browser payloads. Crafted Next.js exploit requests and an emSign certificate-chain reproduction were not exercised. The full Cargo/Bazel test suites were not run.

Risk

Next.js moves from 16.3 to 16.4 and is the largest runtime change; both sites build successfully. rustls-webpki changes certificate acceptance in the TLS stack. follow-redirects is used by the Azurite test harness. The new DOM runtime is confined to tests.

AI assistance

Codex reviewed the upstream patch, implemented the additional regression tests, ran the checks, and drafted this PR at b7r6's request. The cherry-picked dependency patch was authored by Marcus Eagan with Claude Code assistance; its attribution is preserved.

MarcusSorealheis and others added 2 commits October 23, 2026 23:22
… and Next.js

Bump rustls-webpki to 0.103.16, follow-redirects to 1.16.1 (via an
Azurite runner override), DOMPurify to 3.4.17 and Next.js to 16.4.2.
Add a follow-redirects cross-origin credential test and a version guard
for Next.js and DOMPurify.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
(cherry picked from commit cc873c1)
Send an explicit Host header so vulnerable array-form requests reach the redirect, assert credentials at the origin, and check array and regex-metacharacter leaks independently. Exercise Mermaid's DOMPurify dependency against XHTML SVG, shadow-root template, and detached-subtree regressions using a development-only jsdom harness.
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