Firebase Security Testing Tool - Comprehensive CLI for Firebase security assessment and penetration testing.
Firebomb is a powerful security testing tool designed to identify misconfigurations and vulnerabilities in Firebase applications. It automates the discovery, enumeration, and security testing of Firebase resources including Firestore, Realtime Database, Cloud Storage, Cloud Functions, and Authentication.
- π Automatic Discovery - Extract Firebase configurations from web applications, JavaScript bundles, or HAR files
- π Resource Enumeration - Discover and list all accessible Firebase resources
- π‘οΈ Security Testing - Comprehensive security tests for all Firebase services
- π Detailed Reporting - Generate JSON and HTML reports with remediation guidance
- πΎ Credential Caching - Automatically cache discovered configurations for quick access
- π― Targeted Testing - Test specific services (Firestore, Storage, Functions)
- π¨ Rich Terminal Output - Beautiful, colored terminal output for easy reading
- Public read/write access
- Missing authentication checks
- Sensitive data exposure
- Cross-user data access vulnerabilities
- Public database paths
- Wildcard permission issues
- Path traversal vulnerabilities
- Sensitive data in public paths
- Public bucket access (read/write)
- Exposed sensitive files
- Unauthorized file operations
- ACL misconfigurations
- Unauthenticated function access
- CORS misconfigurations
- Information disclosure
- Missing authentication checks
- Anonymous auth enabled
- Email verification requirements
- Password policy strength
- Provider security settings
- Python 3.11 or higher
- uv (recommended) or pip
# Clone the repository
git clone https://github.com/ModernPentest/firebomb.git
cd firebomb
# Install with uv
uv sync
# Run Firebomb
uv run firebomb --help# Clone the repository
git clone https://github.com/ModernPentest/firebomb.git
cd firebomb
# Install dependencies
pip install -e .
# Run Firebomb
firebomb --helpExtract Firebase configuration from a web application:
# From a URL
firebomb discover --url https://example.com --save
# From a JavaScript file
firebomb discover --file app-bundle.js --save
# From a HAR file (network traffic export)
firebomb discover --har network-capture.har --save
# Deep crawl with linked JS files
firebomb discover --url https://example.com --deep --saveThe --save flag automatically caches the discovered configuration for future use.
List all accessible Firebase resources:
# Using cached config
firebomb enum
# With explicit credentials
firebomb enum --project-id my-project --api-key AIza...
# Save results to JSON
firebomb enum --output enumeration.jsonPerform comprehensive security testing:
# Test everything
firebomb test
# Test specific services
firebomb test --firestore-only
firebomb test --storage-only
firebomb test --functions-only
# Generate detailed report
firebomb test --output report.html
firebomb test --output report.jsonExtract data from accessible resources:
# Query Firestore collection
firebomb query --collection users --limit 10
# Query Realtime Database path
firebomb query --path /users --output users.json
# Export to CSV
firebomb query --collection orders --format csv --output orders.csvCreate a test user for authenticated testing:
# Create email/password user
firebomb signup --email test@example.com --password Test123!
# Create anonymous user
firebomb signupUse the returned ID token for authenticated requests in other commands.
Discover Firebase configurations from web applications.
Options:
--url URL- Target web application URL--file FILE- JavaScript file to analyze--har FILE- HAR file from browser network capture--deep- Crawl linked JavaScript files--save- Save discovered config to cache
Example:
firebomb discover --url https://app.example.com --deep --saveEnumerate Firebase resources.
Options:
--project-id ID- Firebase project ID (optional if cached)--api-key KEY- Firebase API key (optional if cached)--output FILE- Save results to JSON file
Example:
firebomb enum --output results.jsonRun security tests on Firebase resources.
Options:
--project-id ID- Firebase project ID (optional if cached)--api-key KEY- Firebase API key (optional if cached)--firestore-only- Test only Firestore--storage-only- Test only Cloud Storage--functions-only- Test only Cloud Functions--output FILE- Generate report (JSON or HTML)
Example:
firebomb test --output report.htmlQuery Firestore collections or Realtime Database paths.
Options:
--collection NAME- Firestore collection name--path PATH- Realtime Database path--limit N- Maximum items to retrieve (default: 10)--output FILE- Save results to file--format FORMAT- Output format (json or csv)
Example:
firebomb query --collection users --limit 50 --output users.jsonCreate test user accounts for authenticated testing.
Options:
--email EMAIL- Email address for signup--password PASSWORD- Password for signup--project-id ID- Firebase project ID (optional if cached)--api-key KEY- Firebase API key (optional if cached)
Example:
firebomb signup --email test@example.com --password SecurePass123!Manage cached Firebase configurations.
Options:
--remove PROJECT_ID- Remove specific cached config--clear- Clear all cached configs
Example:
# List all cached configs
firebomb cached
# Remove specific config
firebomb cached --remove my-project
# Clear all
firebomb cached --clearGenerate comprehensive security reports.
Options:
--format FORMAT- Report format (html or json)--output FILE- Output file path (required)--project-id ID- Firebase project ID (optional if cached)--api-key KEY- Firebase API key (optional if cached)
Example:
firebomb report --format html --output security-report.htmlHere's a complete security assessment workflow:
# 1. Discover Firebase config from target application
firebomb discover --url https://target-app.com --deep --save
# 2. Enumerate all resources
firebomb enum --output enumeration.json
# 3. Run comprehensive security tests
firebomb test --output findings.json
# 4. Generate HTML report for stakeholders
firebomb report --format html --output security-assessment.html
# 5. Extract data from vulnerable collections
firebomb query --collection exposed-users --output leaked-data.json
# 6. Test with authenticated access
firebomb signup --email tester@example.com --password Test123!
firebomb test --output authenticated-findings.jsonFirebomb categorizes findings by severity:
- CRITICAL π΄ - Immediate action required (e.g., public write access)
- HIGH π - Significant security risk (e.g., public read access to sensitive data)
- MEDIUM π‘ - Moderate risk (e.g., anonymous auth enabled)
- LOW π΅ - Minor concern (e.g., weak password policy)
- INFO βͺ - Informational (e.g., configuration summary)
Each finding includes:
- Title - Brief description
- Description - Detailed explanation of the issue
- Affected Resource - Specific resource or path
- Recommendation - Step-by-step remediation guidance
- Evidence - Technical details and samples
- CWE/OWASP - Industry-standard vulnerability classifications
#1 [HIGH] Firestore Collection "users" Publicly Readable
Description:
The Firestore collection 'users' allows anonymous read access. Anyone with
the Firebase API key can read 150 documents from this collection without
authentication.
Affected Resource:
Firestore Collection: users
Recommendation:
Add security rules to restrict read access to authenticated users only:
match /databases/{database}/documents/users/{document} {
allow read: if request.auth != null;
}
CWE: CWE-284: Improper Access Control
OWASP: API1:2023 Broken Object Level Authorization
After running Firebomb, follow these best practices:
- Never use
allow read, write: if true;in production - Always require authentication:
if request.auth != null - Implement user-specific rules:
if request.auth.uid == resource.data.userId - Use field-level security rules
- Regularly audit security rules
- Avoid
.read: trueand.write: truerules - Use authentication checks:
"auth != null" - Implement user-based rules:
"auth.uid === $uid" - Structure data to minimize public paths
- Enable security rules logging
- Require authentication for all operations
- Validate file types and sizes
- Use user-specific paths:
/users/{userId}/files/{fileName} - Implement metadata-based access control
- Regularly review bucket ACLs
- Always validate authentication tokens
- Implement proper authorization checks
- Use Firebase Auth middleware
- Configure CORS appropriately
- Avoid exposing internal errors
- Disable anonymous auth unless required
- Require email verification
- Enforce strong password policies (12+ characters)
- Enable multi-factor authentication
- Monitor failed authentication attempts
Integrate Firebomb into your CI/CD pipeline:
# GitHub Actions example
name: Firebase Security Scan
on: [push, pull_request]
jobs:
security-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install Firebomb
run: |
git clone https://github.com/ModernPentest/firebomb.git
cd firebomb && uv sync
- name: Run security scan
run: |
cd firebomb
uv run firebomb test --project-id ${{ secrets.FIREBASE_PROJECT_ID }} \
--api-key ${{ secrets.FIREBASE_API_KEY }} \
--output report.json
- name: Upload report
uses: actions/upload-artifact@v3
with:
name: security-report
path: firebomb/report.jsonRun firebomb discover first to extract and cache Firebase configuration, or provide --project-id and --api-key explicitly.
The discovered API key or project ID may be invalid. Verify the configuration is correct.
This is expected for properly secured resources. Firebomb will still test common patterns and report findings.
Install required dependencies:
uv sync # with uv
# or
pip install -e . # with pipContributions are welcome! Please feel free to submit a Pull Request.
# Clone the repository
git clone https://github.com/ModernPentest/firebomb.git
cd firebomb
# Install development dependencies
uv sync
# Run tests
uv run pytest
# Format code
uv run black src/
uv run ruff check src/IMPORTANT: Firebomb is intended for security testing and research purposes only.
- β Authorized Testing: Use on Firebase projects you own or have explicit permission to test
- β Security Research: Responsible disclosure of vulnerabilities
- β Educational: Learning about Firebase security
- β Unauthorized Access: Never test systems without permission
- β Malicious Use: Any harmful or illegal activities
Users are responsible for complying with all applicable laws and regulations. The authors assume no liability for misuse of this tool.
MIT License - see LICENSE file for details.
Developed by VΓctor Yrazusta as part of ModernPentest.
Inspired by the need for comprehensive Firebase security testing tools and built with insights from:
- Firebase Security Documentation
- OWASP API Security Top 10
- Real-world Firebase security incidents
- Firebase Security Rules Documentation
- OWASP API Security Project
- CWE Database
- Firebase Security Best Practices
- π Report Issues
- π¬ Discussions
- π§ Contact: victor@modernpentest.com
Happy (Ethical) Hacking! π₯