fix(deps): patch known CVEs in Next.js and transitive dependencies - #440
Open
keysersoft wants to merge 1 commit into
Open
fix(deps): patch known CVEs in Next.js and transitive dependencies#440keysersoft wants to merge 1 commit into
keysersoft wants to merge 1 commit into
Conversation
Bumps next to ^16.2.11 (resolves 16.2.12) and refreshes transitive dependencies whose existing ranges already allowed patched versions. Resolved: - next 16.2.10 -> 16.2.12: SSRF in Server Actions on custom servers (CVE-2026-64649) and in rewrites via attacker-controlled destination host (CVE-2026-64645), middleware/proxy bypass with Turbopack + single locale (CVE-2026-64642), DoS in App Router Server Actions (CVE-2026-64641), plus four medium advisories (cache confusion, unbounded Edge payload, image-optimization DoS via SVG, disclosure of internal Server Function endpoints). - brace-expansion -> 1.1.16 / 2.1.2 / 5.0.8: OOM via unbounded expansion (CVE-2026-14257) and exponential-time expansion (CVE-2026-13149). - fast-uri -> 3.1.4: CVE-2026-16221 and policy bypass via improper Unicode hostname canonicalization (CVE-2026-13676). - hono -> 4.12.32: JSX cross-request context leak, JSX escaping bypass in cx(), header de-duplication dropping values. - protobufjs -> 7.6.5: DoS via crafted .proto schema. - body-parser -> 2.3.0: DoS via invalid limit option. Deliberately not changed here, with reasons: - postcss (8.4.31, 8.5.15) — pinned to an exact version by next and by the Tailwind PostCSS plugin. Build-time only, processing our own CSS; the advisory needs attacker-controlled sourceMappingURL input. - js-yaml 5.2.1 — pinned exactly by the NestJS Swagger package, and its latest release (11.4.6) still pins it, so there is no upstream fix to take. Used to serve our own OpenAPI document, not to parse untrusted YAML. - sharp 0.34.5 — inside next's ^0.34.5 range; moving to 0.35 would diverge from the version Next is tested against. - hono node-server 1.19.x — the fix is a major (2.0.5), and the advisory is a Windows-only serve-static path traversal; we ship Linux containers and do not use serve-static. - valibot 1.2.0 and the Jaeger OpenTelemetry propagator 2.8.0 — exact pins reached only through dev-only dependency paths. Note: the root package.json overrides block is not being honoured in this workspace (the pre-existing rxjs pin is ineffective too, and the lockfile records no overrides at all), so the remaining exact pins cannot be forced without regenerating the whole lockfile. Worth tracking separately rather than widening this patch. Backend: 3460 tests green, tsc clean. Frontend: tsc + build clean.
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.
Patches the known CVEs flagged by CodeQL/Trivy that we can fix without breaking changes. No application code touched — only
packages/frontend/package.json(one line) and the lockfile.Resolved
cx(), header de-duplication dropping values.protoschemalimitoptionEverything except
nextwas reachable simply by refreshing within the ranges the tree already declared (npm update), so the diff stays small.Deliberately deferred (with reasons)
These are all exact pins held by upstream packages, so fixing them means either forcing a version our dependencies aren't tested against, or a major bump:
nextand the Tailwind PostCSS plugin. Build-time only, processing our own CSS — the advisory requires attacker-controlledsourceMappingURLinput.@nestjs/swagger, and its latest release (11.4.6) still pins 5.2.1 — there is no upstream fix to take. Used to serve our own OpenAPI document, not to parse untrusted YAML.^0.34.5range; jumping to 0.35 diverges from the version Next is tested against.@hono/node-server1.19.x (MEDIUM)serve-staticpath traversal; we ship Linux containers and don't use serve-static.Finding worth a follow-up
While attempting to force the pins above I found that the root
package.jsonoverridesblock is not being honoured in this workspace — the pre-existingrxjs: 7.8.1pin is also ineffective (7.8.2 is still installed), and the lockfile records nooverridesat all. Forcing the remaining pins would therefore require regenerating the whole lockfile, which is too broad for a security patch. I'd rather fix the overrides mechanism in its own PR — happy to open an issue.Verification
tscclean, 3460 tests greentscclean,next buildclean on 16.2.12