Just to be clear, I'm not a security expert in any way, just learned myself while building things.
So here is what I'd refer to:
https://stackoverflow.com/questions/44133536/is-it-safe-to-s...
Regarding the Firebase, I see an open issue on this, so I guess we are not the only ones wondering :)