Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
CSRF attack on default liferay search portlet/site?
Hello everybody,
we had a security scan on our liferay system (7.1.2) and the result was that on all default liferay 'search' related portlets and sites is Cross-Site Request Forgery possible.
In our properties we have 'auth.token.check.enabled=true' and nothing search related in our auth.token.ignore.actions or auth.token.ignore.portlets property.
Why there is no CSRF attack prevention on liferay-search? Is there any way to turn it on for liferay-search portlets/sites?
thank you in advance
we had a security scan on our liferay system (7.1.2) and the result was that on all default liferay 'search' related portlets and sites is Cross-Site Request Forgery possible.
In our properties we have 'auth.token.check.enabled=true' and nothing search related in our auth.token.ignore.actions or auth.token.ignore.portlets property.
Why there is no CSRF attack prevention on liferay-search? Is there any way to turn it on for liferay-search portlets/sites?
thank you in advance
Please tell us which Liferay version you are using.
Also, it usually helps if there are more details, e.g. which actions where flagged exactly by your test?
Also, it usually helps if there are more details, e.g. which actions where flagged exactly by your test?
Hey Christoph,
Thank you for your answer.
We are using Liferay 7.1.2.
The security scan discovered that all parameters within the form were known or predictable and therefore the form could be vulnerable to CSRF.
Thank you for your answer.
We are using Liferay 7.1.2.
The security scan discovered that all parameters within the form were known or predictable and therefore the form could be vulnerable to CSRF.
Yes, but which one? The normal search portlet?
I am not sure, how this should be a security problem. It might be, but it isn't clear to me so far if it is indeed one.
CSRF Tokens should protect forms that update data. An attacker might craft a url and when you click it as an admin, it can do something evil. e.g. it could create a user, add permissions or something like that. So, addUser, updatePermissions, ... always should be protected using CSRF tokens.
But for actions, that can't do anything bad, a CSRF token is not necessary. e.g. a call to getCountries always returns the same results and it really doesn't matter if I trick an admin into executing it.
So, it is important to know, which calls are susceptible in your opinion. The search calls?
I am not sure, how this should be a security problem. It might be, but it isn't clear to me so far if it is indeed one.
CSRF Tokens should protect forms that update data. An attacker might craft a url and when you click it as an admin, it can do something evil. e.g. it could create a user, add permissions or something like that. So, addUser, updatePermissions, ... always should be protected using CSRF tokens.
But for actions, that can't do anything bad, a CSRF token is not necessary. e.g. a call to getCountries always returns the same results and it really doesn't matter if I trick an admin into executing it.
So, it is important to know, which calls are susceptible in your opinion. The search calls?
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™