New issue
Advanced search Search tips

Issue 888479 link

Starred by 3 users

Issue metadata

Status: Duplicate
Merged: issue 142189
Owner:
Closed: Oct 2
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

XSSAuditor bypass assigning to innerHTML

Reported by qusai.al...@gmail.com, Sep 24

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36

Steps to reproduce the problem:
1. create simple HTML file which upload txt file which include XSS vulnerability payload.
2. The payload is " --><!-- ---> <img src=xxx:x onerror=javascript:alert(/xss/)> --> "
3. 

What is the expected behavior?
I expect the Chrome will block such request, but it allow the XSS to load. 

What went wrong?
XSS pop up appear 

Did this work before? No 

Chrome version: 68.0.3440.106  Channel: n/a
OS Version: 10.0
Flash Version: 

this should be audited by chrome and block such files, or script.
 
test.html
1.8 KB View Download
payloads - Copy.txt
72 bytes View Download
chrome_xss.png
10.3 KB View Download
Components: -Blink Blink>SecurityFeature>XSSAuditor
Tested with Chrome 69 and it works as well.
chrome_xss_69.png
26.0 KB View Download
Labels: Needs-Milestone
Hi Vamshi, What do you mean by Needs-Milestone.
Any update on this please ?
Cc: ajha@chromium.org
Labels: Target-71 M-71 FoundIn-71 OS-Linux OS-Mac
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on the latest canary 71.0.3561.0 and stable 69.0.3497.100 on Windows-10,Mac OS 10.13.6 and Linux Debian Rodete. Same behavior is observed on older M-60(60.0.3112.20) as well. Marking this as Untriaged and requesting someone from the respective team for their  inputs.

Note: Seeing the xss pop up shown on other browsers Edge,Firefox as well.

Comment 7 by d...@fb.com, Sep 27

I think this is by design, per the comment that we do not XSS filter innerHTML. That's the first time XSSAuditor would encounter this content.

https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/html/parser/html_document_parser.cc?sq=package:chromium&g=0&l=658


hi, i read the link you sent, but what I think this is when upload a document which include xss payload, pop up appears specifically the one in the file which I sent, if the innerHTML has different XSS vector which is doesnt work with this, but this works.
Any update on this ?
Owner: tsepez@chromium.org
Tom, can you triage this?
Hi Tom, I know you are busy, and sorry for keep on asking about an update ,
Hi, not busy, just out unexpectedly for a few days ... catching up.
Summary: XSS bypass assigning to innerHTML (was: XSS on Chrome)
Summary: XSSAuditor bypass assigning to innerHTML (was: XSS bypass assigning to innerHTML)
This is a DOM-based XSS, since you are computing a string in JS, and not a reflected XSS.  XSS auditor is only effective against reflective XSS, so the payload must be part of the URL or the POST body.  Additionally, we don't apply the filter to "document fragments" eg. innerHTML for performance reasons, though we've thought about doing so in the past.
Mergedinto: 142189
Status: Duplicate (was: Untriaged)
OTOH, x.innerHTML="<script>alert()</script>" doesn't execute, so I'm left wondering if there was some other work apart from XSSAuditor to deal with active assigment to innerHTML.
OTOOH, x.innerHTML="<img src=xxx:x onerror=javascript:alert(/xss/)>" does execute, even without the leading punctuation.
Thanks Tom for your replies , really appreciated, but why you tagged it as duplicate ?!!! 


Because folks have been reporting innerHTML assignments as XSSAuditor bypasses since 2012.
Thanks Tom for clarification. So you accept as bug only the reflected XSS
Can I report reflected xss here , or as new bug ! 
File a new bug for a reflected XSS, if you've found one (the example in the original description is not a reflected XSS, as I've pointed out).  You've got a different example, right?
Yes different one 

Sign in to add a comment