Check whether you run an affected Next.js version:
npx next --version
Upgrade to the fixed release for your branch: 16.1.7, 15.5.14, 15.5.13.Vendor announcement
Bump next in package.json, rebuild and redeploy. Apps hosted on Vercel may already be protected at the platform, but self-hosted ones are not.
Using distro packages? Distros backport fixes under their own version numbers. Check your distro's status for CVE-2026-27977 (and the other 4 CVEs):Debian · Ubuntu · Red Hat · Alpine