i-librarian
i-librarian copied to clipboard
Stored XSS in notes.php
Summary
The parameter $notes is not sanitized after querying from database, so attackers can create a stored XSS attack.
How to reproduce
curl http://<domain.tld>/notes.php --data 'file=1¬es=<script>alert(1)</script>' --cookie 'PHPSESSID=<session_id>'- in your browser, access
http://<domain.tld>/notes.php?file=1while logged in
Detail
The bug exists since $notes was assigned to result of database query without sanitizing
https://github.com/mkucej/i-librarian/blob/master/notes.php#L27
https://github.com/mkucej/i-librarian/blob/master/notes.php#L53
Can anyone please review this bug? This is a quite critical vulnerability.
Thanks, it will be fixed in I, Librarian 5.