Skip to content
Incident Response

Next.js 16.4.1 & NGINX 1.31.7: October 2026 Web-Stack Patch Guide

5 min read·cyber.encse.com Knowledge Base·Last reviewed 21 Oct 2026

On October 14, 2026, two core web-stack components shipped security releases the same day. Vercel released Next.js 16.4.1 and 15.5.28, fixing two critical unauthenticated remote code execution flaws — a `use cache` / Cache Components bug (GHSA-673q-mjm6-r5xr) and an SVG-decoding bug in the sharp image library (CVE-2026-96889) — plus a high-severity denial-of-service issue in Server Actions (GHSA-p3m5-59mp-jv5r). The same day the NGINX project released 1.31.7 (mainline) and 1.30.6 (stable), closing five vulnerabilities rated Medium on nginx.org. As of this writing none of these are in the CISA Known Exploited Vulnerabilities catalog, and Vercel reports no exploitation in the wild or confirmed public proof-of-concept. This guide is about getting ahead of that: teams that patched Next.js in September are still exposed to the October flaws.

Next.js: Two Critical RCEs and a DoS

The `use cache` RCE (GHSA-673q-mjm6-r5xr) affects Next.js 16.0.0 through 16.4.0 and requires an App Router application with Cache Components enabled where a `use cache` function returns more than one typed array. Vercel states there is no workaround and advises upgrading even if no vulnerable function is obvious in your code.

The SVG/sharp RCE (CVE-2026-96889, GHSA-2464-fhr4-w9xw) affects Next.js 10.0.0 through 15.5.27 and 16.0.0 through 16.4.0. It is fixed in 16.4.1, or in 15.5.28 when paired with sharp 0.35.5 or later. The high-severity DoS (GHSA-p3m5-59mp-jv5r) affects App Router apps with at least one Server Action and is fixed in 15.5.28 and 16.4.1.

NGINX: Five Fixes in 1.31.7 and 1.30.6

nginx.org's security advisories list the following as fixed in 1.31.7 and 1.30.6, all rated Medium by the project. Some secondary write-ups cite F5 CVSS 8.1 scores for the three memory-safety bugs, so treat the vendor-assigned severity as the floor and prioritise internet-facing reverse proxies.

  • •CVE-2026-97205 — use-after-free when using asynchronous file I/O (AIO); affects 0.8.11–1.31.6
  • •CVE-2026-93479 — buffer overflow in script evaluation; affects 1.31.2–1.31.6 and 1.30.0–1.30.5
  • •CVE-2026-15176 — buffer overflow when using alias with rewrite; affects 0.1.29–1.31.6
  • •CVE-2026-95101 — request body injection in HTTP/3; affects 1.25.0–1.31.6
  • •CVE-2026-97629 — session forgery when using TLS session tickets (ticket key left uninitialised on rotation); affects 1.23.2–1.31.6

Determine Exposure

Both products commonly sit in front of the same applications, so check them together: a Next.js app behind an NGINX reverse proxy inherits risk from each layer.

  • •Next.js: run `npm ls next sharp` in every deployed project and container image; flag any next below 16.4.1 (or below 15.5.28 on the 15.x line)
  • •Next.js: grep for the `use cache` directive and Cache Components configuration to prioritise 16.x apps where the RCE precondition is plausible
  • •Next.js: identify apps that process user-supplied SVG through next/image or sharp, and apps exposing Server Actions
  • •NGINX: run `nginx -v` on every host and container; anything up to 1.31.6 (or 1.30.5 on stable) is affected
  • •NGINX: check configs for the exposed features — `aio`, `alias` combined with `rewrite`, `listen ... quic` / HTTP/3, and `ssl_session_tickets` — to see which of the five flaws are reachable
  • •Distribution and appliance builds (distro packages, NGINX Plus, Ingress Controller) carry their own fixed versions; check the supplier advisory rather than the upstream version string

Remediation Steps

No exploitation has been reported, so this is expedited scheduled patching rather than an emergency change — but the Next.js flaws are unauthenticated RCE, so keep the window short.

  • •Upgrade Next.js to 16.4.1 or 15.5.28 and rebuild and redeploy; on 15.x confirm sharp is 0.35.5 or later
  • •Interim Next.js mitigation for the SVG flaw only: pin sharp to 0.35.5 or later, or block SVG decoding in sharp. This does not cover the `use cache` RCE, which has no workaround
  • •Upgrade NGINX to 1.31.7 (mainline) or 1.30.6 (stable) and reload; verify with `nginx -v` after the restart
  • •If NGINX cannot be upgraded immediately, disable unneeded exposure: HTTP/3 listeners, TLS session tickets, and AIO where not required
  • •Rotate TLS session ticket keys after upgrading if ticket resumption was enabled on an affected version

Detection and Monitoring

Absent public exploit detail there are no reliable indicators of compromise yet. Focus on anomaly detection around the affected components.

  • •NGINX: alert on repeated worker process crashes or unexpected `worker process exited on signal` lines in error.log, the likely symptom of the memory-safety bugs
  • •Next.js: review requests that upload or reference SVG files against image-optimisation routes, and unexpected child processes spawned by the Node.js server
  • •Watch the CISA KEV catalog and vendor advisories for any of the CVE IDs above; if one is added, the federal remediation deadline is typically three weeks out and exploitation should be assumed

References

Primary sources for the material above. Standards are cited by identifier so they stay findable as publishers reorganise their sites.

  1. Vercel / Next.js security release, 2026-10-14 — Next.js 16.4.1 and 15.5.28 (GHSA-673q-mjm6-r5xr, CVE-2026-96889 / GHSA-2464-fhr4-w9xw, GHSA-p3m5-59mp-jv5r)
  2. Cloud Security Alliance research note — Next.js out-of-band patch: use cache and librsvg RCE, 2026-10-16
  3. The Hacker News — Next.js ships out-of-band patch for two critical flaws, 2026-10
  4. nginx.org — Security advisories (CVE-2026-97205, CVE-2026-93479, CVE-2026-15176, CVE-2026-95101, CVE-2026-97629)