Back to blog

CSRF assessment: connect browser credentials to state changes

3 min read
CSRF assessment: connect browser credentials to state changes

Sources checked: . FailSafe Research.

Use a harmless state change to make a CSRF assessment observable. The question is whether an untrusted origin can cause an authenticated action the user did not intend. The useful result concerns a specific action and credential model, rather than the mere presence of a token in a form.

OWASP documents defenses for unwanted browser-initiated authenticated requests. OWASP CSRF Prevention Cheat Sheet provides the underlying reference. The assessment design below is an original defensive example, not a report of a customer incident.

Choose an action with clear authority

Inventory operations such as changing a notification preference, connecting an integration, or modifying an account setting. Record how the browser supplies credentials and which origin or request properties the application trusts. Consider API clients separately if they use a different authentication model. Select a harmless state change for the assessment and agree on the expected cross-origin behavior. Login, logout, and account-linking actions can have distinct implications, so do not assume one normal preference update represents every workflow in the application.

Use owned origins and synthetic accounts

Create a test user and two organization-controlled test origins under a written plan. First show the allowed state change through the normal application interface. Then evaluate whether the controlled untrusted origin can cause that same harmless change under the approved browser conditions. Avoid real users, unsolicited links, and social engineering. Do not publish a working attack page. Record the browser version, credential configuration, and application environment, because browser protections and deployment settings can materially change the observed result.

Capture state and enforcement evidence

Preserve a sanitized request summary, relevant cookie attributes, application decision, and final synthetic setting. Confirm whether the browser sent credentials rather than infer it from a page screenshot. A denied response may arise from a networking issue instead of the intended CSRF defense. A successful response may leave state unchanged. Where possible, correlate with server-side logs and an allowed control case. Avoid treating CORS behavior as a universal proxy for CSRF protection; reading a response and causing an action are different browser boundaries.

Retest adjacent changes

Validate normal use after remediation and repeat the original browser conditions. Include framework changes, reverse-proxy configuration, cookie policy, and additional state-changing routes when they were relevant to the finding. Document excluded browsers and integration clients. The result cannot establish the absence of cross-site scripting or all session-management failures. For automated or agentic assessment, owned origins and bounded state changes should remain in the scope, with a clear cleanup plan and no attempts to involve employees or customers as unsuspecting test subjects.

A useful assessment artifact

Preserve a browser-condition sheet with the tested credential model, origin categories, relevant policy settings, and expected action. This helps engineers reproduce the same boundary after framework or cookie changes without distributing an executable attack example or involving unsuspecting users.

Plan an assessment

Discuss the authorized scope and required evidence with FailSafe SWARM. For a business evaluating an initial engagement, review the first-pentest offer and confirm scope before purchase.

Questions & answers

Questions about this topic

Direct answers to common questions about this page.

No. A browser may be unable to read a response while still sending an authenticated request that changes state.

They are relevant evidence, but evaluate the complete action, browser behavior, server checks, and intended credential model.

Put this guidance to work

Bring a critical application workflow and its expected access rules. FailSafe can validate the boundary, preserve exploit evidence and retest the correction within an agreed scope.

Startup offer: $999 USD for 250 credits and one authorized black-box run. Sign in to SWARM before Stripe checkout. Custom scope and sovereign deployments are separate.

Scope this application test