Skip to content
The Chat Archive
claude-sonnet-4-20250514· Anthropic LMArena Human Preference 140K

why not use GET for any (sensitive) state change

  1. User

    why not use GET for any (sensitive) state change

  2. Assistant

    Using GET for sensitive state changes violates fundamental web security principles and creates serious vulnerabilities.

    GET requests are designed to be safe and idempotent - meaning they should only retrieve data without causing side effects. When you use GET for state changes, several problems arise:

    Security vulnerabilities: GET parameters appear in URLs, which get logged in server logs, browser history, and referrer headers. Sensitive data like passwords or tokens become visible to anyone with access to these logs.

    CSRF attacks become trivial: Since GET requests can be triggered by simply visiting a malicious webpage with an image tag like <img src="https://yoursite.com/delete-account?confirm=true">, attackers can perform actions on behalf of logged-in users without their knowledge.

    Unintended actions: Users might accidentally trigger state changes by refreshing pages, sharing URLs, or having URLs prefetched by browsers or search engines.

    Caching issues: GET requests are cached by browsers, proxies, and CDNs. State-changing operations shouldn't be cached since they need to execute every time.

    Semantic violations: It breaks HTTP conventions that other developers and tools rely on. Crawlers, prefetchers, and debugging tools assume GET requests are safe to repeat.

    The proper approach is using POST, PUT, DELETE, or PATCH for state changes, along with CSRF tokens and proper authentication. This ensures operations are intentional, secure, and follow web standards that the entire ecosystem depends on.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.