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.
14237 vulnerabilities reference this CWE, most recent first.
GHSA-4F2J-9HXW-7F6R
Vulnerability from github – Published: 2022-05-17 02:10 – Updated: 2022-05-17 02:10Cross-site request forgery (CSRF) vulnerability in admin.php in AjaXplorer 2.3.3 and 2.3.4 allows remote attackers to hijack the authentication of administrators for requests that modify passwords via the update_user_pwd action.
{
"affected": [],
"aliases": [
"CVE-2008-6639"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-04-07T14:17:00Z",
"severity": "MODERATE"
},
"details": "Cross-site request forgery (CSRF) vulnerability in admin.php in AjaXplorer 2.3.3 and 2.3.4 allows remote attackers to hijack the authentication of administrators for requests that modify passwords via the update_user_pwd action.",
"id": "GHSA-4f2j-9hxw-7f6r",
"modified": "2022-05-17T02:10:53Z",
"published": "2022-05-17T02:10:53Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-6639"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/42694"
},
{
"type": "WEB",
"url": "http://gmda.altervista.org/AjaXplorer-2.3.3/cka.txt"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/30383"
},
{
"type": "WEB",
"url": "http://www.osvdb.org/45656"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-4F3F-JXWX-F7WW
Vulnerability from github – Published: 2022-05-14 02:19 – Updated: 2022-05-14 02:19Cscms 4 allows CSRF for creating a member via upload/admin.php/user/save, authenticating vip members via upload/admin.php/user/init/tid and upload/admin.php/user/init/rzid, and creating a super administrator and web editor via upload/admin.php/sys/save.
{
"affected": [],
"aliases": [
"CVE-2018-16448"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-09-04T04:29:00Z",
"severity": "HIGH"
},
"details": "Cscms 4 allows CSRF for creating a member via upload/admin.php/user/save, authenticating vip members via upload/admin.php/user/init/tid and upload/admin.php/user/init/rzid, and creating a super administrator and web editor via upload/admin.php/sys/save.",
"id": "GHSA-4f3f-jxwx-f7ww",
"modified": "2022-05-14T02:19:19Z",
"published": "2022-05-14T02:19:19Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-16448"
},
{
"type": "WEB",
"url": "https://github.com/chshcms/cscms/issues/1"
}
],
"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-4F42-3J25-QR4F
Vulnerability from github – Published: 2023-08-30 15:30 – Updated: 2024-04-04 07:17The User Activity Tracking and Log WordPress plugin before 4.0.9 does not have proper CSRF checks when managing its license, which could allow attackers to make logged in admins update and deactivate the plugin's license via CSRF attacks
{
"affected": [],
"aliases": [
"CVE-2023-4150"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-08-30T15:15:09Z",
"severity": "MODERATE"
},
"details": "The User Activity Tracking and Log WordPress plugin before 4.0.9 does not have proper CSRF checks when managing its license, which could allow attackers to make logged in admins update and deactivate the plugin\u0027s license via CSRF attacks",
"id": "GHSA-4f42-3j25-qr4f",
"modified": "2024-04-04T07:17:32Z",
"published": "2023-08-30T15:30:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-4150"
},
{
"type": "WEB",
"url": "https://wpscan.com/vulnerability/381ef15b-aafe-4ef4-a0bc-867d891f7f44"
}
],
"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-4F4C-RHJV-4WGV
Vulnerability from github – Published: 2023-11-20 21:01 – Updated: 2023-11-20 22:41Impact
A CSRF vulnerability in the query on XWiki tool allows executing arbitrary database queries on the database of the XWiki installation. Among other things, this allows modifying and deleting all data of the wiki. This could be both used to damage the wiki and to create an account with elevated privileges for the attacker, thus impacting the confidentiality, integrity and availability of the whole XWiki instance. A possible attack vector are comments on the wiki, by embedding an image with wiki syntax like [[image:path:/xwiki/bin/view/Admin/QueryOnXWiki?query=DELETE%20FROM%20xwikidoc]], all documents would be deleted from the database when an admin user views this comment.
Patches
This has been patched in Admin Tools Application 4.5.1 by adding form token checks.
Workarounds
The patch can also be applied manually to the affected pages. Alternatively, if the query tool is not needed, by deleting the document Admin.SQLToolsGroovy, all database query tools can be deactivated.
References
- https://jira.xwiki.org/browse/ADMINTOOL-92
- https://github.com/xwiki-contrib/application-admintools/commit/45298b4fbcafba6914537dcdd798a1e1385f9e46
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "org.xwiki.contrib:xwiki-application-admintools"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "4.5.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2023-48293"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": true,
"github_reviewed_at": "2023-11-20T21:01:25Z",
"nvd_published_at": "2023-11-20T19:15:08Z",
"severity": "HIGH"
},
"details": "### Impact\nA CSRF vulnerability in the query on XWiki tool allows executing arbitrary database queries on the database of the XWiki installation. Among other things, this allows modifying and deleting all data of the wiki. This could be both used to damage the wiki and to create an account with elevated privileges for the attacker, thus impacting the confidentiality, integrity and availability of the whole XWiki instance. A possible attack vector are comments on the wiki, by embedding an image with wiki syntax like `[[image:path:/xwiki/bin/view/Admin/QueryOnXWiki?query=DELETE%20FROM%20xwikidoc]]`, all documents would be deleted from the database when an admin user views this comment.\n\n### Patches\nThis has been patched in Admin Tools Application 4.5.1 by adding form token checks.\n\n### Workarounds\nThe [patch](https://github.com/xwiki-contrib/application-admintools/commit/45298b4fbcafba6914537dcdd798a1e1385f9e46) can also be applied manually to the affected pages. Alternatively, if the query tool is not needed, by deleting the document `Admin.SQLToolsGroovy`, all database query tools can be deactivated.\n\n### References\n\n* https://jira.xwiki.org/browse/ADMINTOOL-92\n* https://github.com/xwiki-contrib/application-admintools/commit/45298b4fbcafba6914537dcdd798a1e1385f9e46",
"id": "GHSA-4f4c-rhjv-4wgv",
"modified": "2023-11-20T22:41:31Z",
"published": "2023-11-20T21:01:25Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/xwiki-contrib/application-admintools/security/advisories/GHSA-4f4c-rhjv-4wgv"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-48293"
},
{
"type": "WEB",
"url": "https://github.com/xwiki-contrib/application-admintools/commit/45298b4fbcafba6914537dcdd798a1e1385f9e46"
},
{
"type": "PACKAGE",
"url": "https://github.com/xwiki-contrib/application-admintools"
},
{
"type": "WEB",
"url": "https://jira.xwiki.org/browse/ADMINTOOL-92"
}
],
"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"
}
],
"summary": "Cross-Site Request Forgery with QueryOnXWiki allows arbitrary database queries"
}
GHSA-4F4P-52MC-M3G8
Vulnerability from github – Published: 2025-05-19 15:31 – Updated: 2026-04-01 18:35Cross-Site Request Forgery (CSRF) vulnerability in Bill Minozzi reCAPTCHA for all allows Cross Site Request Forgery. This issue affects reCAPTCHA for all: from n/a through 2.26.
{
"affected": [],
"aliases": [
"CVE-2025-48243"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-05-19T15:15:26Z",
"severity": "MODERATE"
},
"details": "Cross-Site Request Forgery (CSRF) vulnerability in Bill Minozzi reCAPTCHA for all allows Cross Site Request Forgery. This issue affects reCAPTCHA for all: from n/a through 2.26.",
"id": "GHSA-4f4p-52mc-m3g8",
"modified": "2026-04-01T18:35:08Z",
"published": "2025-05-19T15:31:01Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-48243"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/wordpress/plugin/recaptcha-for-all/vulnerability/wordpress-recaptcha-for-all-2-26-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:N",
"type": "CVSS_V3"
}
]
}
GHSA-4F5X-9VPP-X3HW
Vulnerability from github – Published: 2022-05-17 04:43 – Updated: 2022-05-17 04:43Cross-site request forgery (CSRF) vulnerability in users_maint.html in KrisonAV CMS before 3.0.2 allows remote attackers to hijack the authentication of administrators for requests that create user accounts via a crafted request.
{
"affected": [],
"aliases": [
"CVE-2013-2713"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2014-05-23T14:55:00Z",
"severity": "MODERATE"
},
"details": "Cross-site request forgery (CSRF) vulnerability in users_maint.html in KrisonAV CMS before 3.0.2 allows remote attackers to hijack the authentication of administrators for requests that create user accounts via a crafted request.",
"id": "GHSA-4f5x-9vpp-x3hw",
"modified": "2022-05-17T04:43:10Z",
"published": "2022-05-17T04:43:10Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2013-2713"
},
{
"type": "WEB",
"url": "https://www.htbridge.com/advisory/HTB23150"
},
{
"type": "WEB",
"url": "http://archives.neohapsis.com/archives/bugtraq/2013-04/0184.html"
},
{
"type": "WEB",
"url": "http://www.exploit-db.com/exploits/24965"
},
{
"type": "WEB",
"url": "http://www.krisonav.com/index.php?module=articles_show\u0026articles_id=release-notes"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/59273"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-4F6C-CJGM-C8QX
Vulnerability from github – Published: 2022-11-08 12:00 – Updated: 2022-11-09 19:02A vulnerability has been identified in SIMATIC Drive Controller family (All versions), SIMATIC ET 200S IM151-8 PN/DP CPU (All versions < V3.2.19), SIMATIC ET 200S IM151-8F PN/DP CPU (All versions < V3.2.19), SIMATIC ET 200pro IM154-8 PN/DP CPU (All versions < V3.2.19), SIMATIC ET 200pro IM154-8F PN/DP CPU (All versions < V3.2.19), SIMATIC ET 200pro IM154-8FX PN/DP CPU (All versions < V3.2.19), SIMATIC PC Station (All versions >= V2.1), SIMATIC S7-1200 CPU family (incl. SIPLUS variants) (All versions), SIMATIC S7-1500 CPU family (incl. related ET200 CPUs and SIPLUS variants) (All versions), SIMATIC S7-1500 Software Controller (All versions), SIMATIC S7-300 CPU 314C-2 PN/DP (All versions < V3.3.19), SIMATIC S7-300 CPU 315-2 PN/DP (All versions < V3.2.19), SIMATIC S7-300 CPU 315F-2 PN/DP (All versions < V3.2.19), SIMATIC S7-300 CPU 315T-3 PN/DP (All versions < V3.2.19), SIMATIC S7-300 CPU 317-2 PN/DP (All versions < V3.2.19), SIMATIC S7-300 CPU 317F-2 PN/DP (All versions < V3.2.19), SIMATIC S7-300 CPU 317T-3 PN/DP (All versions < V3.2.19), SIMATIC S7-300 CPU 317TF-3 PN/DP (All versions < V3.2.19), SIMATIC S7-300 CPU 319-3 PN/DP (All versions < V3.2.19), SIMATIC S7-300 CPU 319F-3 PN/DP (All versions < V3.2.19), SIMATIC S7-400 PN/DP V6 CPU family (incl. SIPLUS variants) (All versions), SIMATIC S7-400 PN/DP V7 CPU family (incl. SIPLUS variants) (All versions), SIMATIC S7-PLCSIM Advanced (All versions), SIMATIC WinCC Runtime Advanced (All versions), SINUMERIK ONE (All versions), SIPLUS ET 200S IM151-8 PN/DP CPU (All versions < V3.2.19), SIPLUS ET 200S IM151-8F PN/DP CPU (All versions < V3.2.19), SIPLUS S7-300 CPU 314C-2 PN/DP (All versions < V3.3.19), SIPLUS S7-300 CPU 315-2 PN/DP (All versions < V3.2.19), SIPLUS S7-300 CPU 315F-2 PN/DP (All versions < V3.2.19), SIPLUS S7-300 CPU 317-2 PN/DP (All versions < V3.2.19), SIPLUS S7-300 CPU 317F-2 PN/DP (All versions < V3.2.19). The login endpoint /FormLogin in affected web services does not apply proper origin checking. This could allow authenticated remote attackers to track the activities of other users via a login cross-site request forgery attack.
{
"affected": [],
"aliases": [
"CVE-2022-30694"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-11-08T11:15:00Z",
"severity": "LOW"
},
"details": "A vulnerability has been identified in SIMATIC Drive Controller family (All versions), SIMATIC ET 200S IM151-8 PN/DP CPU (All versions \u003c V3.2.19), SIMATIC ET 200S IM151-8F PN/DP CPU (All versions \u003c V3.2.19), SIMATIC ET 200pro IM154-8 PN/DP CPU (All versions \u003c V3.2.19), SIMATIC ET 200pro IM154-8F PN/DP CPU (All versions \u003c V3.2.19), SIMATIC ET 200pro IM154-8FX PN/DP CPU (All versions \u003c V3.2.19), SIMATIC PC Station (All versions \u003e= V2.1), SIMATIC S7-1200 CPU family (incl. SIPLUS variants) (All versions), SIMATIC S7-1500 CPU family (incl. related ET200 CPUs and SIPLUS variants) (All versions), SIMATIC S7-1500 Software Controller (All versions), SIMATIC S7-300 CPU 314C-2 PN/DP (All versions \u003c V3.3.19), SIMATIC S7-300 CPU 315-2 PN/DP (All versions \u003c V3.2.19), SIMATIC S7-300 CPU 315F-2 PN/DP (All versions \u003c V3.2.19), SIMATIC S7-300 CPU 315T-3 PN/DP (All versions \u003c V3.2.19), SIMATIC S7-300 CPU 317-2 PN/DP (All versions \u003c V3.2.19), SIMATIC S7-300 CPU 317F-2 PN/DP (All versions \u003c V3.2.19), SIMATIC S7-300 CPU 317T-3 PN/DP (All versions \u003c V3.2.19), SIMATIC S7-300 CPU 317TF-3 PN/DP (All versions \u003c V3.2.19), SIMATIC S7-300 CPU 319-3 PN/DP (All versions \u003c V3.2.19), SIMATIC S7-300 CPU 319F-3 PN/DP (All versions \u003c V3.2.19), SIMATIC S7-400 PN/DP V6 CPU family (incl. SIPLUS variants) (All versions), SIMATIC S7-400 PN/DP V7 CPU family (incl. SIPLUS variants) (All versions), SIMATIC S7-PLCSIM Advanced (All versions), SIMATIC WinCC Runtime Advanced (All versions), SINUMERIK ONE (All versions), SIPLUS ET 200S IM151-8 PN/DP CPU (All versions \u003c V3.2.19), SIPLUS ET 200S IM151-8F PN/DP CPU (All versions \u003c V3.2.19), SIPLUS S7-300 CPU 314C-2 PN/DP (All versions \u003c V3.3.19), SIPLUS S7-300 CPU 315-2 PN/DP (All versions \u003c V3.2.19), SIPLUS S7-300 CPU 315F-2 PN/DP (All versions \u003c V3.2.19), SIPLUS S7-300 CPU 317-2 PN/DP (All versions \u003c V3.2.19), SIPLUS S7-300 CPU 317F-2 PN/DP (All versions \u003c V3.2.19). The login endpoint /FormLogin in affected web services does not apply proper origin checking. This could allow authenticated remote attackers to track the activities of other users via a login cross-site request forgery attack.",
"id": "GHSA-4f6c-cjgm-c8qx",
"modified": "2022-11-09T19:02:24Z",
"published": "2022-11-08T12:00:18Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-30694"
},
{
"type": "WEB",
"url": "https://cert-portal.siemens.com/productcert/pdf/ssa-478960.pdf"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-4F6M-8F4H-C96R
Vulnerability from github – Published: 2022-01-14 00:02 – Updated: 2023-03-13 15:30Cross-Site Request Forgery (CSRF) vulnerability discovered in PHP Everywhere (WordPress plugin) versions (<= 2.0.2).
{
"affected": [],
"aliases": [
"CVE-2021-23227"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-01-13T21:15:00Z",
"severity": "HIGH"
},
"details": "Cross-Site Request Forgery (CSRF) vulnerability discovered in PHP Everywhere (WordPress plugin) versions (\u003c= 2.0.2).",
"id": "GHSA-4f6m-8f4h-c96r",
"modified": "2023-03-13T15:30:19Z",
"published": "2022-01-14T00:02:06Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-23227"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/vulnerability/php-everywhere/wordpress-php-everywhere-plugin-2-0-2-cross-site-request-forgery-csrf-vulnerability"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/vulnerability/php-everywhere/wordpress-php-everywhere-plugin-2-0-2-cross-site-request-forgery-csrf-vulnerability?_s_id=cve"
},
{
"type": "WEB",
"url": "https://wordpress.org/plugins/php-everywhere/#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-4F7V-WQ2F-4F9Q
Vulnerability from github – Published: 2022-05-24 19:04 – Updated: 2022-05-24 19:04Cross Site Request Forgery (CSRF) in Simple-Log v1.6 allows remote attackers to gain privilege and execute arbitrary code via the component "Simple-Log/admin/admin.php?act=act_edit_member".
{
"affected": [],
"aliases": [
"CVE-2020-18264"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-06-07T19:15:00Z",
"severity": "HIGH"
},
"details": "Cross Site Request Forgery (CSRF) in Simple-Log v1.6 allows remote attackers to gain privilege and execute arbitrary code via the component \"Simple-Log/admin/admin.php?act=act_edit_member\".",
"id": "GHSA-4f7v-wq2f-4f9q",
"modified": "2022-05-24T19:04:14Z",
"published": "2022-05-24T19:04:14Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-18264"
},
{
"type": "WEB",
"url": "https://github.com/github123abc123?tab=projects"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-4F83-JQP2-85PR
Vulnerability from github – Published: 2025-12-09 18:30 – Updated: 2026-01-20 15:32Cross-Site Request Forgery (CSRF) vulnerability in ThimPress WP Hotel Booking wp-hotel-booking allows Cross Site Request Forgery.This issue affects WP Hotel Booking: from n/a through <= 2.2.7.
{
"affected": [],
"aliases": [
"CVE-2025-63012"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-12-09T16:18:06Z",
"severity": "MODERATE"
},
"details": "Cross-Site Request Forgery (CSRF) vulnerability in ThimPress WP Hotel Booking wp-hotel-booking allows Cross Site Request Forgery.This issue affects WP Hotel Booking: from n/a through \u003c= 2.2.7.",
"id": "GHSA-4f83-jqp2-85pr",
"modified": "2026-01-20T15:32:03Z",
"published": "2025-12-09T18:30:38Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-63012"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/Wordpress/Plugin/wp-hotel-booking/vulnerability/wordpress-wp-hotel-booking-plugin-2-2-7-cross-site-request-forgery-csrf-vulnerability?_s_id=cve"
},
{
"type": "WEB",
"url": "https://vdp.patchstack.com/database/Wordpress/Plugin/wp-hotel-booking/vulnerability/wordpress-wp-hotel-booking-plugin-2-2-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:L/I:N/A:N",
"type": "CVSS_V3"
}
]
}
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.