Bug 535855 - VertX - CSRF Protection Bypass
Summary: VertX - CSRF Protection Bypass
Status: NEW
Alias: None
Product: Vertx
Classification: RT
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 normal
Target Milestone: Unknown   Edit
Assignee: Security vulnerabilitied reported against Eclipse projects CLA
QA Contact:
URL: https://github.com/vert-x3/vertx-web/...
Whiteboard:
Keywords: security
Depends on:
Blocks:
 
Reported: 2018-06-13 06:49 EDT by Bernard Wagner CLA
Modified: 2018-06-13 07:24 EDT (History)
2 users (show)

See Also:


Attachments
PoC Maven Project with README.md (120.36 KB, application/zip)
2018-06-13 06:49 EDT, Bernard Wagner CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernard Wagner CLA 2018-06-13 06:49:32 EDT
Created attachment 274454 [details]
PoC Maven Project with README.md

The CSRF Handler (io.vertx.ext.web.handler.impl.CSRFHandlerImpl) in Vert.x Web does not create CSRF Tokens that are unique per user session. A malicious website can still perform CSRF by obtaining a valid token and adding it to a HTML form and then submitting the form to the vulnerable web application.

The CSRF tokens do not have all the characteristics required for CSRF protection as summarised by OWASP:
https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)_Prevention_Cheat_Sheet#Synchronizer_.28CSRF.29_Tokens

SHA256(vertx-xsrf.zip)= 96c774d75a3a1d8ae8acf6e0d8079a24dd4f0b41deb1a18b733e32cb3f47a380

The PoC attached starts two HTTP web services. The attacker web server will automatically poll the http://target.local:8888/token webpage for a valid XSRF token. If a user then navigates to the http://localhost:7777 in their browser it will render an HTML page with an iframe. The iframe will be populated with a form with a valid X-XSRF-TOKEN form attribute that is automatically submitted to http://target.local:8888/token.