diff --git a/java/ql/src/Security/CWE/CWE-352/SpringCSRFProtection.qhelp b/java/ql/src/Security/CWE/CWE-352/SpringCSRFProtection.qhelp index cae2ae4b7d2..98a7a1852a0 100644 --- a/java/ql/src/Security/CWE/CWE-352/SpringCSRFProtection.qhelp +++ b/java/ql/src/Security/CWE/CWE-352/SpringCSRFProtection.qhelp @@ -2,30 +2,29 @@ -

When a web server is designed to receive a request from a client without any mechanism -for verifying that it was intentionally sent, then it might be possible for an attacker -to trick a client into making an unintentional request to the web server which will be treated -as an authentic request. This can be done via a URL, image load, XMLHttpRequest, etc. and can +

When you set up a web server to receive a request from a client without any mechanism +for verifying that it was intentionally sent, then it is vulnerable to attack. An attacker can +trick a client into making an unintended request to the web server that will be treated as +an authentic request. This can be done via a URL, image load, XMLHttpRequest, etc. and can result in exposure of data or unintended code execution.

-

Cross-Site Request Forgery (CSRF) protection is enabled by default in Spring with Java -configuration. It's recommended to not disable this.

+

Cross-Site Request Forgery (CSRF) protection is enabled by default. Spring's recommendation +is to use CSRF protection for any request that could be processed by a browser client by normal +users.

-

The following example shows the Spring Java configuration with CSRF protection disabled.

+

The following example shows the Spring Java configuration with CSRF protection disabled. +This type of configuration should only be used if you are creating a service that is used only +by non-browser clients.

  • -CWE: -CWE-352: Cross-Site Request Forgery (CSRF). -
  • -
  • OWASP: Cross-Site Request Forgery (CSRF).
  • diff --git a/java/ql/src/Security/CWE/CWE-352/SpringCSRFProtection.ql b/java/ql/src/Security/CWE/CWE-352/SpringCSRFProtection.ql index 9529aa9aabf..ecb536153a1 100644 --- a/java/ql/src/Security/CWE/CWE-352/SpringCSRFProtection.ql +++ b/java/ql/src/Security/CWE/CWE-352/SpringCSRFProtection.ql @@ -1,7 +1,7 @@ /** * @name Disabled Spring CSRF protection * @description Disabling CSRF protection makes the application vulnerable to - * Cross-Site Request Forgery (CSRF) attack. + * a Cross-Site Request Forgery (CSRF) attack. * @kind problem * @problem.severity error * @precision high