Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CWE-352 (跨站请求伪造(CSRF)) — Vulnerability Class 4777

4777 vulnerabilities classified as CWE-352 (跨站请求伪造(CSRF)). AI Chinese analysis included.

CWE-352, Cross-Site Request Forgery, is a web application weakness where the system fails to verify that an incoming request was intentionally initiated by the authenticated user rather than an unauthorized actor. Attackers typically exploit this vulnerability by tricking a victim into submitting a malicious request, often via a hidden link or form on a third-party site, while the victim is logged into the target application. Because the browser automatically includes valid session cookies, the server processes the forged request as legitimate, potentially allowing unauthorized actions like fund transfers or profile changes. Developers mitigate this risk by implementing anti-CSRF tokens, synchronizer tokens, or validating the Origin and Referer headers to ensure requests originate from trusted sources, thereby preventing unauthorized state changes.

MITRE CWE 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 (1)
Confidentiality, Integrity, Availability, Non-Repudiation, Access ControlGain 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…
Mitigations (5)
Architecture and DesignUse 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]
ImplementationEnsure 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 DesignGenerate 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 DesignIdentify 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 DesignUse 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 f…
Examples (1)
This example PHP code attempts to secure the form submission process by validating that the user submitting the form has a valid session. A CSRF attack would not be prevented by this countermeasure because the attacker forges a request through the user's web browser in which a valid session already exists.
<form action="/url/profile.php" method="post"> <input type="text" name="firstname"/> <input type="text" name="lastname"/> <br/> <input type="text" name="email"/> <input type="submit" name="submit" value="Update"/> </form>
Bad · HTML
// initiate the session in order to validate sessions session_start(); //if the session is registered to a valid user then allow update if (! session_is_registered("username")) { echo "invalid session detected!"; // Redirect user to login page [...] exit; } // The user session is valid, so process the request // and update the information update_profile(); function update_profile { // read in the data from $POST and send an update // to the database SendUpdateToDatabase($_SESSION['username'], $_POST['email']); [...] echo "Your profile has been successfully updated."; }
Bad · PHP
CVE IDTitleCVSSSeverityPublished
CVE-2021-24159 Contact Form 7 Style <= 3.1.9 - Cross-Site Request Forgery to Stored Cross-Site Scripting — Contact Form 7 Style 7.1 -2021-04-05
CVE-2021-24161 Responsive Menu < 4.0.4 - CSRF to Arbitrary File Upload — Responsive Menu – Create Mobile-Friendly Menu 8.8 -2021-04-05
CVE-2021-24162 Responsive Menu < 4.0.4 - CSRF to Settings Update — Responsive Menu – Create Mobile-Friendly Menu 8.1 -2021-04-05
CVE-2021-24166 Ninja Forms < 3.4.34 - CSRF to OAuth Service Disconnection — Ninja Forms Contact Form – The Drag and Drop Form Builder for WordPress 5.4 -2021-04-05
CVE-2021-24133 ActiveCampaign < 8.0.2 - Cross-Site Request Forgery in Settings — ActiveCampaign 6.5 -2021-03-18
CVE-2020-29030 Insufficient CSRF guards — GateManager 8.1 High2021-03-05
CVE-2021-1227 Cisco NX-OS Software NX-API Cross-Site Request Forgery Vulnerability — Cisco NX-OS Software 8.1 -2021-02-24
CVE-2021-22701 Schneider PowerLogic 产品跨站请求伪造漏洞 — PowerLogic ION7400, ION7650, ION83xx/84xx/85xx/8600, ION8650, ION8800, ION9000 and PM800 (see notification for affected versions) 8.1 -2021-02-19
CVE-2021-26296 Cross-Site Request Forgery (CSRF) vulnerability in Apache MyFaces — Apache MyFaces Core 7.5 -2021-02-19
CVE-2021-21027 Magento Commerce Cross-Site Request Forgery (CSRF) Could Lead To Unauthorized Data Modification — Magento Commerce 4.3 -2021-02-11
CVE-2020-10734 Keycloak 跨站请求伪造漏洞 — keycloak 7.5 -2021-02-11
CVE-2020-13186 Teradici Cloud Access Connector 跨站请求伪造漏洞 — - Cloud Access Connector - Cloud Access Connector Legacy 8.8 -2021-02-11
CVE-2020-13569 OpenEMR 跨站请求伪造漏洞 — OpenEMR 8.8 -2021-01-28
CVE-2021-21275 CSRF in MediaWiki Report extension — Report 5.3 Medium2021-01-25
CVE-2020-12511 Pepper+Fuchs Comtrol IO-Link Master Cross-Site Request Forgery — Comtrol IO-Link Master 8.8 High2021-01-22
CVE-2021-1257 Cisco DNA Center Cross-Site Request Forgery Vulnerability — Cisco Digital Network Architecture Center (DNA Center) 8.8 -2021-01-20
CVE-2020-6776 CSRF in Bosch PRAESIDEO and Bosch PRAESENSA Management Interface — PRAESIDEO 8.8 High2021-01-14
CVE-2021-21241 CSRF can expose users authentication token in Flask-Security-Too — flask-security-too 7.4 High2021-01-11
CVE-2020-7336 Network Security Management (NSM) - Cross Site Request Forgery vulnerability — Network Security Management (NSM) 6.6 Medium2021-01-05
CVE-2020-13527 Lantronix Xport Edge 跨站请求伪造漏洞 — Lantronix 6.5 -2020-12-17
CVE-2019-19289 Siemens XHQ 跨站请求伪造漏洞 — XHQ 8.8 -2020-12-14
CVE-2020-14368 Eclipse Che 跨站请求伪造漏洞 — eclipse 7.1 -2020-12-14
CVE-2020-8282 Ubiquiti Edgepower 跨站请求伪造漏洞 — EdgePower 8.8 -2020-12-14
CVE-2020-14369 Red Hat CloudForms 跨站请求伪造漏洞 — CloudForms 7.1 -2020-12-02
CVE-2020-7332 Cross-Site Request Forgery (CSRF) in firewall ePO extension of McAfee Endpoint Security (ENS) — Endpoint Security for Windows 7.0 High2020-11-12
CVE-2020-15259 CSRF in Auth0 ad-ldap-connector — ad-ldap-connector 8.1 High2020-11-06
CVE-2020-3456 Cisco FXOS Software Firepower Chassis Manager Cross-Site Request Forgery Vulnerability — Cisco Adaptive Security Appliance (ASA) Software 8.8 High2020-10-21
CVE-2020-12502 Pepperl+Fuchs improper authorization affects multiple Comtrol RocketLinx products — P+F Comtrol RocketLinx 8.8 High2020-10-15
CVE-2019-16009 Cisco IOS and Cisco IOS XE Software Web UI Cross-Site Request Forgery Vulnerability — Cisco IOS 12.2(15)B 8.8 -2020-09-23
CVE-2020-3124 Cisco Hosted Collaboration Mediation Fulfillment Cross-Site Request Forgery Vulnerability — Cisco Hosted Collaboration Mediation Fulfillment 6.5 -2020-09-23

Vulnerabilities classified as CWE-352 (跨站请求伪造(CSRF)) represent 4777 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.