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

XSS Vulnerability on closeText option of Dialog jQuery UI 1.11.4 #1622

Closed
wants to merge 44 commits into from

Conversation

1001binary
Copy link

I couldn't submit the bug to the website http://bugs.jqueryui.com/newticket.

VULNERABILITY DETAILS

A potential bug enables us to inject the XSS content into closeText option using component ui dialog. As original of jQuery UI(https://api.jqueryui.com/dialog/#option-closeText), we shall not accept any HTML string inside it.

VERSION

Any site using the latest version jQuery UI 1.11.4 .

REPRODUCTION CASE

  • Create a new HTML page.
  • Inject this content into new page.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>XSS in closeText option of component ui dialog</title>

    <script src="https://code.jquery.com/jquery-2.1.4.js"></script>
    <script src="https://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
    <link rel="stylesheet" type="text/css" href="http://code.jquery.com/ui/1.9.1/themes/base/
jquery-ui.css">
    <script>
        $(document).ready(function () {
            $('#dialog').dialog({ closeText: '<script>alert("XSS")<\/script>' });
        });
    </script>
</head>
<body>
    <div id="dialog" title="Dialog Title">Content here!</div>
</body>
</html>
  • A alert popup was shown.
  • Completed.

IN CONCLUSION

We expect that the html string isn't allowed in the closeText option as well as the popup alert not shown. If it displays, any attacker can take advantage of injecting the malicious XSS content into website.

Please see details at here http://jsfiddle.net/0wjdtcc6/

scottgonzalez and others added 30 commits November 3, 2014 17:59
Closes gh-1363
(cherry picked from commit 14c4eae)
(cherry picked from commit ae577ae)
Fixes #10684
(cherry picked from commit 809cc0f)

Conflicts:

	ui/selectmenu.js
Closes gh-1386
(cherry picked from commit 347b2a5)
Fixes #10703
Closes gh-1413
(cherry picked from commit ab798cb)
This reverts commit 7f808b2.

Fixes #8710
Ref gh-1071
(cherry picked from commit ebaaca7)
Ref #8710
Closes gh-1071
(cherry picked from commit 4de983c)
Fixes #10748
Closes gh-1417
(cherry picked from commit faefab8)
Fixes #10721
Closes gh-1398
(cherry picked from commit ae1d6d5)
Clarify that PHP is not required for testing, add a link to the
CONTRIBUTING page and tidy up.

Closes gh-1418
(cherry picked from commit 8cc636d)
(cherry picked from commit 337e411)
Fixes #10590
(cherry picked from commit 9493839)
Fixes #9604
Closes gh-1443
(cherry picked from commit 17c7f69)
Krinkle and others added 14 commits February 20, 2015 11:14
It's already in jQuery's Jenkins node-testswarm config
(and set to the same value) but not used yet.

Reference it to make sure it keeps working in the future.

Closes gh-1452
(cherry picked from commit 1e7a1e8)
This addresses a bug where users initialize empty sortable lists are
add items dynamically. In this situation refresh() should recognize the
position and orientation of the new items.

Fixes #7498
Closes gh-1381
(cherry picked from commit f656aeb)
Fixes #9264
Closes gh-1287
Closes gh-1459
(cherry picked from commit 4b017b4)
Custom handlers did not work as jquery objects (outside the resizable element)

Fixes #9658
Closes gh-1445
(cherry picked from commit 18e301f)
Closes gh-1447

Thanks Spencer Davis
(cherry picked from commit d95c23a)
When sorting tbody elements of a table the placeholder needs to have a tr with
td elements to be visible. The appended elements are created in the same way
as for the placeholder of a tr element; the first row of the sorted tbody is
used for that.

Fixes #10682
Closes gh-1380
(cherry picked from commit 962e05d)
The old success(), error() and complete() methods have been deprecated for a
while and have been removed in upstream master.

Closes gh-1455
(cherry picked from commit c1dfb98)
Fixes #8740
Closes gh-1053
Closes gh-1456
(cherry picked from commit c4e367b)
@jquerybot
Copy link

Thank you for your pull request. It looks like this may be your first contribution to a jQuery Foundation project, if so we need you to sign our Contributor License Agreement (CLA).

📝 Please visit http://contribute.jquery.org/CLA/ to sign.

After you signed, the PR is checked again automatically after a minute. If there's still an issue, please reply here to let us know.


If you've already signed our CLA, it's possible your git author information doesn't match your CLA signature (both your name and email have to match), for more information, check the status of your CLA check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.