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 attempting to exploit Cacti using alert, unexpected errors can be seen #3434

Closed
YongBoLiu opened this issue Apr 8, 2020 · 2 comments
Closed
Labels
bug Undesired behaviour confirmed Bug is confirm by dev team resolved A fixed issue
Milestone

Comments

@YongBoLiu
Copy link
Contributor

Describe the bug

A clear and concise description of what the bug is.
Input the string <script>alert('test CVE');</script> into search filter of Console->Site, Console->Data Queries page. Click the Go button. The main table of screen become blank. And get the JS errors below,

Uncaught Error: Syntax error, unrecognized expression: a[href^='data_queries.php?header=false&filter=<script>alert('test CVE');</script>&rows=-1']
at Function.Sizzle.error (VM2293 jquery.js:1541)
at Sizzle.tokenize (VM2293 jquery.js:2193)
at Function.Sizzle [as find] (VM2293 jquery.js:815)
at jQuery.fn.init.find (VM2293 jquery.js:2873)
at Object. (layout.js?ea97ab27c1fd2763359bda63736742d9:1980)
at fire (VM2293 jquery.js:3268)
at Object.fireWith [as resolveWith] (VM2293 jquery.js:3398)
at done (VM2293 jquery.js:9305)
at XMLHttpRequest. (VM2293 jquery.js:9548)

To Reproduce

Steps to reproduce the behavior:

  1. Go to Console->Data Queries page. Input the string <script>alert('test CVE');</script> into search filter.

  2. Click the Go button

  3. Check the screen.

  4. See console of Firefox , see the JS error

Expected behavior

A clear and concise description of what you expected to happen.
No blank screen, and no JS errors.

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information)

  • OS: [e.g. iOS]

  • Browser [e.g. chrome, safari]

  • Version [e.g. 22]

Smartphone (please complete the following information)

  • Device: [e.g. iPhone6]

  • OS: [e.g. iOS8.1]

  • Browser [e.g. stock browser, safari]
    Firefox68.6 64bit

  • Version [e.g. 22]

Additional context

Add any other context about the problem here.
It's happens in cacti 1.2.10

@YongBoLiu YongBoLiu added bug Undesired behaviour unverified Some days we don't have a clue labels Apr 8, 2020
@TheWitness TheWitness added confirmed Bug is confirm by dev team and removed unverified Some days we don't have a clue labels Apr 9, 2020
@TheWitness TheWitness changed the title JS errors after input some cve test string in the search filter of Console->Site, Console->Data Queries and etc. JavaScript errors experienced when attempting to exploit Cacti Apr 10, 2020
TheWitness added a commit that referenced this issue Apr 10, 2020
JavaScript errors experienced when attempting to exploit Cacti
@TheWitness TheWitness added the resolved A fixed issue label Apr 10, 2020
@TheWitness TheWitness added this to the 1.2.12 milestone Apr 10, 2020
@TheWitness
Copy link
Member

@YongBoLiu, I decided to take a slightly different approach.

@YongBoLiu
Copy link
Contributor Author

@TheWitness , it's better. And I think the cause is, the char ' is used in the code a[href^=' . So, just the "'": '&#39;', is also ok.

@netniV netniV changed the title JavaScript errors experienced when attempting to exploit Cacti When attempting to exploit Cacti using alert, unexpected errors can be seen May 3, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Aug 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour confirmed Bug is confirm by dev team resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

2 participants