Skip to content

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

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

Closed
SegfaultMasters opened this issue Mar 28, 2019 · 2 comments
Labels
bug Undesired behaviour resolved A fixed issue
Milestone

Comments

@SegfaultMasters
Copy link

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
Stored XSS in "SNMP community string" field
@cigamit
Copy link
Member

cigamit 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 added bug Undesired behaviour resolved A fixed issue labels Mar 28, 2019
@cigamit cigamit closed this as completed 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
Copy link

nluedtke commented Apr 9, 2019

This was assigned CVE-2019-11025.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

3 participants