- Firebase will reflect any payloads sent to it
- We are talking about DOM based XSS
- The current browsers XSS protection does not protect against DOM based XSS
- It is very easy to create a vulnerability (as you will see below, all it takes is a simple change from .text() to .html())
- If powerful DOM based API-manipulation frameworks are used (like jQuery), there are many more injection points (sinks)
- By nature of Firebase applications, the XSS exploit will have wormable capabilities (i.e. it will be able to distribute and self-propagate itself VERY quickly)
- Current static-analysis tools will struggle to pick up this type of vulns
Note: I think (and I will want to double check this) that if is safe (i.e OK) to put received Firebase data/payloads, on an AngularJS auto-binded location/variable (for example {{name}} : {{message}} )
Let's use the chat application provided by Firebase to see this in action (note that as you will see below, the chat application as provided by Firebase, is secure and not exploitable)