You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
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']
The text was updated successfully, but these errors were encountered:
netniV
changed the title
Stored XSS in "SNMP community string" field
When viewing poller cache, Device SNMP community is not properly escaped
Mar 30, 2019
Describe the bug
There's no escape being done before printing out the value of
SNMP community string
(SNMP Options) in theView 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):
Smartphone (please complete the following information):
Additional context
Vulnerable snippet:
Line 1849 in utilities.php
__('Community:') . ' ' . $item['snmp_community']
The text was updated successfully, but these errors were encountered: