- by x32x01 ||
Cross-Tenant Vulnerability Explained (Critical SaaS Risk) 🚨☁️
Modern SaaS platforms are usually multi-tenant.That means many customers share the same infrastructure…
but their data must stay isolated 🔒
A Cross-Tenant Vulnerability happens when one tenant can view, modify, or affect another tenant’s data.
This is considered a high to critical severity security flaw ⚠️
What Is a Tenant? 🧩
A tenant is an organization or user group that has its own:- Users
- Data
- Configurations
- Permissions
Example:
- Tenant A → Company Alpha
- Tenant B → Company Beta
How Cross-Tenant Vulnerabilities Happen 💥
Most cross-tenant bugs are caused by logic mistakes, not advanced exploits.Broken Access Control 🔓
The backend trusts user input instead of enforcing tenant isolation.Example API Request
Code:
GET /api/users?tenant_id=123 Code:
GET /api/users?tenant_id=124 IDOR (Insecure Direct Object Reference) 🧨
The application exposes internal object IDs without tenant checks.Example
Code:
GET /api/invoices/98765 You’ve got a critical data isolation failure.
Missing Tenant Validation 🧠❌
The backend:- Accepts tenantId from the client
- Does not verify ownership server-side
Bad Practice
Code:
{
"userId": "123",
"tenantId": "tenant_B"
} JWT or Token Misconfiguration 🎟️⚠️
Tokens are missing critical claims like:- tenant_id
- organization_id
- Proper scope validation
Weak Token Example
Code:
{
"sub": "user123",
"role": "admin"
} Shared Admin APIs 🚫
Admin endpoints that:- Are shared across tenants
- Lack tenant-based authorization
- Allow cross-organization access
Real-World Bug Bounty Scenario 🧪🎯
1️⃣ Login as Tenant A2️⃣ Intercept an API request
3️⃣ Modify:
Code:
{
"organizationId": "tenant_B"
} 5️⃣ Impact includes:
- Data leakage
- GDPR violations
- Full account takeover risk
Security Impact 🛡️💣
Cross-tenant vulnerabilities can lead to:- ❌ Unauthorized data access
- ❌ Data modification or deletion
- ❌ Privilege escalation
- ❌ Compliance violations
- ❌ Severe reputation damage
How to Prevent Cross-Tenant Bugs 🛠️✅
Strong prevention requires backend enforcement, not frontend checks.Best Practices:
- ✅ Enforce tenant isolation server-side
- ✅ Never trust client-supplied tenant IDs
- ✅ Bind tenant context to: Session - JWT - API Gateway
- ✅ Implement RBAC + ABAC
- ✅ Use Row-Level Security (RLS) in databases
- ✅ Add automated tenant-boundary tests
Example: Secure Query Pattern
SQL:
SELECT * FROM invoices
WHERE tenant_id = :current_tenant
AND invoice_id = :invoice_id; Bug Bounty Hunter Tips 🏹🔍
Always test:- API parameters (tenantId, orgId, workspaceId)
- UUID swapping
- JWT claim manipulation
- Bulk export endpoints
- Admin dashboards
Final Warning ⚠️
Cross-Tenant vulnerabilities are silent killers in SaaS security.Many companies miss them…
👉 Attackers don’t.