GHSA-M2M6-CFF5-3W7C
Vulnerability from github – Published: 2026-04-24 15:36 – Updated: 2026-04-24 15:36Summary
Server actions in rwsdk apply HTTP method enforcement but no origin validation. A request originating from a different origin that the browser treats as same-site can invoke a server action with the victim's session cookie attached.
Impact
An attacker who controls any origin the browser considers same-site with the deployed app can induce an authenticated victim's browser to invoke arbitrary server actions. The exposure depends on deployment shape:
- Apps deployed on custom domains (for example
app.example.com) are exposed whenever the attacker controls any sibling subdomain under the same registrable domain. Plausible vectors include subdomain takeover of stale DNS records pointing at third-party services, cross-site scripting on a sibling application, or content served from a user-content subdomain. - Apps deployed on platform-suffix domains on the Public Suffix List (
*.workers.dev,*.pages.dev) are not exposed to the sibling-subdomain vector, because sibling subdomains under those suffixes are treated as cross-site. - In local development,
localhoston any other port is treated as same-site with the app's dev server. A separate process running on the developer's machine can invoke server actions against the dev server.
The attacker cannot read action responses (mode: "no-cors" yields opaque responses). Impact is therefore limited to side effects of action invocation: writes, state changes, and any externally observable action the application performs in response.
Cross-site requests from unrelated origins (evil.com targeting app.com) are not affected because SameSite=Lax session cookies are not attached by default in that scenario.
Affected Configurations
Applications using rwsdk server actions (serverAction() or functions invoked via the RSC action protocol) in combination with cookie-based authentication. serverQuery() is not affected because it is designed to be idempotent and is invoked via GET.
Patch
The patched release enforces an Origin/Host match for non-GET action requests. Requests whose Origin header does not match the request's own origin are rejected with HTTP 403 unless the origin is listed in a new allowedOrigins configuration option.
No application code changes are required for apps that invoke server actions from their own origin. Apps that legitimately invoke server actions from another origin must add those origins to the allowedOrigins option on defineApp.
Credits
Reported by @mthx.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 1.2.2"
},
"package": {
"ecosystem": "npm",
"name": "rwsdk"
},
"ranges": [
{
"events": [
{
"introduced": "1.0.0-beta.50"
},
{
"fixed": "1.2.3"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": true,
"github_reviewed_at": "2026-04-24T15:36:52Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"details": "### Summary\n\nServer actions in `rwsdk` apply HTTP method enforcement but no origin validation. A request originating from a different origin that the browser treats as same-site can invoke a server action with the victim\u0027s session cookie attached.\n\n### Impact\n\nAn attacker who controls any origin the browser considers same-site with the deployed app can induce an authenticated victim\u0027s browser to invoke arbitrary server actions. The exposure depends on deployment shape:\n\n- Apps deployed on custom domains (for example `app.example.com`) are exposed whenever the attacker controls any sibling subdomain under the same registrable domain. Plausible vectors include subdomain takeover of stale DNS records pointing at third-party services, cross-site scripting on a sibling application, or content served from a user-content subdomain.\n- Apps deployed on platform-suffix domains on the Public Suffix List (`*.workers.dev`, `*.pages.dev`) are not exposed to the sibling-subdomain vector, because sibling subdomains under those suffixes are treated as cross-site.\n- In local development, `localhost` on any other port is treated as same-site with the app\u0027s dev server. A separate process running on the developer\u0027s machine can invoke server actions against the dev server.\n\nThe attacker cannot read action responses (`mode: \"no-cors\"` yields opaque responses). Impact is therefore limited to side effects of action invocation: writes, state changes, and any externally observable action the application performs in response.\n\nCross-site requests from unrelated origins (`evil.com` targeting `app.com`) are not affected because `SameSite=Lax` session cookies are not attached by default in that scenario.\n\n### Affected Configurations\n\nApplications using `rwsdk` server actions (`serverAction()` or functions invoked via the RSC action protocol) in combination with cookie-based authentication. `serverQuery()` is not affected because it is designed to be idempotent and is invoked via GET.\n\n### Patch\n\nThe patched release enforces an Origin/Host match for non-GET action requests. Requests whose `Origin` header does not match the request\u0027s own origin are rejected with HTTP 403 unless the origin is listed in a new `allowedOrigins` configuration option.\n\nNo application code changes are required for apps that invoke server actions from their own origin. Apps that legitimately invoke server actions from another origin must add those origins to the `allowedOrigins` option on `defineApp`.\n\n### Credits\n\nReported by `@mthx`.",
"id": "GHSA-m2m6-cff5-3w7c",
"modified": "2026-04-24T15:36:52Z",
"published": "2026-04-24T15:36:52Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/redwoodjs/sdk/security/advisories/GHSA-m2m6-cff5-3w7c"
},
{
"type": "PACKAGE",
"url": "https://github.com/redwoodjs/sdk"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "RedwoodSDK has Same-site CSRF through lack of origin validation in its server actions"
}
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.