Skip to content

Commit 6014daf

Browse files
authored
Merge pull request #8164 from kenjis/docs-warning-cookie-csrf
docs: add warning about Cookie based CSRF protection
2 parents 56ed444 + 1b0d777 commit 6014daf

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

user_guide_src/source/libraries/security.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ Config for CSRF
7171
CSRF Protection Methods
7272
-----------------------
7373

74+
.. warning:: If you use :doc:`Session <./sessions>`, be sure to use Session based
75+
CSRF protection. Cookie based CSRF protection will not prevent Same-site attacks.
76+
See
77+
`GHSA-5hm8-vh6r-2cjq <https://github.com/codeigniter4/shield/security/advisories/GHSA-5hm8-vh6r-2cjq>`_
78+
for details.
79+
7480
By default, the Cookie based CSRF Protection is used. It is
7581
`Double Submit Cookie <https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html#double-submit-cookie>`_
7682
on OWASP Cross-Site Request Forgery Prevention Cheat Sheet.

0 commit comments

Comments
 (0)