Back to blog
Firebasetechnicalvulnerabilities

Firebase Firestore: why 'allow read, write: if request.auth != null' is not security

Published on 2026-03-256 min readFlorian

The false sense of security

The rule allow read, write: if request.auth != null is the most common Firestore configuration. It seems secure. In reality, it allows ANY authenticated user to read and modify ALL other users' data.

The fix

Replace with: allow read, write: if request.auth.uid == resource.data.userId

What we find

70% of Firebase applications we audit use this basic rule.

Related articles

Three adjacent analyses to keep exploring the same attack surface.

Sources

Written by Florian
Reviewed on 2026-03-25

Editorial analysis based on official vendor, project, and regulator documentation.

Related services

If this topic maps to a real risk in your stack, these are the most relevant CleanIssue audits.

Need an external review of your HR SaaS?

Share your product, stack, and client context. We will come back with the right review scope.

Discuss your audit