Skip to main content
VulnerabilityPublished

CVE-2026-27978: vercel next.js · Cross-Site Request Forgery (CSRF)

Affects vercel next.jsSource CVE Database V5

0
Compare

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

CVSS 4.0 base score
5.3Medium
How severe the flaw is on the 0–10 CVSS scale.
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:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 17 Mar 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: evidence found.

    Public exploit code: GitHub proofs of concept

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
vercelnext.jsAffected
  • >=16.0.1 <16.1.7
Fixed in
  • 16.1.7

AI-suggested

  1. 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.
  2. For environments where immediate upgrading is not possible, implement CSRF tokens on all sensitive Server Actions to ensure requests are validated beyond origin headers.
  3. Configure authentication cookies with the SameSite=Strict attribute to prevent them from being sent with cross-origin requests, reducing CSRF risk.
  4. 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.
  5. Conduct thorough security testing of Server Actions, especially those that change state or perform sensitive operations, to verify that CSRF protections are effective.
  6. Educate developers about the risks of opaque origins and the importance of strict origin validation in web applications.
  7. Monitor application logs for unusual Server Action requests originating from unexpected contexts or origins.
  8. 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.

References

Community reviews

Loading reviews…