Bump js-yaml to 4.3.1 in the Kotlin/JS lock - #16
Merged
Conversation
GHSA-5p4m-2wfm-xmqj (CVE-2026-59870): `!!omap` resolution enforces key uniqueness with `Array.indexOf()` inside a loop, so parsing a document with many entries costs O(n^2) CPU. The fix landed in 5.2.1 and was backported to 4.3.1; 4.3.0 is affected. js-yaml reaches us through mocha, which asks for `^4.1.0`, so the range already admits the patched version and only the resolved entry had to move. Verified by resolving `js-yaml@^4.1.0` with yarn against the registry: it produces this exact stanza, version, resolved URL and integrity hash included. The example project's lock is already on 4.3.1 and needs no change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012FHrC4wQaCMKaHLZcnFiS5
menjoo
force-pushed
the
claude/bump-js-yaml-4.3.1
branch
from
August 19, 2026 16:58
bda6397 to
658d562
Compare
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 js-yaml Dependabot alert on
kotlin-js-store/yarn.lock. One resolved lockfile entry, nothing else.The advisory
GHSA-5p4m-2wfm-xmqj / CVE-2026-59870, high severity.
!!omapresolution enforces key uniqueness withArray.indexOf()inside a loop, so parsing a document with many entries costs O(n²) CPU and blocks the event loop.Affected:
>= 4.0.0, < 4.3.1. The fix landed in 5.2.1 and was backported to 4.3.1 on 2026-07-31 — the advisory title predates that backport, so it reads as though 4.x is stranded when it isn't.The change
js-yaml reaches us through mocha, which asks for
^4.1.0, so the range already admits 4.3.1 and nothing else in the tree moves — 4.3.1 keeps the same single dependency,argparse "^2.0.1", already locked at 2.0.1.examples/calculator/kotlin-js-store/yarn.lockis already on 4.3.1 and is untouched.Verified by resolving
js-yaml@^4.1.0with the yarn 1.22.22 that Kotlin pins, against the live registry: it produces this stanza byte for byte — version, resolved URL, integrity hash and dependency block. CI is green on this commit.Why the other four advisories are not here
An audit of both lockfiles turned up four more findings, and an earlier revision of this PR fixed them. That work was reverted deliberately.
serialize-javascriptserialize-javascriptdiffwebpackNone of them is reachable, and none of them ships:
npm(...)declarations anywhere in the build. Published artifacts are klibs and jars whose only runtime dependency iskotlinx-coroutines-core. mocha, karma and webpack exist solely to run the test suite on the JS and Wasm targets.yarn.lockfrom their own Kotlin version, so pins here never reach them..mocharc,diffrenders diffs of our own test values,serialize-javascriptmoves our own test results between mocha workers, and the webpack SSRF requiresexperiments.buildHttp, which the Kotlin plugin does not enable.Unlike js-yaml, none could be fixed by a lockfile entry. mocha declares
diff ^7.0.0andserialize-javascript ^6.0.2and every published 11.x still does, so both needed yarnresolutionsforcing a major past the declared range; webpack needed the Kotlin plugin's own version knob. That cost a convention plugin, two lockfile regenerations, and a standing obligation to re-check the pins on every Kotlin upgrade — since a pin ahead of Kotlin today holds a package back tomorrow.Then CI settled it: webpack 5.104.1 broke
wasmJsBrowserTest. It changed howimport.metais statically analysed, Kotlin/Wasm's JS glue uses it, and the bundle failed withUncaught SyntaxError: Cannot use 'import.meta' outside a module. A low-severity, unreachable, build-time-only advisory had broken a working test suite.The remaining four are better handled as Dependabot dismissals ("vulnerable code is not actually used") than as forced pins.
Note for whoever does that: there is no committed
package.jsonanywhere — the Kotlin plugin generates it intobuild/— so Dependabot has nodevDependenciesto read and treats this dev-only test tooling as production dependencies. That is probably why it pages at all.