Skip to content

Commit ff95e5f

Browse files
1 parent 1f8d331 commit ff95e5f

2 files changed

Lines changed: 130 additions & 0 deletions

File tree

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-jcc7-9wpm-mj36",
4+
"modified": "2026-03-17T15:29:48Z",
5+
"published": "2026-03-17T15:29:48Z",
6+
"aliases": [
7+
"CVE-2026-27977"
8+
],
9+
"summary": "Next.js: null origin can bypass dev HMR websocket CSRF checks",
10+
"details": "## Summary\nIn `next dev`, cross-site protection for internal websocket endpoints could treat `Origin: null` as a bypass case even if [`allowedDevOrigins`](https://nextjs.org/docs/app/api-reference/config/next-config-js/allowedDevOrigins) is configured, allowing privacy-sensitive/opaque contexts (for example sandboxed documents) to connect unexpectedly.\n\n## Impact\nIf a dev server is reachable from attacker-controlled content, an attacker may be able to connect to the HMR websocket channel and interact with dev websocket traffic. This affects development mode only.\nApps without a configured [`allowedDevOrigins`](https://nextjs.org/docs/app/api-reference/config/next-config-js/allowedDevOrigins) still allow connections from any origin.\n\n## Patches\nFixed by validating `Origin: null` through the same cross-site origin-allowance checks used for other origins. \n\n## Workarounds\nIf upgrade is not immediately possible:\n- Do not expose `next dev` to untrusted networks.\n- Block websocket upgrades to `/_next/webpack-hmr` when `Origin` is `null` at your proxy.",
11+
"severity": [
12+
{
13+
"type": "CVSS_V4",
14+
"score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "npm",
21+
"name": "next"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "16.0.1"
29+
},
30+
{
31+
"fixed": "16.1.7"
32+
}
33+
]
34+
}
35+
]
36+
}
37+
],
38+
"references": [
39+
{
40+
"type": "WEB",
41+
"url": "https://github.com/vercel/next.js/security/advisories/GHSA-jcc7-9wpm-mj36"
42+
},
43+
{
44+
"type": "WEB",
45+
"url": "https://github.com/vercel/next.js/commit/862f9b9bb41d235e0d8cf44aa811e7fd118cee2a"
46+
},
47+
{
48+
"type": "PACKAGE",
49+
"url": "https://github.com/vercel/next.js"
50+
},
51+
{
52+
"type": "WEB",
53+
"url": "https://github.com/vercel/next.js/releases/tag/v16.1.7"
54+
}
55+
],
56+
"database_specific": {
57+
"cwe_ids": [
58+
"CWE-1385"
59+
],
60+
"severity": "LOW",
61+
"github_reviewed": true,
62+
"github_reviewed_at": "2026-03-17T15:29:48Z",
63+
"nvd_published_at": null
64+
}
65+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-mq59-m269-xvcx",
4+
"modified": "2026-03-17T15:30:14Z",
5+
"published": "2026-03-17T15:30:14Z",
6+
"aliases": [
7+
"CVE-2026-27978"
8+
],
9+
"summary": "Next.js: null origin can bypass Server Actions CSRF checks",
10+
"details": "## Summary\n`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.\n\n## Impact\nAn attacker could induce a victim browser to submit Server Actions from a sandboxed context, potentially executing state-changing actions with victim credentials (CSRF).\n\n## Patches\nFixed by treating `'null'` as an explicit origin value and enforcing host/origin checks unless `'null'` is explicitly allowlisted in `experimental.serverActions.allowedOrigins`. \n\n## Workarounds\nIf upgrade is not immediately possible:\n- Add CSRF tokens for sensitive Server Actions.\n- Prefer `SameSite=Strict` on sensitive auth cookies.\n- Do not allow `'null'` in `serverActions.allowedOrigins` unless intentionally required and additionally protected.",
11+
"severity": [
12+
{
13+
"type": "CVSS_V4",
14+
"score": "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"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "npm",
21+
"name": "next"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "16.0.1"
29+
},
30+
{
31+
"fixed": "16.1.7"
32+
}
33+
]
34+
}
35+
]
36+
}
37+
],
38+
"references": [
39+
{
40+
"type": "WEB",
41+
"url": "https://github.com/vercel/next.js/security/advisories/GHSA-mq59-m269-xvcx"
42+
},
43+
{
44+
"type": "WEB",
45+
"url": "https://github.com/vercel/next.js/commit/a27a11d78e748a8c7ccfd14b7759ad2b9bf097d8"
46+
},
47+
{
48+
"type": "PACKAGE",
49+
"url": "https://github.com/vercel/next.js"
50+
},
51+
{
52+
"type": "WEB",
53+
"url": "https://github.com/vercel/next.js/releases/tag/v16.1.7"
54+
}
55+
],
56+
"database_specific": {
57+
"cwe_ids": [
58+
"CWE-352"
59+
],
60+
"severity": "MODERATE",
61+
"github_reviewed": true,
62+
"github_reviewed_at": "2026-03-17T15:30:14Z",
63+
"nvd_published_at": null
64+
}
65+
}

0 commit comments

Comments
 (0)