CVE-2026-27978: vercel next.js · Cross-Site Request Forgery (CSRF)
Affects vercel next.jsSource CVE Database V5
Not known to be exploited · CVSS 5.3 Medium : upgrade to 16.1.7 when convenient.
Data as of 30 Oct 2026, 11:52 UTC
- EPSS
- 0.2% chance of exploitation in 30 days – higher than 10% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 16.1.7
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 17 Mar 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: evidence found.
Public exploit code: GitHub proofs of concept
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), GitHub proofs of concept, the Metasploit, Exploit-DB and nuclei-templates index as of 30 Oct 2026.
What to do
Upgrade vercel next.js to 16.1.7.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| vercelnext.js | Affected
| Fixed in
|
AI-suggested
- Upgrade all Next.js applications to version 16.1.7 or later, which includes the fix treating 'null' as an explicit origin and enforcing strict origin checks.
- For environments where immediate upgrading is not possible, implement CSRF tokens on all sensitive Server Actions to ensure requests are validated beyond origin headers.
- Configure authentication cookies with the SameSite=Strict attribute to prevent them from being sent with cross-origin requests, reducing CSRF risk.
- Review and restrict the experimental.serverActions.allowedOrigins configuration to disallow 'null' unless absolutely necessary, and if allowed, ensure additional protections such as token validation are in place.
- Conduct thorough security testing of Server Actions, especially those that change state or perform sensitive operations, to verify that CSRF protections are effective.
- Educate developers about the risks of opaque origins and the importance of strict origin validation in web applications.
- Monitor application logs for unusual Server Action requests originating from unexpected contexts or origins.
- Employ Content Security Policy (CSP) headers to restrict iframe embedding and sandboxing where possible, reducing attack surface for opaque origin exploitation.
Description
CVE-2026-27978 is a Cross-Site Request Forgery (CSRF) vulnerability in Next.js versions 16.0.1 up to but not including 16.1.7. The issue arises because the framework treated 'origin: null' as a missing origin during Server Action CSRF validation, allowing requests from opaque contexts like sandboxed iframes to bypass origin checks. This flaw enables attackers to trick users into submitting unauthorized Server Actions that can change state with the victim's credentials. The vulnerability is fixed in version 16.1.