CVE-2026-39371 Overview
CVE-2026-39371 is a Cross-Site Request Forgery (CSRF) vulnerability in RedwoodSDK, a server-first React framework. Server functions exported from "use server" files could be invoked via GET requests, bypassing their intended HTTP method restrictions. In cookie-authenticated applications, this allowed cross-site GET navigations to trigger state-changing functions, because browsers send SameSite=Lax cookies on top-level GET requests. This vulnerability affected all server functions, including both serverAction() handlers and bare exported functions in "use server" files.
Critical Impact
State-changing server functions can be triggered by external sites through simple GET requests, enabling unauthorized actions in cookie-authenticated applications without user consent.
Affected Products
- RedwoodSDK versions 1.0.0-beta.50 through 1.0.5
Discovery Timeline
- 2026-04-07 - CVE CVE-2026-39371 published to NVD
- 2026-04-08 - Last updated in NVD database
Technical Details for CVE-2026-39371
Vulnerability Analysis
This vulnerability stems from improper HTTP method validation in RedwoodSDK's server function handling mechanism. The framework's "use server" directive is designed to mark functions that should only execute on the server side, typically in response to POST requests from form submissions or explicit client-side invocations. However, the affected versions failed to enforce HTTP method restrictions, allowing these server functions to be triggered via GET requests.
The security implications are significant for applications using cookie-based authentication with SameSite=Lax cookies. Modern browsers automatically include SameSite=Lax cookies on top-level GET navigations, meaning an attacker could craft a malicious link or embed an image tag pointing to a vulnerable endpoint. When a victim clicks the link or loads the page containing the malicious element, their browser would automatically send the authentication cookies, and the server function would execute with the victim's privileges.
Root Cause
The root cause is missing HTTP method validation in the request handler for "use server" exported functions. The framework accepted and processed requests regardless of the HTTP method used, when it should have restricted server actions to POST requests only. This design flaw violated the principle that state-changing operations should use appropriate HTTP methods that are not subject to cross-origin inclusion.
Attack Vector
An attacker can exploit this vulnerability by crafting a URL that invokes a vulnerable server function and tricking an authenticated user into visiting the malicious link. This can be achieved through phishing emails, malicious websites, or by embedding the URL in an image tag on a third-party site. Since browsers send SameSite=Lax cookies on top-level GET requests, the victim's authenticated session is used to execute the server function without their knowledge or consent.
The attack requires no special privileges and can be executed remotely over the network, though it does require user interaction (clicking a link or visiting a malicious page). For a detailed technical analysis, see the GitHub Security Advisory.
Detection Methods for CVE-2026-39371
Indicators of Compromise
- Unusual GET requests to server function endpoints that should only receive POST requests
- Web server logs showing state-changing operations triggered via GET method
- Unexpected modifications to user data or application state without corresponding POST submissions
- Referrer headers from external domains on sensitive server function endpoints
Detection Strategies
- Review web server access logs for GET requests to endpoints handling "use server" functions
- Implement logging to track HTTP methods used for server action invocations
- Monitor for patterns of requests originating from external referrers to sensitive endpoints
- Audit application code to identify all "use server" exports and verify version compatibility
Monitoring Recommendations
- Enable detailed HTTP method logging on application servers
- Set up alerts for GET requests to known server function endpoints
- Monitor for unusual patterns of authenticated requests from unexpected external sources
- Implement Content Security Policy (CSP) reporting to detect potential CSRF attempts
How to Mitigate CVE-2026-39371
Immediate Actions Required
- Upgrade RedwoodSDK to version 1.0.6 or later immediately
- Audit all "use server" files to identify potentially affected server functions
- Review application logs for any suspicious GET requests to server function endpoints
- Consider implementing additional CSRF tokens as a defense-in-depth measure
Patch Information
The vulnerability is fixed in RedwoodSDK version 1.0.6. This patch enforces proper HTTP method validation, ensuring that server functions exported from "use server" files only respond to POST requests. Organizations should update their package.json dependencies and redeploy their applications. For additional details, refer to the GitHub Security Advisory.
Workarounds
- If immediate upgrade is not possible, implement middleware to reject GET requests to server function endpoints
- Add explicit HTTP method checks within critical server functions as a temporary measure
- Consider using SameSite=Strict cookies for sensitive authentication tokens, though this may impact user experience
- Implement CSRF tokens for all state-changing operations as an additional layer of protection
# Update RedwoodSDK to patched version
npm update @redwoodjs/sdk@1.0.6
# Or explicitly set the version in package.json and reinstall
npm install @redwoodjs/sdk@1.0.6
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


