If a user's real name field happens to contain XSS, the user autocomplete UI will happily execute it, as it does no escaping of any potential valid HTML. http://yuilibrary.com/forum/viewtopic.php?p=12923 talks about the problem somewhat.
WTF YUI! Man. Autocomplete doesn't exist in 3.6.x, so it's not affected. But this should block 4.0 if you can get a patch to me ASAP.
Note that bmo is affected by this, even though it's running 3.6.x. I backported the user autocomplete stuff.
I filed http://yuilibrary.com/projects/yui2/ticket/2529228 upstream about this.
Summary: [SECURITY] XSS via real_name field in user autocomplete → [SECURITY] XSS in user autocomplete due to lack of encoding by YUI
Isn't there some built-in HTML escaper in YUI? What happens when YUI fixes this bug upstream, as they appear to intend to do?
(In reply to comment #5) > Isn't there some built-in HTML escaper in YUI? Not that I can see from poking around. > What happens when YUI fixes this bug upstream, as they appear to intend to do? We override the formatter anyway, so we'd still be vulnerable. I'll just modify our code to use their util function or whatever they offer.
CC'ing pyrzak as he knows YUI pretty well.
Whiteboard: [infrasec:xss][ws:high] → [infrasec:xss][ws:critical]
Comment on attachment 498073 [details] [diff] [review] patch - v1 This looks good and works for me until the proper upstream fix is implemented. r=dkl
Attachment #498073 - Flags: review+
Does /regex/g work in IE?
(In reply to comment #10) > Does /regex/g work in IE? code-error.html.tmpl uses it, so I guess so, yes.
(In reply to comment #10) > Does /regex/g work in IE? Yes, since IE 4, I believe.
This patch does what reed wants it to do, which is escape incoming HTML, however, i'm not an XXS attack expert and I feel uncomfortable saying that this solution will stop all possible XXS attacks. But the attached patch (patch - v1), does escape incoming text that he lists in his code. Not sure if this is helpful or not. Basically the code looks good, my knowledge of the numerous ways to do a XXS attack are to limited to know if this patch is enough to stop the behavior in question.
Comment on attachment 498073 [details] [diff] [review] patch - v1 This does look correct and it's the same as what YUI does, so at the least we will be just as secure as the DataTable text formatter.
Attachment #498073 - Flags: review?(mkanat) → review+
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/ modified js/field.js Committed revision 7671. Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/4.0/ modified js/field.js Committed revision 7528.
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Security advisory sent. Removing the security flag.
You need to log in before you can comment on or make changes to this bug.