3 ms·
I want know how the exploit works. The Flash app has to write a custom header. How does it know the value to put in the header, unless it's always the same for
by euroclydon 16y ago
I want know how the exploit works. The Flash app has to write a custom header. How does it know the value to put in the header, unless it's always the same for all sessions across all users.
P.S. You cache POST/PUT/DELETES?
- nbpoole 16y agoThat's the point of the fix: X-CSRF-Token requires the CSRF token, which is per-user, as its value. X-Requested-With, the old way of doing things, just had to be present in the request.
- SoftwareMaven 16y agoThe exploit SWF just puts in that it is an Ajax call: X-Requested-With: XMLHttpRequest which says "I'm an AJAX request". Since the value is static, it is easy to use in an exploit.
- jbri 16y agoIf you cache the page from which a user submits a POST/PUT/DELETE, how are they going to get their CSRF token?
- cheald 16y agoThat's the point of the fix. The header is custom per user now. Before, the presence of the "X-Requested-With: XmlHttpRequest" header was enough to let Rails assume the request was legit. Since Flash doesn't respect the victim's crossdomain.xml, this is no longer a valid assumption, and you have to use a unique header per session. This means writing this unique value out into the page somewhere, to be included with any AJAX requests, which means that you cannot cache these pages as you might before, since AJAX calls would fail for everyone except the person who populated the cache.