Summary
Certain server functions in RedwoodSDK (versions 1.0.0-beta.50 to 1.0.5) could be invoked via GET requests regardless of their intended HTTP method, enabling state-changing operations to be triggered by cross-site navigation.
In cookie-authenticated applications, browsers automatically sent SameSite=Lax cookies on top-level GET requests, allowing attackers to induce victims' browsers to execute authenticated server functions without explicit user intent.
Affected context
This vulnerability arises in RedwoodSDK applications that:
- Use "use server" files to define server-side functions, including serverAction() handlers and bare exported functions
- Rely on cookie-based authentication, especially with SameSite=Lax cookies
- Expect certain server functions to require non-GET HTTP methods (e.g., POST) for state-changing operations
Under these conditions, any browser-initiated top-level GET navigation to the affected endpoints can invoke state-changing logic, even when the application logic assumes method-based protection.
Exploit preconditions
- Attack surface: Publicly reachable RedwoodSDK server endpoints exposing serverAction() handlers or other exported server functions.
- Required access: The attacker needs the victim to be authenticated to the target application via cookies (e.g., logged in) and must be able to induce the victim's browser to visit a crafted URL (e.g., via link, redirect, or embedded resource).
- Trigger point: A cross-site top-level GET request to an endpoint mapped to a vulnerable server function in a "use server" file.
- Why exploitation is possible: The framework allowed server functions to be invoked using GET, bypassing logical assumptions that state-changing actions would only be available via non-GET methods; browsers automatically attach SameSite=Lax cookies on top-level GET navigations, turning these requests into authenticated actions.
Why this happens
The underlying issue is a mismatch between HTTP method semantics and the framework's invocation model for server functions.
RedwoodSDK treated exported server functions (including serverAction() handlers) as invocable via GET requests even when they were intended for state changes typically reserved for POST/PUT/DELETE.
This violates the RESTful principle that GET should be safe and idempotent and maps to CWE-352: Cross-Site Request Forgery, because it lets cross-site, cookie-authenticated GET requests trigger privileged state-changing operations without additional anti-CSRF validation.
Potential impact
- Attacker-induced execution of state-changing actions under the victim's authenticated session
- Unauthorized updates to user data or application state
- Involuntary initiation of workflows (e.g., account changes, settings toggles, or other business actions) via cross-site navigation
- Potential amplification of other vulnerabilities that rely on authenticated requests (e.g., privilege changes, resource manipulation)
General mitigation guidance
Effective mitigation focuses on aligning HTTP methods with state-changing behavior and enforcing CSRF defenses:
- Design server-side handlers so that state-changing logic is only reachable via non-GET methods (e.g., POST) and enforce method checks at the framework or routing layer.
- Treat GET endpoints as read-only; avoid performing mutations, side effects, or sensitive operations in handlers reachable via GET.
- Introduce and enforce CSRF protection mechanisms for state-changing endpoints, such as tokens or double-submit cookies, at a common middleware or framework level.
- Consider stricter cookie policies (e.g., SameSite=Strict where feasible) and minimize reliance on ambient authentication for sensitive actions.
- Apply least-privilege principles in backend logic so that a single unintended invocation cannot produce disproportionate impact.
How teams detect issues like this
Organizations can detect and monitor this class of issue by:
- Reviewing server function definitions in "use server" files to identify handlers performing mutations that are accessible via GET routes.
- Applying static analysis or linting rules that flag state-changing code paths exposed through GET or without explicit CSRF protection.
- Incorporating security-focused code review checklists that require verification of HTTP method usage, CSRF controls, and cookie handling for all server-side actions.
- Using automated application security testing tools (e.g., DAST/SAST) that probe for CSRF vulnerabilities and method-agnostic state-changing endpoints.

