SecurityContext

CVE-2026-27978: Next.js - Cross-Site Request Forgery

  • Cve: CVE-2026-27978
  • Name: Next.js - Cross-Site Request Forgery
  • Description: Next.js is a React framework for building full-stack web applications. Starting in version 16.0.1 and prior to version 16.1.7, `origin: null` was treated as a "missing" origin during Server Action CSRF validation. As a result, requests from opaque contexts (such as sandboxed iframes) could bypass origin verification instead of being validated as cross-origin requests. An attacker could induce a victim browser to submit Server Actions from a sandboxed context, potentially executing state-changing actions with victim credentials (CSRF). This is fixed in version 16.1.7 by treating `'null'` as an explicit origin value and enforcing host/origin checks unless `'null'` is explicitly allowlisted in `experimental.serverActions.allowedOrigins`. If upgrading is not immediately possible, add CSRF tokens for sensitive Server Actions, prefer `SameSite=Strict` on sensitive auth cookies, and/or do not allow `'null'` in `serverActions.allowedOrigins` unless intentionally required and additionally protected.
  • Impact: Attackers can perform state-changing actions with victim credentials via CSRF from sandboxed contexts.
  • Remediation: Upgrade to version 16.1.7 or later; alternatively, add CSRF tokens, use SameSite=Strict cookies, and restrict 'null' in allowedOrigins.
  • Vulnerability type: cross_site_request_forgery
  • Vulnerability impact: broken_authentication
  • Requirement type: user_interaction
  • Requirements: Attacker needs victim to submit requests from sandboxed iframe context
  • Labels source: projectdiscovery
  • Severity: medium
  • Cvss score: 4.3
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
  • Epss score: 0.00233
  • Epss percentile: 0.14138
  • Assignee: [email protected]
  • Published at: 2026-03-18T00:16:20Z
  • Age in days: 251
  • Modified at: 2026-06-17T10:28:00Z
  • Patch available: yes
  • Public exploits total: 1
  • References total: 3
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-27978
  • Nvd status: analyzed
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, rejected by nvd

Cwe

IdName
CWE-352Cross-Site Request Forgery

Hackerone

  • Reports: 5
  • Rank: 2666

Public exploits

UrlSourceAdded date
https://github.com/Nayekah/Next.js-Proof-of-Conceptpoc-in-github2026-04-25

References

Same in every row:

  • Source: nvd
UrlTags
https://github.com/vercel/next.js/commit/a27a11d78e748a8c7ccfd14b7759ad2b9bf097d8Patch
https://github.com/vercel/next.js/security/advisories/GHSA-mq59-m269-xvcxMitigation, Vendor Advisory
https://github.com/vercel/next.js/releases/tag/v16.1.7Release Notes

Products

ProductAffectedPlatform boundSourcesUrl
vercel:next.js>= 16.0.1, < 16.1.7nonvd/v1/products/vercel/next.js

Projects

RepositoryLink kindsIndexedUrl
vercel/next.jscommit, fix, package, releases, security_advisoryyes/v1/repositories/vercel/next.js

Index

  • Repositories: 146
  • Repositories high signal: 115
  • Packages: 1

Exploitation

  • Public exploit: yes
  • Public exploit count: 1
  • Public exploit first date: 2026-04-25
  • Remote: yes
  • Hackerone reports: 5
  • Exposed hosts: 987038
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since