Skip to content

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><htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>XSS in closeText option of component ui dialog</title><scriptsrc="https://code.jquery.com/jquery-2.1.4.js"></script><scriptsrc="https://code.jquery.com/ui/1.11.4/jquery-ui.js"></script><linkrel="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><divid="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/

scottgonzalezand others added 30 commits November 3, 2014 17:59
Closesgh-1363 (cherry picked from commit 14c4eae)
(cherry picked from commit ae577ae)
Fixes #10684 (cherry picked from commit 809cc0f) Conflicts: ui/selectmenu.js
Closesgh-1386 (cherry picked from commit 347b2a5)
Fixes #10703 Closesgh-1413 (cherry picked from commit ab798cb)
This reverts commit 7f808b2. Fixes #8710 Ref gh-1071 (cherry picked from commit ebaaca7)
Ref #8710 Closesgh-1071 (cherry picked from commit 4de983c)
Fixes #10748 Closesgh-1417 (cherry picked from commit faefab8)
Fixes #10721 Closesgh-1398 (cherry picked from commit ae1d6d5)
Clarify that PHP is not required for testing, add a link to the CONTRIBUTING page and tidy up. Closesgh-1418 (cherry picked from commit 8cc636d)
(cherry picked from commit 337e411)
Fixes #10590 (cherry picked from commit 9493839)
Fixes #9604 Closesgh-1443 (cherry picked from commit 17c7f69)
Krinkleand 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. Closesgh-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 Closesgh-1381 (cherry picked from commit f656aeb)
Fixes #9264 Closesgh-1287Closesgh-1459 (cherry picked from commit 4b017b4)
Custom handlers did not work as jquery objects (outside the resizable element) Fixes #9658 Closesgh-1445 (cherry picked from commit 18e301f)
Closesgh-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 Closesgh-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. Closesgh-1455 (cherry picked from commit c1dfb98)
Fixes #8740 Closesgh-1053Closesgh-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 freeto 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.

19 participants

@1001binary@jquerybot@scottgonzalez@eshcharc@bperel@tjvantoll@agcolom@thg2k@meyertee@SlimFoster@lukeapage@jzaefferer@dekajp@mikesherov@marcuswarrenca@Krinkle@patrixd@benmosher@atomiomi