Cyber Risks · Trail of Bits Blog

Secure your Apollo GraphQL server with Semgrep

Summary: Trail of Bits released nine new Semgrep rules to detect misconfigurations in Apollo GraphQL server versions 3 and 4, covering CSRF and CORS issues found repeatedly during client audits. The rules target the csrfPrevention option, which defaults to false in v3 and true in v4, and CORS policies set through the ApolloServer class or an Express.js back end.

Bottom line: Apollo v3's csrfPrevention option defaults to false and, in Trail of Bits' experience, is almost never set to true, leaving servers open to CSRF attacks that let attackers act on behalf of authenticated users.

Read the original at Trail of Bits Blog ↗

Topics
Supply Chain & AppSec
Related
Kitesurf is now open source Cyber Risks · Nov 13, 2026