Repository navigation
Bump next from 13.5.6 to 15.5.28 [SECURITY] - #194
Open
superbot-helper wants to merge 1 commit into
Open
superbot-helper wants to merge 1 commit into
superbot-helper wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Updates next from 13.5.6 to 15.5.28.
Fixes GHSA-2464-fhr4-w9xw — a critical unauthenticated remote code execution in the Next.js Image Optimization API when SVG files are used on glibc-based Linux (CVSS 4.0 9.5): next 13.5.6 sits inside the advisory's affected range, but the image has no decoder for the flaw: the published tag installs no sharp and no libvips binding at any depth, a Node 18 install of this lock resolves no sharp because 0.35.5 requires Node >= 20.9, and the shipped optimizer throws a 500 before decoding, so no decoder-specific exploit exists in that image to fix; the patched sharp 0.35.5 applies only on Node >= 20.9, where the same lock resolves sharp 0.35.5 and @img/sharp-libvips 1.3.4 (rsvg 2.63.2).
What this changes:
package.json— next ^13.2.4 (line 44) -> ^15.5.28 and next-auth ^4.22.1 (line 45) -> ^4.24.15; next-auth 4.24.15 is the Next 15 peer-compatible release - 4.24.7 declares next ^12.2.5 || ^13 || ^14 and 4.24.15 declares next ^12.2.5 || ^13 || ^14 || ^15 || ^16 - so the old peer range stops below Next 15; every other dependency and every script is unchangedpnpm-lock.yaml— next 13.5.6 re-resolved to 15.5.28 and next-auth 4.24.7 to 4.24.15; next-auth 4.24.15 also adds uuid 11.1.1 while the application's declared uuid ^9.0.0 still resolves separately at 9.0.1; the lock also resolves next 15's optional sharp 0.35.5 and @img/sharp-libvips 1.3.4, with no next 13 entry left. sharp 0.35.5 requires Node >= 20.9 and is skipped as an optional dependency on the node:18-alpine image these Dockerfiles build, so this PR does not install a decoder in that image and does not fix a decoder exploit there; on Node >= 20.9 the same lock resolves sharp 0.35.5 and @img/sharp-libvips 1.3.4 (rsvg 2.63.2)src/pages/api/chat.ts— the base file's req.ip, removed in Next 15, becomes getClientIp(req): x-forwarded-for's first entry, then x-real-ip, else "unknown", for the OpenAI user hint only; the prompt, model and streaming code is untouchedpnpm-workspace.yaml— new file: the version-pinned Prisma allowBuilds policy that the repository's pnpm 12 frozen CI install requires. CI and both Dockerfile deps stages runpnpm i --frozen-lockfilewith build scripts enabled, and pnpm 12 exits 1 with ERR_PNPM_IGNORED_BUILDS unless every package whose lifecycle script it would run is declared; this map approves exactly @prisma/client@4.13.0 (its postinstall runs prisma generate) and @prisma/engines@4.16.2 (its postinstall fetches the query and migration engines) and lists prisma@4.16.2 and fsevents@2.3.3 as false. The name@version keys pin each approval to the reviewed lockfile's exact version, so no future release of those packages is approved by name. Every other package's build script stays unapproved, and pnpm 11+'s default strictDepBuilds: true still fails the install rather than run a script nobody reviewedDockerfile— the shared base stage now runsRUN apk add --no-cache opensslimmediately afterFROM node:18-alpine AS base, so the deps postinstall, the builder'sprisma generateand the runner all detect OpenSSL and select Prisma's openssl-3.0.x musl engine instead of the openssl-1.1.x build the image cannot load; the deps-stage COPY additionally includes pnpm-workspace.yaml beside package.json and pnpm-lock.yaml*, so the image'spnpm i --frozen-lockfilesees the same build-script policy; every other line is unchangedDockerfile.sqlchat-ai— the same shared-baseRUN apk add --no-cache opensslline and the same deps-stage COPY change as Dockerfile, in the www.sqlchat.ai variant, whose deps stage previously installed only libc6-compat and therefore selected Prisma's openssl-1.1.x musl engine; every other line is unchangedHow to verify:
Automated security patch from Superbot.