Next.js Cache Poisoning (CVE-2025-49826): DoS Risk and Fix
CVE-2025-49826 is a cache poisoning flaw in the Next.js React framework that could cause denial of service. Under certain conditions, an HTTP 204 (No Content) response could be cached for a static page, so later visitors received an empty response instead of the page. It affects self-hosted Next.js 15 versions before 15.1.8 and is rated High (CVSS 7.5) for availability impact only; no data is exposed.
Topic: Cyber Threats, Scams & Online Safety in Cybersecurity & Ethical Hacking · News & analysis
Quick answer: CVE-2025-49826 is a cache poisoning flaw in the Next.js React framework that could cause denial of service. Under certain conditions, an HTTP 204 (No Content) response could be cached for a static page, so later visitors received an empty response instead of the page. It affects self-hosted Next.js 15 versions before 15.1.8 and is rated High (CVSS 7.5) for availability impact only; no data is exposed. Apps hosted on Vercel were not affected. Upgrade to Next.js 15.1.8 or later, redeploy, and clear any CDN or reverse proxy caches.
Key takeaways
- Fixed in Next.js 15.1.8; upgrade self-hosted apps.
- Impact is availability: pages served empty, not data theft.
- Vercel says its hosted platform was not affected.
- Purge caches after upgrading so poisoned entries disappear.
- Review caching rules so error and empty responses are not cached.
Table of Contents
- What Is CVE-2025-49826?
- What Is Cache Poisoning?
- Who Is Affected?
- How Do You Fix It?
- How Do You Harden Caching in Web Apps?
- How Should Teams Track Framework Vulnerabilities?
- References
What Is CVE-2025-49826?
The Next.js security advisory explains that, under certain conditions, a 204 response could be cached for static pages. A 204 status means "no content" (RFC 9110), so every user served from the poisoned cache got a blank response until the cache expired. The NVD entry rates it CVSS 7.5 with availability as the only impact.
What Is Cache Poisoning?
Web caches store responses to serve future requests quickly. Cache poisoning happens when an attacker or an unusual condition causes the cache to store a harmful or wrong response, which is then served to everyone. OWASP describes the general attack class, which can range from denial of service to serving malicious content.
Who Is Affected?
| Deployment | Status |
|---|---|
| Self-hosted Next.js 15 before 15.1.8 | Affected (advisory range starts at 15.0.4-canary.51) |
| Next.js 15.1.8 and later | Fixed |
| Apps hosted on Vercel | Not affected, per Vercel |
How Do You Fix It?
# Check the installed version
npm ls next
# Upgrade to a fixed release (or the latest 15.x)
npm install next@^15.1.8
# Rebuild and redeploy
npm run build
After deploying, purge your CDN or reverse proxy cache so no poisoned entries remain. The fix is in the v15.1.8 release.
How Do You Harden Caching in Web Apps?
- Never cache error responses or empty responses for public pages.
- Set explicit
Cache-Controlheaders per route. - Include only intended headers in the cache key; ignore untrusted headers.
- Monitor for sudden spikes in empty or error responses.
- Keep frameworks updated with automated dependency alerts.
Related: continuous security testing in DevSecOps and Node.js vulnerabilities. WebAsha offers web application security training.
How Should Teams Track Framework Vulnerabilities?
- Enable dependency alerts in your code host and review them weekly.
- Run
npm auditor an SCA tool in CI and fail builds on critical issues. - Subscribe to framework security advisories and release notes.
- Keep a software bill of materials for deployed apps.
- Patch promptly and redeploy, then purge caches where relevant.
# List known vulnerabilities in installed npm packages
npm audit --omit=dev
NIST SP 800-218 (SSDF) describes responding to vulnerabilities as part of secure development, and CISA promotes SBOMs for tracking components.
References
Frequently Asked Questions
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Wow
0
Sad
0
Angry
0