Skip to content

RedwoodSDK has Same-site CSRF through lack of origin validation in its server actions

Moderate severity GitHub Reviewed Published Apr 20, 2026 in redwoodjs/sdk • Updated Apr 24, 2026

Package

npm rwsdk (npm)

Affected versions

>= 1.0.0-beta.50, <= 1.2.2

Patched versions

1.2.3

Description

Summary

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, localhost on 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.

References

@justinvdm justinvdm published to redwoodjs/sdk Apr 20, 2026
Published to the GitHub Advisory Database Apr 24, 2026
Reviewed Apr 24, 2026
Last updated Apr 24, 2026

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N

EPSS score

Weaknesses

Cross-Site Request Forgery (CSRF)

The web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor. Learn more on MITRE.

CVE ID

No known CVE

GHSA ID

GHSA-m2m6-cff5-3w7c

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.