Headline
CVE-2019-11025: When viewing poller cache, Device SNMP community is not properly escaped · Issue #2581 · Cacti/cacti
In clearFilter() in utilities.php in Cacti before 1.2.3, no escaping occurs before printing out the value of the SNMP community string (SNMP Options) in the View poller cache, leading to XSS.
Describe the bug
There’s no escape being done before printing out the value of SNMP community string
(SNMP Options) in the View poller cache
.
To Reproduce
Steps to reproduce the behavior:
Login as normal user ( should have device creation explicitly enabled ).
Select create a new device from the console menu.
Enter the below shared payload into the "
SNMP community string" field & save the device. Payload -
<script> alert(‘XSS’); document.location.replace(‘//google.com’);</script>`Now login as an
Admin
user & go to Utilities > System utils > View poller cache, XSS would be trigerred & redirected to google.com as specified in the payload. .
Expected behavior
Proper filtration & escaping needs to be done, before taking in the data from the user.
Screenshots
Desktop (please complete the following information):
- OS: Ubuntu 16.04
- Browser: Firefox
Smartphone (please complete the following information):
Additional context
Vulnerable snippet:
Line 1849 in utilities.php
__('Community:') . ' ' . $item['snmp_community']