CWE-352
AllowedCross-Site Request Forgery (CSRF)
Abstraction: Compound · Status: Stable
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.
14188 vulnerabilities reference this CWE, most recent first.
GHSA-RW3W-FJ29-64CP
Vulnerability from github – Published: 2023-06-03 00:30 – Updated: 2024-04-04 04:31The Page Builder by AZEXO plugin for WordPress is vulnerable to Cross-Site Request Forgery in versions up to, and including, 1.27.133. This is due to missing or incorrect nonce validation on the 'azh_add_post', 'azh_duplicate_post', 'azh_update_post' and 'azh_remove_post' functions. This makes it possible for unauthenticated attackers to create, modify, and delete a post via a forged request granted they can trick a site administrator into performing an action such as clicking on a link.
{
"affected": [],
"aliases": [
"CVE-2023-3052"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-06-03T00:15:09Z",
"severity": "HIGH"
},
"details": "The Page Builder by AZEXO plugin for WordPress is vulnerable to Cross-Site Request Forgery in versions up to, and including, 1.27.133. This is due to missing or incorrect nonce validation on the \u0027azh_add_post\u0027, \u0027azh_duplicate_post\u0027, \u0027azh_update_post\u0027 and \u0027azh_remove_post\u0027 functions. This makes it possible for unauthenticated attackers to create, modify, and delete a post via a forged request granted they can trick a site administrator into performing an action such as clicking on a link.",
"id": "GHSA-rw3w-fj29-64cp",
"modified": "2024-04-04T04:31:10Z",
"published": "2023-06-03T00:30:17Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-3052"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/browser/page-builder-by-azexo/trunk/azexo_html.php#L4085"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/browser/page-builder-by-azexo/trunk/azexo_html.php#L4137"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/browser/page-builder-by-azexo/trunk/azexo_html.php#L4159"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/browser/page-builder-by-azexo/trunk/azexo_html.php#L4174"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/browser/page-builder-by-azexo/trunk/azexo_html.php#L4190"
},
{
"type": "WEB",
"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/a4e26035-ce4e-4b4b-aa3c-cd86b29b199a?source=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L",
"type": "CVSS_V3"
}
]
}
GHSA-RW4J-5FJH-7XJP
Vulnerability from github – Published: 2023-09-14 21:30 – Updated: 2024-04-04 07:40A vulnerability in the Connect Mobility Router component of Mitel MiVoice Connect through 9.6.2304.102 could allow an unauthenticated attacker to perform a Cross Site Request Forgery (CSRF) attack due to insufficient request validation. A successful exploit could allow an attacker to provide a modified URL, potentially enabling them to modify system configuration settings.
{
"affected": [],
"aliases": [
"CVE-2023-39286"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-09-14T19:16:50Z",
"severity": "MODERATE"
},
"details": "A vulnerability in the Connect Mobility Router component of Mitel MiVoice Connect through 9.6.2304.102 could allow an unauthenticated attacker to perform a Cross Site Request Forgery (CSRF) attack due to insufficient request validation. A successful exploit could allow an attacker to provide a modified URL, potentially enabling them to modify system configuration settings.",
"id": "GHSA-rw4j-5fjh-7xjp",
"modified": "2024-04-04T07:40:59Z",
"published": "2023-09-14T21:30:26Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-39286"
},
{
"type": "WEB",
"url": "https://www.mitel.com/support/security-advisories/mitel-product-security-advisory-23-0015"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-RW74-VC9H-534J
Vulnerability from github – Published: 2026-04-29 21:54 – Updated: 2026-05-08 20:13Summary
Several administrative operations in Admidio's preferences module (database backup, test email, htaccess generation) fire via GET requests with no CSRF token validation. Because SameSite=Lax cookies travel with top-level GET navigations, an attacker forces an authenticated admin to trigger these actions from a malicious page.
Details
In modules/preferences.php, the backup, test_email, and htaccess modes accept GET parameters with no CSRF token check:
// modules/preferences.php - backup mode
case 'backup':
// Creates full database dump and serves as download
// No CSRF token validation
$backupFile = $gDb->backup();
// ... sends file to client
break;
case 'test_email':
// Sends test email from the server
// No CSRF token validation
break;
case 'htaccess':
// Writes .htaccess file to disk
// No CSRF token validation
break;
The save mode in the same file validates CSRF via getFormObject(), confirming the developers intended CSRF protection but did not apply it to these other modes.
Because these are GET requests, SameSite=Lax browsers include session cookies on top-level cross-origin navigations, making CSRF exploitation trivial.
Proof of Concept
Simplified attacker page (csrf.html hosted on attacker origin):
<html>
<body>
<h1>Loading...</h1>
<!-- Trigger backup creation on victim's browser -->
<script>window.location = 'https://target-admidio.example.com/adm_program/modules/preferences.php?mode=backup';</script>
</body>
</html>
When an administrator visits this page, the browser navigates to the Admidio backup URL with full session cookies. The server generates a database dump and serves it as a download to the victim's browser. Note: the backup downloads to the victim's machine, not to the attacker. The attacker cannot read the response cross-origin.
For htaccess mode, the CSRF overwrites the .htaccess file on the server, disrupting the application. For test_email mode, it triggers email sends from the server, which an attacker can abuse for spam or to probe internal email infrastructure.
Impact
An attacker tricks an Admidio administrator into visiting a malicious page that triggers state-changing operations on the server:
- Backup creation: forces the server to generate a full database dump. The backup downloads to the victim's browser, not to the attacker. However, repeated backup triggers can cause disk I/O and storage pressure on the server.
- htaccess modification: overwrites the server's
.htaccessfile, breaking URL routing or disabling security headers. - Test email: fires email sends from the server, usable as a spam relay or to probe internal mail configuration.
The core issue is that state-changing operations run via unprotected GET requests. The victim only needs to visit a single attacker-controlled page while logged in.
Recommended Fix
- Change
backup,test_email, andhtaccessoperations to require POST requests. - Add CSRF token validation using the existing
getFormObject()mechanism. - As defense in depth, set
SameSite=Stricton session cookies or add a confirmation step for destructive operations like database backup.
Found by aisafe.io
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 5.0.8"
},
"package": {
"ecosystem": "Packagist",
"name": "admidio/admidio"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "5.0.9"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-41663"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": true,
"github_reviewed_at": "2026-04-29T21:54:30Z",
"nvd_published_at": "2026-05-07T04:16:30Z",
"severity": "LOW"
},
"details": "## Summary\n\nSeveral administrative operations in Admidio\u0027s preferences module (database backup, test email, htaccess generation) fire via GET requests with no CSRF token validation. Because `SameSite=Lax` cookies travel with top-level GET navigations, an attacker forces an authenticated admin to trigger these actions from a malicious page.\n\n## Details\n\nIn `modules/preferences.php`, the `backup`, `test_email`, and `htaccess` modes accept GET parameters with no CSRF token check:\n\n```php\n// modules/preferences.php - backup mode\ncase \u0027backup\u0027:\n // Creates full database dump and serves as download\n // No CSRF token validation\n $backupFile = $gDb-\u003ebackup();\n // ... sends file to client\n break;\n\ncase \u0027test_email\u0027:\n // Sends test email from the server\n // No CSRF token validation\n break;\n\ncase \u0027htaccess\u0027:\n // Writes .htaccess file to disk\n // No CSRF token validation\n break;\n```\n\nThe `save` mode in the same file validates CSRF via `getFormObject()`, confirming the developers intended CSRF protection but did not apply it to these other modes.\n\nBecause these are GET requests, `SameSite=Lax` browsers include session cookies on top-level cross-origin navigations, making CSRF exploitation trivial.\n\n## Proof of Concept\n\nSimplified attacker page (`csrf.html` hosted on attacker origin):\n\n```html\n\u003chtml\u003e\n\u003cbody\u003e\n\u003ch1\u003eLoading...\u003c/h1\u003e\n\u003c!-- Trigger backup creation on victim\u0027s browser --\u003e\n\u003cscript\u003ewindow.location = \u0027https://target-admidio.example.com/adm_program/modules/preferences.php?mode=backup\u0027;\u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\nWhen an administrator visits this page, the browser navigates to the Admidio backup URL with full session cookies. The server generates a database dump and serves it as a download to the victim\u0027s browser. Note: the backup downloads to the victim\u0027s machine, not to the attacker. The attacker cannot read the response cross-origin.\n\nFor `htaccess` mode, the CSRF overwrites the `.htaccess` file on the server, disrupting the application. For `test_email` mode, it triggers email sends from the server, which an attacker can abuse for spam or to probe internal email infrastructure.\n\n## Impact\n\nAn attacker tricks an Admidio administrator into visiting a malicious page that triggers state-changing operations on the server:\n\n- **Backup creation**: forces the server to generate a full database dump. The backup downloads to the victim\u0027s browser, not to the attacker. However, repeated backup triggers can cause disk I/O and storage pressure on the server.\n- **htaccess modification**: overwrites the server\u0027s `.htaccess` file, breaking URL routing or disabling security headers.\n- **Test email**: fires email sends from the server, usable as a spam relay or to probe internal mail configuration.\n\nThe core issue is that state-changing operations run via unprotected GET requests. The victim only needs to visit a single attacker-controlled page while logged in.\n\n## Recommended Fix\n\n1. Change `backup`, `test_email`, and `htaccess` operations to require POST requests.\n2. Add CSRF token validation using the existing `getFormObject()` mechanism.\n3. As defense in depth, set `SameSite=Strict` on session cookies or add a confirmation step for destructive operations like database backup.\n\n---\n*Found by [aisafe.io](https://aisafe.io)*",
"id": "GHSA-rw74-vc9h-534j",
"modified": "2026-05-08T20:13:59Z",
"published": "2026-04-29T21:54:30Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/Admidio/admidio/security/advisories/GHSA-rw74-vc9h-534j"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-41663"
},
{
"type": "PACKAGE",
"url": "https://github.com/Admidio/admidio"
},
{
"type": "WEB",
"url": "https://github.com/Admidio/admidio/releases/tag/v5.0.9"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:N/I:L/A:L",
"type": "CVSS_V3"
}
],
"summary": "Admidio has CSRF on Admin Preferences that Triggers Unauthorized Backup, .htaccess Write, and Email Send"
}
GHSA-RW8V-F293-8H38
Vulnerability from github – Published: 2021-12-23 00:00 – Updated: 2022-11-14 19:00Cross-Site Request Forgery (CSRF) vulnerability discovered in Contact Form 7 Database Addon – CFDB7 WordPress plugin (versions <= 1.2.5.9).
{
"affected": [],
"aliases": [
"CVE-2021-36886"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-12-22T19:15:00Z",
"severity": "HIGH"
},
"details": "Cross-Site Request Forgery (CSRF) vulnerability discovered in Contact Form 7 Database Addon \u2013 CFDB7 WordPress plugin (versions \u003c= 1.2.5.9).",
"id": "GHSA-rw8v-f293-8h38",
"modified": "2022-11-14T19:00:25Z",
"published": "2021-12-23T00:00:49Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-36886"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/vulnerability/contact-form-cfdb7/wordpress-contact-form-7-database-addon-cfdb7-plugin-1-2-5-9-cross-site-request-forgery-csrf-vulnerability"
},
{
"type": "WEB",
"url": "https://wordpress.org/plugins/contact-form-cfdb7/#developers"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-RW93-J8H9-PFX7
Vulnerability from github – Published: 2023-12-18 18:30 – Updated: 2026-04-28 21:33Cross-Site Request Forgery (CSRF) vulnerability in Saint Systems Disable User Login.This issue affects Disable User Login: from n/a through 1.3.7.
{
"affected": [],
"aliases": [
"CVE-2023-47806"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-12-18T16:15:10Z",
"severity": "MODERATE"
},
"details": "Cross-Site Request Forgery (CSRF) vulnerability in Saint Systems Disable User Login.This issue affects Disable User Login: from n/a through 1.3.7.",
"id": "GHSA-rw93-j8h9-pfx7",
"modified": "2026-04-28T21:33:24Z",
"published": "2023-12-18T18:30:21Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-47806"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/vulnerability/disable-user-login/wordpress-disable-user-login-plugin-1-3-7-cross-site-request-forgery-csrf-vulnerability?_s_id=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L",
"type": "CVSS_V3"
}
]
}
GHSA-RW96-MHCR-P7F9
Vulnerability from github – Published: 2022-05-14 01:55 – Updated: 2022-05-14 01:55** DISPUTED ** An issue was discovered in GetSimple CMS v3.3.13. There is a CSRF vulnerability that can change the administrator's password via admin/settings.php. NOTE: The vendor reported that the PoC was sending a value for the nonce parameter.
{
"affected": [],
"aliases": [
"CVE-2018-17103"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-09-16T21:29:00Z",
"severity": "HIGH"
},
"details": "** DISPUTED ** An issue was discovered in GetSimple CMS v3.3.13. There is a CSRF vulnerability that can change the administrator\u0027s password via admin/settings.php. NOTE: The vendor reported that the PoC was sending a value for the nonce parameter.",
"id": "GHSA-rw96-mhcr-p7f9",
"modified": "2022-05-14T01:55:58Z",
"published": "2022-05-14T01:55:58Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-17103"
},
{
"type": "WEB",
"url": "https://github.com/GetSimpleCMS/GetSimpleCMS/issues/1295"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-RWCM-5CCV-GGC2
Vulnerability from github – Published: 2022-05-14 03:06 – Updated: 2022-05-14 03:06LimeSurvey version 3.0.0-beta.3+17110 contains a Cross ite Request Forgery (CSRF) vulnerability in Boxes that can result in CSRF admins to delete boxes. This vulnerability appears to have been fixed in 3.6.x.
{
"affected": [],
"aliases": [
"CVE-2018-1000514"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-06-26T16:29:00Z",
"severity": "MODERATE"
},
"details": "LimeSurvey version 3.0.0-beta.3+17110 contains a Cross ite Request Forgery (CSRF) vulnerability in Boxes that can result in CSRF admins to delete boxes. This vulnerability appears to have been fixed in 3.6.x.",
"id": "GHSA-rwcm-5ccv-ggc2",
"modified": "2022-05-14T03:06:11Z",
"published": "2022-05-14T03:06:11Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-1000514"
},
{
"type": "WEB",
"url": "https://bugs.limesurvey.org/plugin.php?page=Source/view\u0026id=26925"
},
{
"type": "WEB",
"url": "https://bugs.limesurvey.org/view.php?id=13562"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-RWCP-QRWG-56CG
Vulnerability from github – Published: 2023-06-22 15:30 – Updated: 2023-06-30 19:58Casdoor v1.331.0 and below was discovered to contain a Cross-Site Request Forgery (CSRF) in the endpoint /api/set-password. This vulnerability allows attackers to arbitrarily change the victim user's password via supplying a crafted URL.
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "github.com/casdoor/casdoor"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "1.331.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2023-34927"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": true,
"github_reviewed_at": "2023-06-22T20:01:21Z",
"nvd_published_at": "2023-06-22T13:15:10Z",
"severity": "MODERATE"
},
"details": "Casdoor v1.331.0 and below was discovered to contain a Cross-Site Request Forgery (CSRF) in the endpoint `/api/set-password`. This vulnerability allows attackers to arbitrarily change the victim user\u0027s password via supplying a crafted URL.",
"id": "GHSA-rwcp-qrwg-56cg",
"modified": "2023-06-30T19:58:47Z",
"published": "2023-06-22T15:30:23Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-34927"
},
{
"type": "WEB",
"url": "https://github.com/casdoor/casdoor/issues/1531"
},
{
"type": "WEB",
"url": "https://casdoor.org"
},
{
"type": "WEB",
"url": "https://gist.github.com/omriman067/4e90a3a4ffa40984f011d8777a995469"
},
{
"type": "PACKAGE",
"url": "https://github.com/casdoor/casdoor"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "Casdoor Cross-Site Request Forgery vulnerability"
}
GHSA-RWHP-3V8J-67M2
Vulnerability from github – Published: 2024-10-16 21:31 – Updated: 2024-10-17 18:31dingfanzu CMS V1.0 was discovered to contain a Cross-Site Request Forgery (CSRF) via the addPro parameter of the component doAdminAction.php which allows a remote attacker to execute arbitrary code
{
"affected": [],
"aliases": [
"CVE-2024-48758"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-10-16T21:15:13Z",
"severity": "MODERATE"
},
"details": "dingfanzu CMS V1.0 was discovered to contain a Cross-Site Request Forgery (CSRF) via the addPro parameter of the component doAdminAction.php which allows a remote attacker to execute arbitrary code",
"id": "GHSA-rwhp-3v8j-67m2",
"modified": "2024-10-17T18:31:35Z",
"published": "2024-10-16T21:31:10Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-48758"
},
{
"type": "WEB",
"url": "https://github.com/Yllxx03/CVE/blob/main/CVE-2024-48758/CVE-2024-48758.md"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-RWHP-9VFH-G7V8
Vulnerability from github – Published: 2025-05-09 06:32 – Updated: 2025-05-09 06:32Cross-Site Request Forgery (CSRF) vulnerability in Sparx Systems Pro Cloud Server allows Cross-Site Request Forgery to perform Session Hijacking. Cross-Site Request Forgery is present at the whole application but it can be used to change the Pro Cloud Server Configuration password. This issue affects Pro Cloud Server: earlier than 6.0.165.
{
"affected": [],
"aliases": [
"CVE-2025-4375"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-05-09T06:15:37Z",
"severity": "MODERATE"
},
"details": "Cross-Site Request Forgery (CSRF) vulnerability in Sparx Systems Pro Cloud Server allows Cross-Site Request Forgery to perform Session Hijacking. Cross-Site Request Forgery is present at the whole application but it can be used to change the Pro Cloud Server Configuration password. \nThis issue affects Pro Cloud Server: earlier than 6.0.165.",
"id": "GHSA-rwhp-9vfh-g7v8",
"modified": "2025-05-09T06:32:37Z",
"published": "2025-05-09T06:32:37Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-4375"
},
{
"type": "WEB",
"url": "https://sparxsystems.com/products/procloudserver/6.1"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:P/VC:H/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
Mitigation MIT-4
Strategy: Libraries or Frameworks
- 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]
Mitigation
Ensure that the application is free of cross-site scripting issues (CWE-79), because most CSRF defenses can be bypassed using attacker-controlled script.
Mitigation
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]
Mitigation
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.
Mitigation
- 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]
Mitigation
Do not use the GET method for any request that triggers a state change.
Mitigation
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.
CAPEC-111: JSON Hijacking (aka JavaScript Hijacking)
An attacker targets a system that uses JavaScript Object Notation (JSON) as a transport mechanism between the client and the server (common in Web 2.0 systems using AJAX) to steal possibly confidential information transmitted from the server back to the client inside the JSON object by taking advantage of the loophole in the browser's Same Origin Policy that does not prohibit JavaScript from one website to be included and executed in the context of another website.
CAPEC-462: Cross-Domain Search Timing
An attacker initiates cross domain HTTP / GET requests and times the server responses. The timing of these responses may leak important information on what is happening on the server. Browser's same origin policy prevents the attacker from directly reading the server responses (in the absence of any other weaknesses), but does not prevent the attacker from timing the responses to requests that the attacker issued cross domain.
CAPEC-467: Cross Site Identification
An attacker harvests identifying information about a victim via an active session that the victim's browser has with a social networking site. A victim may have the social networking site open in one tab or perhaps is simply using the "remember me" feature to keep their session with the social networking site active. An attacker induces a payload to execute in the victim's browser that transparently to the victim initiates a request to the social networking site (e.g., via available social network site APIs) to retrieve identifying information about a victim. While some of this information may be public, the attacker is able to harvest this information in context and may use it for further attacks on the user (e.g., spear phishing).
CAPEC-62: Cross Site Request Forgery
An attacker crafts malicious web links and distributes them (via web pages, email, etc.), typically in a targeted manner, hoping to induce users to click on the link and execute the malicious action against some third-party application. If successful, the action embedded in the malicious link will be processed and accepted by the targeted application with the users' privilege level. This type of attack leverages the persistence and implicit trust placed in user session cookies by many web applications today. In such an architecture, once the user authenticates to an application and a session cookie is created on the user's system, all following transactions for that session are authenticated using that cookie including potential actions initiated by an attacker and simply "riding" the existing session cookie.