npm package

next 12.2.6 vulnerabilities, and the version that fixes all of them

next 12.2.6 has 16 known vulnerabilities (5 rated high or critical); 15.5.24 fixes all of them. 15.5.24 has 2 known vulnerabilities of its own, so upgrade to 16.4.2, which has none. Next.js 12 reached end of life on Nov 21, 2022 and gets no more security fixes. Move to Next.js 16 (LTS).

npm (opens in a new tab) describes it as “The React Framework”

Known vulnerabilities
16
5 rated high or critical
Released
Sep 29, 2022
Latest is 16.4.2
Downloads last week
975
Under 1% of next downloads
Next.js 12 support
End of life
Since Nov 21, 2022
Licence
MIT
Pulls in
23 packages
Resolved by deps.dev

What to upgrade to

16.4.2 is the closest release with no known vulnerabilities that we checked.

  • 12.3.7

    Newest 12.x release. Released Mar 28, 2025.

    15 known vulnerabilities, worst rated warning
  • 15.5.24

    Fixes all 16 known vulnerabilities. Released Aug 25, 2026.

    2 known vulnerabilities, worst rated warning
  • 16.4.2Upgrade to this

    Latest release. Released Oct 15, 2026.

    No known vulnerabilities

16.4.2 came out on Oct 15, 2026. A coding agent trained before then doesn’t know it exists, so it may suggest an older release. AI knowledge cutoff dates

Hand the fix to your coding agent

One task with the upgrade, the file to change and why. Paste it into Claude Code, Cursor or Codex.

Findings

Every advisory for next 12.2.6

Known exploited first (CISA KEV), then by how likely they are to be exploited (FIRST EPSS), then by severity. Each id links to its OSV.dev record.

  1. CriticalCVE-2025-29927 on OSV.dev (opens in a new tab)GHSA-f82v-jwr5-mffwEPSS: top 1%

    Authorization Bypass in Next.js Middleware

    Fixed in 12.3.5. Published Mar 21, 2025.

  2. CriticalCVE-2024-51479 on OSV.dev (opens in a new tab)GHSA-7gfc-8cq8-jh5fEPSS: top 10%

    Next.js authorization bypass vulnerability

    Fixed in 14.2.15. Published Dec 17, 2024.

  3. WarningCVE-2025-57822 on OSV.dev (opens in a new tab)GHSA-4342-x723-ch2fEPSS: top 16%

    Next.js Improper Middleware Redirect Handling Leads to SSRF

    Fixed in 14.2.32. Published Aug 29, 2025.

  4. LowCVE-2023-46298 on OSV.dev (opens in a new tab)GHSA-c59h-r6p8-q9wcEPSS: top 31%

    Next.js missing cache-control header may lead to CDN caching empty reply

    Fixed in 13.4.20-canary.13. Published Oct 22, 2023.

  5. WarningCVE-2026-44577 on OSV.dev (opens in a new tab)GHSA-h64f-5h5j-jqjhEPSS: top 40%

    Next.js has a Denial of Service in the Image Optimization API

    Fixed in 15.5.16. Published May 11, 2026.

  6. WarningCVE-2026-27980 on OSV.dev (opens in a new tab)GHSA-3x4c-7xq6-9pq8EPSS: top 42%

    Next.js: Unbounded next/image disk cache growth can exhaust storage

    Fixed in 15.5.14. Published Mar 17, 2026.

  7. LowCVE-2025-32421 on OSV.dev (opens in a new tab)GHSA-qpjv-v59x-3qc4EPSS: top 45%

    Next.js Race Condition to Cache Poisoning

    Fixed in 14.2.24. Published May 15, 2025.

  8. CriticalCVE-2026-44573 on OSV.dev (opens in a new tab)GHSA-36qx-fr4f-26g5EPSS: top 46%

    Next.js has a Middleware / Proxy bypass in Pages Router applications using i18n

    Fixed in 15.5.16. Published May 11, 2026.

  9. WarningCVE-2024-47831 on OSV.dev (opens in a new tab)GHSA-g77x-44xx-532mEPSS: top 47%

    Denial of Service condition in Next.js image optimization

    Fixed in 14.2.7. Published Oct 14, 2024.

  10. WarningCVE-2025-55173 on OSV.dev (opens in a new tab)GHSA-xv57-4mr9-wg8vEPSS: top 53%

    Next.js Content Injection Vulnerability for Image Optimization

    Fixed in 14.2.31. Published Aug 29, 2025.

  11. WarningCVE-2026-29057 on OSV.dev (opens in a new tab)GHSA-ggv3-7p47-pfv8EPSS: top 56%

    Next.js: HTTP request smuggling in rewrites

    Fixed in 15.5.13. Published Mar 17, 2026.

  12. WarningCVE-2025-59471 on OSV.dev (opens in a new tab)GHSA-9g9p-9gw9-jx7fEPSS: top 59%

    Next.js self-hosted applications vulnerable to DoS via Image Optimizer remotePatterns configuration

    Fixed in 15.5.10. Published Jan 27, 2026.

  13. CriticalCVE-2026-64645 on OSV.dev (opens in a new tab)GHSA-p9j2-gv94-2wf4EPSS: top 66%

    Next.js: Server-Side Request Forgery in rewrites via attacker-controlled destination hostname

    Fixed in 15.5.21. Published Jul 22, 2026.

  14. WarningCVE-2025-57752 on OSV.dev (opens in a new tab)GHSA-g5qg-72qw-gw5vEPSS: top 74%

    Next.js Affected by Cache Key Confusion for Image Optimization API Routes

    Fixed in 14.2.31. Published Aug 29, 2025.

  15. LowCVE-2026-44572 on OSV.dev (opens in a new tab)GHSA-3g8h-86w9-wvmqEPSS: top 91%

    Next.js's Middleware / Proxy redirects can be cache-poisoned

    Fixed in 15.5.16. Published May 11, 2026.

  16. CriticalGHSA-2xp9-vwfh-vxw4 on OSV.dev (opens in a new tab)

    Next.js: Unauthenticated Remote Code Execution in Image Optimization API when AVIF files are used

    Fixed in 15.5.24. Published Sep 8, 2026.

Who is still on a vulnerable next

67% of last week’s 67.5M next downloads went to versions with known vulnerabilities.

From npm’s per-version download counts for the last 7 days, each version checked against OSV.dev. The versions checked cover over 99% of downloads.

Is next the only one?

Paste a public GitHub repo or drop your package.json and see every vulnerable, end-of-life or deprecated dependency, with one fix task. Free, no sign-up.

Check your whole repo

How this page is checked

StackPrism asks OSV.dev which advisories affect exactly next 12.2.6, merges duplicates filed under several ids, and ranks them with CISA’s Known Exploited Vulnerabilities list and FIRST EPSS. Release dates and deprecation come from deps.dev and npm, support dates from endoflife.date. No AI writes this page: every sentence comes from that data, refreshed every few hours.

Last checked against npm, OSV.dev, deps.dev, CISA KEV, FIRST EPSS and endoflife.date.