Bump the js-yaml override past the !!omap advisory - #685
Merged
Conversation
GHSA-5p4m-2wfm-xmqj: quadratic CPU consumption in js-yaml's !!omap resolution (CVE-2026-59870, fix not backported to 3.x/4.x). It hits js-yaml 4.0.0 - 4.3.0, reaching us through openapi-typescript -> @redocly/openapi-core. npm audit fails on plain main, so this blocks every open PR and the next push: $ npm audit --audit-level=high # on unmodified main 1 high severity vulnerability REAL_EXIT=1 There is already a js-yaml override here — added for an earlier advisory — and 4.3.0 is now the vulnerable ceiling rather than the safe floor. Bumped to 4.3.1, spelled `>=4.3.1 <5` to match the `fast-uri` sibling in the same block: a caret would say "compatible with 4.3.1" when what is meant is "at least 4.3.1, because anything below it is vulnerable". The floor is a security floor and the constraint should read like one. Verified byte-for-byte that this changes no generated output. js-yaml is what @Redocly parses specs with, so `make ts-generate` was the real risk: it regenerates clean, with the sole diff being metadata.ts's `generated` timestamp, which is restored here. npm audit exits 0, typecheck and the full vitest suite pass, and the nested @Redocly copy of js-yaml is gone — 4.3.1 dedupes to a single top-level entry.
jeremy
added a commit
that referenced
this pull request
Aug 11, 2026
GHSA-2v37-7h3g-55p8 (high): nanoid <3.3.17 custom generators can loop indefinitely when size is zero. It reaches us only as a dev-time transitive of postcss, but the npm Audit gate rightly fails every PR until the lockfile moves past it. postcss's own range (^3.3.16) already admits the fix, so this is a plain lockfile refresh to 3.3.18 — no override needed, unlike js-yaml (#685). The conformance runner pins the same vulnerable version; it is outside the audited surface but bumped for consistency. Regenerated under npm 11 (Node 24, matching CI) after a first attempt under npm 10 stripped the libc fields npm 11 writes — churn that would ping-pong on the next dependabot PR.
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.
npm Audit (TypeScript SDK)fails on plainmain, so this blocks every open PR and the next push.GHSA-5p4m-2wfm-xmqj — quadratic CPU consumption in js-yaml's
!!omapresolution (CVE-2026-59870, fix not backported to 3.x/4.x). Affectsjs-yaml 4.0.0 - 4.3.0, reaching us asopenapi-typescript→@redocly/openapi-core→js-yaml.The change
One line. There is already a
js-yamloverride intypescript/package.json, added for an earlier advisory —4.3.0has simply gone from being the safe floor to being the vulnerable ceiling.Spelled
>=4.3.1 <5rather than^4.3.1to match thefast-urisibling in the same block. A caret reads "compatible with 4.3.1"; what is meant is "at least 4.3.1, because everything below it is vulnerable". The floor is a security floor and the constraint should say so.Nothing else in
package.jsonmoves, and there is no generator bump — this is the leaf tool-dep, notoapi-codegen.Verification
npm audit --audit-level=highon unmodifiedmain→REAL_EXIT=1, the advisory above.REAL_EXIT=0.js-yamlresolves to 4.3.1 and dedupes to a single top-level entry; the nested@redocly/openapi-core/node_modules/js-yamlis gone.@redoclyparses specs with, so a behavioural change there could move generated types.make ts-generateregenerates clean — the only diff ismetadata.ts'sgeneratedtimestamp, which is diffed and restored rather than blind-checked-out.src/generated/is otherwise byte-identical.npm run typecheckand the fullvitestsuite pass.makeclean.Why it looked like
mainwas finemain's ownnpm Auditcheck is green only because that run predates the advisory's publication. Re-run it now and it fails. #684 was the clean proof it is environmental rather than any PR's doing: it contains zero JavaScript and still failed the audit.Blocks: #681, #682, #684 — all three are
UNSTABLEsolely on this check.Summary by cubic
Raise the
js-yamloverride to avoid the!!omapCPU DoS advisory and makenpm auditpass again, unblocking all PRs.js-yamloverride to>=4.3.1 <5to address GHSA-5p4m-2wfm-xmqj (CVE-2026-59870).4.3.1; the nested@redocly/openapi-corecopy dedupes away.npm auditexits 0; typecheck and tests pass; generated types unchanged.Written for commit 8c71cf3. Summary will update on new commits.