← ClaudeAtlas

auditing-csrf-and-unsafe-state-changeslisted

Audit state-changing endpoints for cross-site request forgery, where a request that rides the victim's ambient cookies is authorized on that session alone with no unpredictable, session-bound proof the request came from the app, letting an attacker page trigger the change as the victim. Use when reviewing forms and actions that modify data, change settings, move funds, or alter access, and how each is protected. Covers missing or unvalidated tokens, tokens not bound to the session, cookie-only same-site reliance and its gaps, state-changing GET requests, and content-type or method-override assumptions. The cross-site request on the victim's session is the source, the state-changing endpoint is the sink, and acting without unpredictable session-bound proof of origin is the bug.
UnboundCompute/security-agent-skills · ★ 5 · AI & Automation · score 80
Install: claude install-skill UnboundCompute/security-agent-skills
# Auditing CSRF and unsafe state changes: when the victim's cookies do the attacker's work A browser attaches a site's cookies to every request to that site, whoever caused the request. So when a state-changing endpoint authorizes an action on the session cookie alone, an attacker's page can submit a form or fire a request to that endpoint, the victim's browser attaches the session, and the change happens as the victim without them ever intending it. The defense is proof that the request originated from the app's own pages and not a foreign one: an unpredictable token bound to the session that an attacker cannot guess or read cross-origin, or a cookie policy that withholds the cookie on cross-site requests. The bug is a state change that trusts the cookie and asks for nothing else. You find it by listing every action that mutates state and checking what, beyond the cookie, each one requires. ## When to use - An endpoint changes data, settings, access, or funds and is authorized by a session cookie. - Forms or actions rely on a token, and you need to confirm it is present, validated, and session-bound. - The app relies on same-site cookie behavior, custom headers, or content-type as its only cross-site guard. ## Scope check Test cross-site request forgery only against applications you own or are authorized to assess, using test accounts and a benign state change you can observe and reverse, never triggering a real irreversible action on another user. A confirmed case perf