Cross-Tenant Vulnerability in SaaS Explained

x32x01
  • 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
👉 These tenants must never access each other’s data.



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
If an attacker changes it to:
Code:
GET /api/users?tenant_id=124
👉 And gets another tenant’s data - that’s a cross-tenant bug.



IDOR (Insecure Direct Object Reference) 🧨​

The application exposes internal object IDs without tenant checks.

Example​

Code:
GET /api/invoices/98765
If invoice 98765 belongs to a different tenant but is still accessible ❌
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"
}
Never trust tenant context coming from the client.



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"
}
Without tenant binding, tokens can be reused across tenants 😬



Shared Admin APIs 🚫​

Admin endpoints that:
  • Are shared across tenants
  • Lack tenant-based authorization
  • Allow cross-organization access
These are gold mines for attackers 💰



Real-World Bug Bounty Scenario 🧪🎯​

1️⃣ Login as Tenant A
2️⃣ Intercept an API request
3️⃣ Modify:
Code:
{
  "organizationId": "tenant_B"
}
4️⃣ Receive Tenant B’s sensitive data
5️⃣ Impact includes:
  • Data leakage
  • GDPR violations
  • Full account takeover risk
💰 These issues are often rated High or Critical in bug bounty programs.



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
🎯 Keywords to watch for: organization, workspace, account, company, team



Final Warning ⚠️​

Cross-Tenant vulnerabilities are silent killers in SaaS security.
Many companies miss them…
👉 Attackers don’t.
 
Related Threads
x32x01
Replies
0
Views
237
x32x01
x32x01
x32x01
Replies
0
Views
1K
x32x01
x32x01
x32x01
Replies
0
Views
28
x32x01
x32x01
x32x01
Replies
0
Views
378
x32x01
x32x01
x32x01
Replies
0
Views
271
x32x01
x32x01
Register & Login Faster
Forgot your password?
Forum Statistics
Threads
715
Messages
724
Members
70
Latest Member
blak_hat
Back
Top