Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When viewing poller cache, Device SNMP community is not properly escaped #2581

Closed
SegfaultMasters opened this issue Mar 28, 2019 · 2 comments

Comments

Projects
None yet
3 participants
@SegfaultMasters
Copy link

commented Mar 28, 2019

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:

  1. Login as normal user ( should have device creation explicitly enabled ).

  2. Select create a new device from the console menu.

  3. Enter the below shared payload into the "SNMP community string" field & save the device. Payload - <script> alert('XSS'); document.location.replace('//google.com');</script>`

  4. 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
Screenshot_6

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']

cigamit added a commit that referenced this issue Mar 28, 2019

Resolving Issue #2581
Stored XSS in "SNMP community string" field
@cigamit

This comment has been minimized.

Copy link
Member

commented Mar 28, 2019

Thanks for tracking this down. Should be resolved now. Found a few more in a quick code sweep of the file. They were resolved as well.

@cigamit cigamit added this to the v1.2.3 milestone Mar 28, 2019

@cigamit cigamit closed this Mar 28, 2019

@netniV 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

@nluedtke

This comment has been minimized.

Copy link

commented Apr 9, 2019

This was assigned CVE-2019-11025.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.