Cross-site Scripting (XSS) - DOM in emoncms/emoncms
Reported on
Dec 6th 2021
Description
EmonCMS 10.9.19 has a DOM-XSS vulnerability that is executed when javascript code is injected as imported data.
Proof of Concept
1 - login into the app and browse to the section Feeds > Import Data
2 - add <script>alert(1)</script>,a
or 1638807909,<script>alert(2)</script>
in the CSV area. Then click on one of the empty field (e.g. tag
or name
).
3 - The javascript code will be executed.
Impact
This vulnerability is capable of executing arbitrary javascript code within the user session.
Occurrences
importer.js L40
The time
value inserted by the user is inserted in the page unsanitized via html()
$("#import-alert").html("<b>Error:</b> invalid time: "+time).show();
importer.js L47
The value
value inserted by the user is inserted in the page unsanitized via html()
$("#import-alert").html("<b>Error:</b> invalid value: "+value).show();
Hi Trystan is it ok for you if huntr starts the process to request a CVE related to this vulnerability? Thanks