CWEweakness
CWE-352 Cross-Site Request Forgery
Medium
Official page ↗
- Alternate terms
- Session Riding, Cross Site Reference Forgery, XSRF, CSRF
- Abstraction
- Compound
- Structure
- Composite
- Status
- Stable
- Likelihood of exploit
- Medium
- Languages
- Go, Not Language-Specific
- CWE version
- 5.0
Description
The web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor.
Common consequences
• Confidentiality, Integrity, Availability, Non-Repudiation, Access Control: Gain Privileges or Assume Identity, Bypass Protection Mechanism, Read Application Data, Modify Application Data, DoS: Crash, Exit, or Restart — The consequences will vary depending on the nature of the functionality that is vulnerable to CSRF. An attacker could trick a client into making an unintentional request to the web server via a URL, image load, XmlHttpRequest, etc., which would then be treated as an authentic request from the client - effectively performing any operations as the victim, leading to an exposure of data, unintended code execution, etc. If the victim is an administrator or privileged user, the consequences may include obtaining complete control over the web application - deleting or stealing data, uninstalling the product, or using it to launch other attacks against all of the product's users. Because the attacker has the identity of the victim, the scope of CSRF is limited only by the victim's privileges.
Potential mitigations
• [Architecture and Design] Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482].
For example, use anti-CSRF packages such as the OWASP CSRFGuard. [REF-330]
Another example is the ESAPI Session Management control, which includes a component for CSRF. [REF-45]
• [Implementation] Ensure that the application is free of cross-site scripting issues (CWE-79), because most CSRF defenses can be bypassed using attacker-controlled script.
• [Architecture and Design] Generate a unique nonce for each form, place the nonce into the form, and verify the nonce upon receipt of the form. Be sure that the nonce is not predictable (CWE-330). [REF-332]
• [Architecture and Design] Identify especially dangerous operations. When the user performs a dangerous operation, send a separate confirmation request to ensure that the user intended to perform that operation.
• [Architecture and Design] Use the "double-submitted cookie" method as described by Felten and Zeller:
When a user visits a site, the site should generate a pseudorandom value and set it as a cookie on the user's machine. The site should require every form submission to include this value as a form value and also as a cookie value. When a POST request is sent to the site, the request should only be considered valid if the form value and the cookie value are the same.
Because of the same-origin policy, an attacker cannot read or modify the value stored in the cookie. To successfully submit a form on behalf of the user, the attacker would have to correctly guess the pseudorandom value. If the pseudorandom value is cryptographically strong, this will be prohibitively difficult.
This technique requires Javascript, so it may not work for browsers that have Javascript disabled. [REF-331]
• [Architecture and Design] Do not use the GET method for any request that triggers a state change.
• [Implementation] Check the HTTP Referer header to see if the request originated from an expected page. This could break legitimate functionality, because users or proxies may have disabled sending the Referer for privacy reasons.
Detection methods
• Manual Analysis: This weakness can be detected using tools and techniques that require manual (human) analysis, such as penetration testing, threat modeling, and interactive tools that allow the tester to record and modify an active session.
Specifically, manual analysis can be useful for finding this weakness, and for minimizing false positives assuming an understanding of business logic. However, it might not achieve desired code coverage within limited time constraints. For black-box analysis, if credentials are not known for privileged accounts, then the most security-critical portions of the application may not receive sufficient attention.
Consider using OWASP CSRFTester to identify potential issues and aid in manual analysis.
• Automated Static Analysis: CSRF is currently difficult to detect reliably using automated techniques. This is because each application has its own implicit security policy that dictates which requests can be influenced by an outsider and automatically performed on behalf of a user, versus which requests require strong confidence that the user intends to make the request. For example, a keyword search of the public portion of a web site is typically expected to be encoded within a link that can be launched automatically when the user clicks on the link.
• Automated Static Analysis - Binary or Bytecode: According to SOAR [REF-1479], the following detection techniques may be useful:
Cost effective for partial coverage:
• Bytecode Weakness Analysis - including disassembler + source code weakness analysis
• Binary Weakness Analysis - including disassembler + source code weakness analysis
• Manual Static Analysis - Binary or Bytecode: According to SOAR [REF-1479], the following detection techniques may be useful:
Cost effective for partial coverage:
• Binary / Bytecode disassembler - then use manual analysis for vulnerabilities & anomalies
• Dynamic Analysis with Automated Results Interpretation: According to SOAR [REF-1479], the following detection techniques may be useful:
Highly cost effective:
• Web Application Scanner
• Dynamic Analysis with Manual Results Interpretation: According to SOAR [REF-1479], the following detection techniques may be useful:
Highly cost effective:
• Fuzz Tester
• Framework-based Fuzzer
• Manual Static Analysis - Source Code: According to SOAR [REF-1479], the following detection techniques may be useful:
Cost effective for partial coverage:
• Focused Manual Spotcheck - Focused manual analysis of source
• Manual Source Code Review (not inspections)
• Automated Static Analysis - Source Code: According to SOAR [REF-1479], the following detection techniques may be useful:
Cost effective for partial coverage:
• Source code Weakness Analyzer
• Context-configured Source Code Weakness Analyzer
• Architecture or Design Review: According to SOAR [REF-1479], the following detection techniques may be useful:
Cost effective for partial coverage:
• Inspection (IEEE 1028 standard) (can apply to requirements, design, source code, etc.)
• Formal Methods / Correct-By-Construction
Observed examples
• CVE-2004-1703: Add user accounts via a URL in an img tag
• CVE-2004-1995: Add user accounts via a URL in an img tag
• CVE-2004-1967: Arbitrary code execution by specifying the code in a crafted img tag or URL
• CVE-2004-1842: Gain administrative privileges via a URL in an img tag
• CVE-2005-1947: Delete a victim's information via a URL or an img tag
• CVE-2005-2059: Change another user's settings via a URL or an img tag
• CVE-2005-1674: Perform actions as administrator via a URL or an img tag
• CVE-2009-3520: modify password for the administrator
• CVE-2009-3022: CMS allows modification of configuration via CSRF attack against the administrator
• CVE-2009-3759: web interface allows password changes or stopping a virtual machine via CSRF
Related
Requires · not in database (1)
Attack pattern · CAPEC (4)
Observed example · CVE (10)
- CVE-2009-3759 Multiple cross-site request forgery (CSRF) vulnerabilities in sample code in the XenServer Resource Kit in Citrix XenCenterWeb allow remote… vulnerability
- CVE-2009-3520 Cross-site request forgery (CSRF) vulnerability in the Your_account module in CMSphp 0.21 allows remote attackers to hijack the… vulnerability
- CVE-2009-3022 Cross-site request forgery (CSRF) vulnerability in bingo!CMS 1.2 and earlier allows remote attackers to hijack the authentication of other… vulnerability
- CVE-2005-2059 Multiple cross-site request forgery (CSRF) vulnerabilities in (1) addaddress.php, (2) toggleignore.php, (3) removeignore.php, and (4)… vulnerability
- CVE-2005-1947 Cross-site request forgery (CSRF) vulnerability in Invision Gallery before 1.3.1 allows remote attackers to delete albums and images as… vulnerability
- CVE-2005-1674 Cross-Site Request Forgery (CSRF) vulnerability in Help Center Live allows remote attackers to perform actions as the administrator via a… vulnerability
- CVE-2004-1842 Cross-site request forgery (CSRF) vulnerability in Php-Nuke 6.x through 7.1.0 allows remote attackers to gain administrative privileges via… vulnerability
- CVE-2004-1995 Cross-Site Request Forgery (CSRF) vulnerability in FuseTalk 2.0 allows remote attackers to create arbitrary accounts via a link to… vulnerability
- CVE-2004-1703 Fusion News 3.6.1 allows remote attackers to add user accounts, if the administrator is logged in, via a comment that contains an img… vulnerability
- CVE-2004-1967 Cross-site request forgery (CSRF) vulnerabilities in (1) cp_forums.php, (2) cp_usergroup.php, (3) cp_ipbans.php, (4) myhome.php, (5)… vulnerability
Child of · CWE (1)
- CWE-345 Insufficient Verification of Data Authenticity weakness
Requires · CWE (3)
Referenced by CAPEC · weakness (4)
Referenced by CVE · weakness (9,872)
- CVE-2026-110983 The WP Photo Album Plus WordPress plugin before 9.3.04.004 does not verify the origin or a security token for one of its comment-management… vulnerability
- CVE-2026-115299 The Contact Form by Supsystic WordPress plugin before 1.11.1 does not verify a CSRF nonce before saving its mail settings, allowing an… vulnerability
- CVE-2026-115300 The Contact Form by Supsystic WordPress plugin before 1.11.1 does not validate a CSRF token or request origin on two administrator-only… vulnerability
- CVE-2026-116399 Cross-Site Request Forgery (CSRF) vulnerability in InstaWP InstaWP Connect instawp-connect allows Cross Site Request Forgery.This issue… vulnerability
- CVE-2026-27062 Cross-Site Request Forgery (CSRF) vulnerability in WPFunnels Team WPFunnels wpfunnels allows Cross Site Request Forgery.This issue affects… vulnerability
- CVE-2026-5702 Cross-Site Request Forgery (CSRF) vulnerability in SABBATIC application that allows an attacker can trick an authenticated user into… vulnerability
- CVE-2015-20129 CrushFTP before 7.3.0 contains a cross-site request forgery vulnerability that allows attackers to perform administrative actions because… vulnerability
- CVE-2026-111120 The VikRentCar Car Rental Management System plugin for WordPress is vulnerable to Cross-Site Request Forgery in all versions up to, and… vulnerability
- CVE-2026-113485 The Media Library Assistant WordPress plugin before 3.42 does not consistently validate its CSRF nonce on the Media Library bulk-action… vulnerability
- CVE-2026-113486 The Media Library Assistant WordPress plugin before 3.42 does not verify a CSRF nonce on its Empty Trash media action, so a forged… vulnerability
- CVE-2026-118266 Echo is a Go web framework. vulnerability
- CVE-2026-92797 The MemberPress plugin for WordPress is vulnerable to Cross-Site Request Forgery in versions up to, and including, 1.14.1. vulnerability
- CVE-2026-102787 Joomla Extension - phoca.cz - CSRF in category management in Phoca Download 3.1.0 - 6.1.5 vulnerability
- CVE-2026-116838 A malicious actor who lures an authenticated user to a malicious page could exploit a Cross-Site Request Forgery (CSRF) vulnerability found… vulnerability
- CVE-2026-116839 A malicious actor who lures an authenticated user to a malicious page could exploit a Cross-Site Request Forgery (CSRF) vulnerability found… vulnerability
- CVE-2026-116863 Cross-Site Request Forgery (CSRF) vulnerability in Tribulant Software Newsletters newsletters-lite allows Cross Site Request Forgery.This… vulnerability
- CVE-2026-116880 Semantic MediaWiki from 3.0.0 before 7.3.1 contains a cross-site request forgery vulnerability in Special:SMWAdmin because it overwrites… vulnerability
- CVE-2026-116895 REDAXO before 5.21.5 contains a cross-site request forgery vulnerability because the backend processes the safemode GET parameter in… vulnerability
- CVE-2026-117534 REDAXO before 5.21.3 contains a cross-site request forgery vulnerability in the structure/history plugin that allows attackers to delete… vulnerability
- CVE-2026-117536 REDAXO before 5.21.3 contains a cross-site request forgery vulnerability in the backend user administration page (users/users) because the… vulnerability
- CVE-2026-111841 Cross-Site Request Forgery (CSRF) vulnerability in Aman FunnelKit Automations wp-marketing-automations allows Cross Site Request… vulnerability
- CVE-2026-116210 Webasyst Framework through 4.4.0 contains a cross-site request forgery vulnerability in the Photos app that allows remote attackers to… vulnerability
- CVE-2026-77058 boneIO Black is vulnerable to Cross-Site Request Forgery (CSRF) on all state-changing API endpoints because it lacks CSRF tokens and does… vulnerability
- CVE-2026-97295 Cross-Site Request Forgery (CSRF) vulnerability in David Lingren Media LIbrary Assistant media-library-assistant allows Cross Site Request… vulnerability
- CVE-2026-116052 A security flaw has been discovered in LinkStackOrg LinkStack up to 4.8.8. vulnerability
- CVE-2026-116072 Infinity for Reddit through 8.3.4 contains a login cross-site request forgery vulnerability that allows attackers to log victims into an… vulnerability
- CVE-2026-116204 YesWiki before 4.7.0 contains a cross-site request forgery vulnerability in the despam action (tools/security/actions/despam.php) that lets… vulnerability
- CVE-2026-115796 A security flaw has been discovered in Tenda F6 12.02.01.73. vulnerability
- CVE-2026-58497 Uni-CLI gives people and agents one command interface for websites, browsers, desktop applications, local tools, and MCP. vulnerability
- CVE-2026-75779 Improper Neutralization of Special Elements used in an OS Command (“OS Command Injection”) and Cross-Site Request Forgery (CSRF) in an ASUS… vulnerability
Referenced by CWE · can precede (1)
- CWE-1275 Sensitive Cookie with Improper SameSite Attribute weakness
Referenced by CWE · has member (10)
- CWE-1200 Weaknesses in the 2019 CWE Top 25 Most Dangerous Software Errors view
- CWE-1337 Weaknesses in the 2021 CWE Top 25 Most Dangerous Software Weaknesses view
- CWE-1350 Weaknesses in the 2020 CWE Top 25 Most Dangerous Software Weaknesses view
- CWE-1387 Weaknesses in the 2022 CWE Top 25 Most Dangerous Software Weaknesses view
- CWE-1425 Weaknesses in the 2023 CWE Top 25 Most Dangerous Software Weaknesses view
- CWE-1430 Weaknesses in the 2024 CWE Top 25 Most Dangerous Software Weaknesses view
- CWE-1435 Weaknesses in the 2025 CWE Top 25 Most Dangerous Software Weaknesses view
- CWE-1468 Weaknesses Addressed by the OWASP Golang Secure Coding Practices Guide view
- CWE-635 Weaknesses Originally Used by NVD from 2008 to 2016 view
- CWE-884 CWE Cross-section view
Referenced by CWE · peer of (1)
- CWE-79 Improper Neutralization of Input During Web Page Generation weakness