Fix high and critical npm advisories for next, sharp, js-yaml and svgo - #99
Merged
Merged
Conversation
Updates `next` from 15.5.23 to 15.5.25 in packages/nextjs and the two Next.js samples, clearing GHSA-p293-qw3h-jr36 and GHSA-2xp9-vwfh-vxw4. Only one `next` instance exists in the tree, so this also closes the `better-auth > next` audit paths. Raises three pins that pnpm-workspace.yaml already carried, each of which had since become vulnerable at its pinned version: - sharp 0.35.0 -> 0.35.4 (GHSA-rgj7-g3m4-5g8c) - js-yaml 4.3.1 -> 4.3.2 (GHSA-2883-xcg3-v3hh) - svgo 4.0.2 -> 4.1.0 (GHSA-w27v-7q3p-w38r) The new advisory is appended to each justification rather than replacing the original rationale, since the older flaws still apply. Every new pin sits inside the range its parent already declares. Signed-off-by: Brion <info@brionmario.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
rajithacharith
approved these changes
Sep 11, 2026
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.
Purpose
Resolves the high and critical advisories reported by
pnpm audit --audit-level=high, which was failing CI with exit code 1.next>=15.5.24next>=15.5.24sharp>=0.35.4js-yamlmaxTotalMergeKeysdoes not bound CPU for empty merge sources>=4.3.2svgoremoveScriptsbypass via namespaces and control characters>=4.1.0After this change
pnpm audit --audit-level=highexits 0. What remains is below the threshold: 4 moderate and 1 low that is already inauditConfig.ignoreGhsas.Approach
All four advisories had a fix published on the major line already in use, so no major upgrades were needed.
next— head dependency updated. The only case where upstream had shipped a release we could simply take:packages/nextjs:15.5.23→15.5.25(devDependency)samples/nextjs/quickstart:^15.5.23→^15.5.25samples/integrations/better-auth/nextjs:^15.5.23→^15.5.25Only one
nextinstance exists in the tree, so this closed all 5 audit paths, including thebetter-auth > nextones.sharp,js-yaml,svgo— existing overrides raised. These were not new advisories against unpinned packages.pnpm-workspace.yamlalready carried an override for each, and each had since become vulnerable at the version it was pinned to:sharpjs-yamlsvgoTwo deliberate decisions here:
JUSTIFICATIONcomment rather than replacing the original rationale — the older flaws still apply, so the comment needs to explain both.Every new pin sits inside the range its parent already declares (
@eslint/eslintrcwants^4.3.0,postcss-svgowants^4.0.2), so nothing is forced against an incompatible constraint.Lockfile drift. Re-resolving moved a few transitives beyond the four targets, worth a look when reviewing
pnpm-lock.yaml:css-select5.2.2 → 6.0.0 andcss-what6.2.2 → 7.0.0 (major bumps, but they are svgo 4.1.0's own declared dependencies),sax1.6.0 → 1.6.1, a droppedcaniuse-lite, and an@emnapi/runtimepatch underrolldown.Not changed.
packages/nextjsstill declares"next": ">=15.5.18"as a peer dependency, which permits vulnerable versions in consumer apps. Raising that floor to>=15.5.24is a breaking change for SDK consumers, so it is left for a future major rather than folded into a security patch.Related Issues
Related PRs
Checklist
pnpm audit --audit-level=high→ exit 0pnpm --filter @thunderid/nextjs run build→ passespnpm --filter @thunderid/nuxt run build→ passes (exercises thesvgoCSS pipeline)pnpm --filter @thunderid/nextjs run test→ 30/30 passingbreaking changelabel added.Security checks