Patch js-yaml and brace-expansion DoS advisories - #137
Merged
Conversation
Both are follow-on advisories published after the versions PR #136 landed on, so the previous floors no longer clear them. js-yaml 4.3.0 -> 4.3.1 (GHSA-5p4m-2wfm-xmqj, high) Quadratic CPU in !!omap resolution. The 5.x fix for CVE-2026-59870 was never backported, so 4.3.0 — the newest 4.x at the time — was still affected. !!omap is in the default schema, so a plain yaml.load() is enough; the loop is synchronous, so one request stalls the event loop for the whole process. This one reaches the runtime tree through @langchain/community, not just devDependencies. brace-expansion 1.1.17 -> 1.1.18, 2.1.3 -> 2.1.4 (GHSA-rgw5-rvv9-x895, high) DoS via unbounded intermediate arrays, bypassing the CVE-2026-14257 mitigation we picked up last time. Reachable only through build tooling (swagger-autogen codegen, archiver in dev), operating on glob patterns from our own source tree. Kept minimal: every consumer already uses a caret range, so js-yaml needed only the root bump to dedupe across @langchain/*, and brace-expansion needed only its two existing override floors raised. No new overrides, no dependency additions, and no move to js-yaml 5.x. Four packages change in the lockfile and nothing else. Verified: npm audit reports 0 critical / 0 high (3 lows remain, all the unfixable bolt11 -> secp256k1 -> elliptic chain); package.json and the lockfile stay in sync for npm ci; skills build and the zap-validator, reranker and relay-pool suites pass; native deps rebuild cleanly. Both patched versions predate the quarantine window by ~22 days, so this installs with min-release-age fully enforced and no bypass. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Closes the two remaining high-severity Dependabot alerts. Both are follow-on advisories published after the versions PR #136 landed on, so the floors it set no longer clear them.
Deliberately minimal: 3 lines in
package.json, 4 packages in the lockfile.js-yaml 4.3.0 → 4.3.1 — GHSA-5p4m-2wfm-xmqj (high, #121)
Quadratic CPU consumption in
!!omapresolution. The 5.x fix for CVE-2026-59870 was never backported, so 4.3.0 — the newest 4.x when #136 shipped — was still affected.Two things make this the more serious of the pair:
!!omapis registered in the default schema, so a plainyaml.load()with no options is enough. No custom schema required.It also reaches the runtime tree via
@langchain/community→@langchain/classic, not just devDependencies.brace-expansion 1.1.17 → 1.1.18, 2.1.3 → 2.1.4 — GHSA-rgw5-rvv9-x895 (high, #119)
DoS via unbounded intermediate arrays, explicitly bypassing the CVE-2026-14257 mitigation we picked up in #136.
Lower practical risk — reachable only through build tooling, operating on glob patterns from our own source tree, never user input:
Why the diff is this small
Every consumer already uses a caret range (
js-yaml ^4.1.1,brace-expansion ^1.1.7/^2.0.2), so:@langchain/*on its ownNo new overrides, no dependency additions, no move to js-yaml 5.x (still on the 4.x line). Four packages change in the lockfile and nothing else:
Verification
npm audit: 0 critical, 0 high (was 1 high). 3 lows remain, all the unfixablebolt11 → secp256k1 → ellipticchainnpm cisucceeds — package.json and lockfile in sync, so CI and the Docker build stay greennpm run skills:buildsucceeds (js-yaml is its main consumer); zap-validator, reranker and relay-pool suites pass;canvas/sharp/secp256k1rebuild cleanlymin-release-agefully enforced — no bypassAfter merge
One alert remains: #23 elliptic (low). No patched version exists — 6.6.1 is latest, reached via
bolt11 → secp256k1 → elliptic. Recommend dismissing it as "no fix available" so the queue reads clean.🤖 Generated with Claude Code