Full-stack framework

Remix security checklist

The Remix mistakes AI tools ship: unguarded loaders/actions (IDOR), server secrets leaking into the client bundle, over-fetching loaders, and CVE-2025-31137. Free scan.

Remix (now merged into React Router 7) is a full-stack React framework built around route modules: each route exports a loader (server GET) and an action (server mutation) that the browser calls over the network. The mental model that trips people up is that these are not private helpers — every loader and action is a real, directly callable API endpoint.

Client-exposed env: no built-in public prefix — keep secrets in server-only env, and remember anything a loader returns reaches the client

Why Remix apps get shipped insecure

Ship-fast AI tools treat loaders and actions as if they were internal functions and forget that the client fetches them by URL. You can’t trust one route to protect another — parent route auth does not automatically cover a child route’s loader — so any loader or action without its own check becomes an open endpoint, and anything a loader returns is serialized into the page for anyone to read.

The Remix-specific footguns

Scan your Remix app — live routes + repo, free

Trust's framework-aware scan reaches your real routes and endpoints, then checks your code for leaked secrets and vulnerable deps. No signup, about a minute.

Run a free scan →

Remix security checklist

  1. Treat every loader and every action as a public API endpoint: add an explicit authentication and authorization check at the top of each one — verify the session AND that the current user owns the record it touches. Never rely on a parent route to guard a child.
  2. Return only the fields the UI needs from loaders. Shape the response (pick id/name/etc.) instead of returning raw DB rows, and never return tokens, session artifacts, or password fields — remember loader output is serialized to the client.
  3. Keep secrets in .server.ts files or .server directories (or strictly inside loader/action bodies) and let the build fail if server-only code reaches the client graph — don’t import DB clients or key-bearing modules from shared/client code.
  4. Upgrade to Remix ≥ 2.16.3 / React Router ≥ 7.4.1 to patch CVE-2025-31137, and if you’re behind the Express adapter, validate/normalize the Host and X-Forwarded-Host headers at the proxy.
  5. Add CSRF/cross-origin protection for actions — check the request origin before mutating — since actions can be triggered by cross-origin form submissions.
  6. Scan the live URL and the repo before launch: enumerate your loaders/actions and hit them unauthenticated (and with a swapped id) to prove they reject you, and scan the repo for secrets that slipped into client-reachable modules.

Bottom line

In Remix, every loader and action is a public endpoint and everything a loader returns reaches the browser — so missing auth means IDOR, and an over-eager loader means leaked fields. Trust’s Remix / React Router route-extractor reads your real loaders, actions, and resource routes, probes them like an attacker (unauthenticated and with tampered ids), and scans your repo for leaked secrets and vulnerable versions like CVE-2025-31137 — free URL scan, no signup.

Scan another framework

Keep your app safe