This vulnerability was reported to the maintainers on Nov 23rd, 2021, and there has been no response yet. So, I infer it makes sense to publish it publicly here for the good sake of everyone who is using this software actively.
Description
An Authenticated user can set thier 'first name' to any unsanitized HTML or script.
IceHRM website fails to effectively filter html tags present in user input. This can cause malicious input sent by a logged in user to be stored on the database. This can lead to account takeover through cookie stealing of any other user who logs into the system, no other user interation is require.
Send the following payload, meant for updating the 'first name' of the logged in user. You'll have to replace the PHPSESSID , with the session ID of any valid logged in (less privileged) user .
3. Login into the 'admin' account & Go to the following page where the name of the less privileged user gets displayed - 'System > Users' . You'll be able to see the alert box with session cookie of 'admin' user.
The extra added content = HTML request parameter causes the backend to ignore sanitization of user input.
Impact
A less privileged user can take over 'admin' account by stealing the session cookie.
Important note :
This vulnerability was reported to the maintainers on Nov 23rd, 2021, and there has been no response yet. So, I infer it makes sense to publish it publicly here for the good sake of everyone who is using this software actively.
Description
An Authenticated user can set thier 'first name' to any unsanitized HTML or script.
IceHRM website fails to effectively filter html tags present in user input. This can cause malicious input sent by a logged in user to be stored on the database. This can lead to account takeover through cookie stealing of any other user who logs into the system, no other user interation is require.
Proof of Concept
PoC Video : http://moochi.tech/jhhds34334sdsjjjsdaa/icehrm.mp4
Login as any user into the dashboard.
Send the following payload, meant for updating the 'first name' of the logged in user. You'll have to replace the
PHPSESSID
, with the session ID of any valid logged in (less privileged) user .3. Login into the 'admin' account & Go to the following page where the name of the less privileged user gets displayed - 'System > Users' . You'll be able to see the alert box with session cookie of 'admin' user.
The extra added
content = HTML
request parameter causes the backend to ignore sanitization of user input.Impact
A less privileged user can take over 'admin' account by stealing the session cookie.
Occurrences
https://github.com/gamonoid/icehrm/blob/master/core/include.common.php#L27 User input sanitization is not done if the 'content' parameter is set to 'HTML'