Reflected XSS in /library/custom_template/share_template.php in openemr/openemr
Reported on
Mar 30th 2023
Description
There exist a reflected XSS in /library/custom_template/share_template.php in the 'list_id' parameter.
Proof of Concept
http://openemr.local/library/custom_template/share_template.php?list_id=1}});}}alert(1);function%20x(){if(1){a=({a:{a:1
fix
properly sanitize the list_id parameter.
Impact
An XSS can be leveraged to take over arbitrary accounts or make actions on behalf of other users.
Occurrences
This is fixed is in master branch at https://github.com/openemr/openemr/commit/af1ecf78d1342519791bda9d3079e88f7d859015
@tsarsecurity, I am unable to mark this as fixed, since that requires hard-setting a publish date, which I am unable to safely predict. We plan to release OpenEMR 7.0.1 in about 1-3 weeks, which will include this fix. At that time (after release OpenEMR 7.0.1), we will then mark this issue as fixed (and publish at that time with a cve).
thanks for the report @tsarsecurity !