gamonoid / icehrm

Manage your employees easily with a robust and efficient Human Resource Management System
http://icehrm.com
Other
593 stars 374 forks source link

Security Report : Cross-Site Scripting (Dom) #294

Closed P0cas closed 1 year ago

P0cas commented 2 years ago

Description

<script type="text/javascript">
  var key = "";
  <?php if (isset($_REQUEST['key'])) {?>
  key = '<?=$_REQUEST['key']?>';
  key = key.replace(/ /g,"+");
  <?php }?>
</script>
<!-- https://github.com/gamonoid/icehrm/blob/master/core/login.php#L213L219 -->

We(@Inweol)discovered the Dom-Based XSS. XSS occur because the server doesn't escape single quote.


PoC

스크린샷 2022-03-01 11 42 04
Poc : https://icehrm.com/app/<any nickname>/login.php?logout=1&key=pocas%27-alert(document.domain)//

If you go to the as above poc, you can check to occur the xss.

P0cas commented 1 year ago

Fixied (d7ff54d)