Cross-Site Request Forgery, a class of flaw where a site accepts a state-changing request that was sent without the user's intended consent. It usually exploits an existing browser session, so the server treats the forged request as authenticated unless it checks anti-CSRF tokens, same-site cookie controls, or request origin data.
What CWE-352 Means in Practice
CWE-352 is a web application weakness, not a single product bug. It describes a failure to verify that a state-changing request really came from the user who intended it, which means the browser can be tricked into sending an authenticated request the user never meant to approve.
That matters because the server often sees a valid session cookie and assumes the action is legitimate. The weakness is therefore about trust in ambient browser credentials, and it becomes dangerous whenever the application accepts actions that change data, settings, permissions, or financial state without an extra proof of intent.
How CSRF Actually Succeeds
CSRF works when an attacker can cause a victim’s browser to submit a request in a context the server already trusts. The browser may automatically attach cookies or other session material, so the request can look authenticated even though it was initiated from another site, embedded content, or a malicious page flow.
The weakness is not that the attacker learns the victim’s password or session value. Instead, it abuses the fact that the browser can present existing authentication to the target site. That is why protections such as synchroniser tokens, signed double-submit patterns, SameSite cookie settings, and origin or Fetch Metadata checks matter: they add evidence that the request came from the legitimate application flow.
For a practical defence overview, see the CSRF Prevention Guide.
Where CWE-352 Becomes Most Dangerous
The impact depends on what the forged request can do. A weak CSRF defense is most serious where a single request can change a password, add a payment method, alter an email address, approve an action, or change application state in a way that later enables takeover or fraud.
It is also easy to misunderstand where the boundary sits between browser trust and application trust. If the application relies only on session cookies, then any action reachable through a simple authenticated request path can become a target. That is why the distinction between CSRF and related browser trust problems matters in real reviews. The SSRF vs CSRF comparison helps separate browser-forged requests from server-forged requests, while the CORS vs CSRF Protection guide explains why CORS policy alone does not solve the problem.
Defensive Controls and Testing Focus
Good CSRF defence is layered. Tokens, SameSite cookies, origin validation, and framework-level anti-forgery support each reduce risk in a different way, but no single control should be treated as universal. The correct design is usually one that requires the browser to prove intent, not just session continuity.
Testing should focus on state-changing routes, not just obvious login forms. Review POST, PUT, PATCH, DELETE and any GET request that changes state, then check whether the application accepts the action without a token or other server-side proof of origin. Pay special attention to legacy endpoints, framework exemptions, and custom AJAX flows where teams sometimes weaken defaults.
Broader context on weakness classification is available in the CWE Top 25 Guide, and the relationship between weakness, vulnerability, and platform mapping is covered in the CVE, CWE and CPE Guide.
Risk and Threat Considerations
CSRF is dangerous because it turns the user’s existing authenticated browser session into an attack path. The usual failure mode is not credential theft, but unauthorized action through trust in the browser’s automatic credential handling, which can lead to account changes, transaction abuse, or privilege-relevant state changes.
Failure mechanism: A forged cross-site request reaches a state-changing endpoint, and the server processes it as legitimate because it trusts session cookies or similar ambient authentication without checking intent.
Impact: Attackers can trigger unwanted actions at scale, especially on high-value workflows such as account settings, payouts, contact details, approvals, or admin functions.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP ASVS, NIST SP 800-53 Rev 5, CIS Controls v8 and NIST CSF 2.0 set the technical controls, while ISO/IEC 27001:2022 defines the regulatory obligations.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP ASVS | V4 — API and Web Service | CSRF is an API and web service request-trust failure affecting state-changing endpoints. |
| Recommendation — Require anti-CSRF validation on state-changing web and API requests. | ||
| NIST SP 800-53 Rev 5 | IA-10 — Nonrepudiation | CSRF weakens proof that a user intentionally initiated a transaction or change. |
| Recommendation — Add request-intent evidence for sensitive actions so the initiator is verifiable. | ||
| ISO/IEC 27001:2022 | A.8.24 — Use of cryptography | CSRF defenses often depend on secure token handling and integrity-protected request flows. |
| Recommendation — Protect anti-forgery tokens and related request integrity mechanisms appropriately. | ||
| CIS Controls v8 | CIS-16 — Application Software Security | CSRF is a software weakness that belongs in secure design and application testing. |
| Recommendation — Build CSRF checks into application security requirements and validation testing. | ||
| NIST CSF 2.0 | PR.AA-05 — Authenticator Management | CSRF exploits authenticated browser sessions, so request authentication handling matters. |
| Recommendation — Harden session and authenticator handling for actions that change state. | ||
Practitioner Guidance
Why practitioners should care: CSRF protection should be treated as a server-side design requirement, not a front-end enhancement. If the application still relies on cookies or browser-managed session state, the control choice belongs in the backend and framework configuration, where request validation can be enforced consistently.
What to watch for: The common blind spot is assuming that login is the only sensitive action. Any endpoint that changes state, especially one reachable with a simple browser request, deserves the same review rigor as the primary authentication flow.
Practitioner takeaway: If a request can change state without a server-checked proof of user intent, the application has not really solved CSRF, it has only made the exploit less obvious.
Related resources from NHI Mgmt Group
- What do teams get wrong when they rely on top CWE rankings alone?
- Why do repeat CWE classes keep causing breaches even when teams know about them?
- How should security teams use the CWE Top 25 and OWASP Top 10 together without duplicating work?
- Why do CWE-level findings provide stronger audit evidence than OWASP category labels?
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on November 18, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org