Start typing to search this publication.
techcirkle
Open menu

Subscribe to techcirkle

Get new posts delivered straight to your inbox.

What Your Cloud Security Platform Cannot See

Posture scanners cannot find broken authorisation, IDOR or business-logic flaws in multi-tenant SaaS. Where the buy vs build line really sits.

techcirkle
5 min read
Cover image for What Your Cloud Security Platform Cannot See

Imagine a CNAPP dashboard with a clean bill of health. Every bucket is private, every database encrypted, every role scoped, every workload patched. Now imagine a customer on that platform changing a number in a URL and reading another company's invoices. Both statements can be true at the same time, and in multi-tenant SaaS they often are.

Professional holding a padlock icon above a cloud computing network
Professional holding a padlock icon above a cloud computing network

Cloud based security services protect infrastructure: accounts, networks, workloads and identities. They are not built to understand your application's rules about who owns what. This post looks at the flaws that live in that blind spot and where the line between buying and building really sits.

Why Infrastructure Tools Are Blind Here

A posture scanner asks questions like "is this storage public?" or "does this role have wildcard permissions?" Those are properties of configuration, and a scanner can evaluate them without knowing anything about your product.

Authorisation flaws are different. Whether user 1842 should be able to read invoice 9031 depends on your data model, your tenancy design and your business rules. From the infrastructure's point of view, the request came from an authenticated user, over TLS, to a correctly configured service, which queried a properly encrypted database. Everything worked as configured. The defect is in the logic.

Flaw 1: Broken Tenant Isolation

In multi-tenant SaaS, broken access control between tenants is one of the most serious and most common flaws. It usually creeps in through a query that forgets its tenant filter, a background job that processes records across tenants, a cache keyed without the tenant ID, or a search index shared between customers.

Relying on every developer to remember WHERE tenant_id = ? in every query does not scale. Push the guarantee lower. With PostgreSQL, row-level security lets the database enforce it:

ALTER TABLE invoices ENABLE ROW LEVEL SECURITY;

CREATE POLICY tenant_isolation ON invoices
  USING (tenant_id = current_setting('app.tenant_id')::uuid);

-- Set per request, from the authenticated session only:
-- SET LOCAL app.tenant_id = '<tenant uuid>';

Combine that with an application role that cannot bypass RLS, and a forgotten filter returns nothing rather than someone else's data.

Flaw 2: Insecure Direct Object References

IDOR is the classic version of the invoice example above. An endpoint takes an identifier from the client and trusts it:

// Vulnerable: any authenticated user can fetch any invoice
app.get("/api/invoices/:id", requireAuth, async (req, res) => {
  const invoice = await db.invoice.findUnique({ where: { id: req.params.id } });
  res.json(invoice);
});

// Fixed: ownership is part of the lookup, derived from the session
app.get("/api/invoices/:id", requireAuth, async (req, res) => {
  const invoice = await db.invoice.findFirst({
    where: { id: req.params.id, tenantId: req.user.tenantId },
  });
  if (!invoice) return res.status(404).end();
  res.json(invoice);
});

Returning 404 rather than 403 avoids confirming that the record exists. Unguessable IDs help a little, but they are obscurity, not authorisation. The ownership check is the control.

Data encryption concept with a digital lock guarding flowing data
Data encryption concept with a digital lock guarding flowing data

Flaw 3: Business-Logic Abuse

Some of the most damaging flaws involve no injection and no broken query at all. The code does exactly what it was written to do, just in a sequence nobody anticipated: a discount code applied twice through parallel requests, a trial extended indefinitely by re-registering, a refund issued against an order that was already refunded, or a plan downgrade that leaves premium features switched on.

No scanner can find these, because "correct" is defined by your pricing and product rules. What works is threat-modelling each money-moving or permission-changing flow, using idempotency keys and database constraints to make double-processing impossible, and testing the unhappy paths deliberately.

Flaw 4: The Quieter Application Gaps

A few more that routinely slip past infrastructure tooling:

  • Weak session handling: long-lived tokens with no revocation, or sessions that survive a password reset.

  • Missing rate limits on authentication endpoints, which invite credential stuffing even when the WAF is configured.

  • Sensitive data in logs, such as tokens, personal data or card numbers written by a helpful debug statement.

  • Unencrypted sensitive fields that rely solely on disk-level encryption, which protects against stolen hardware but not against an over-permissioned query.

  • AI features without guardrails, where a retrieval pipeline returns documents across tenants.

Where the Buy vs Build Line Sits

A useful way to divide the work:

  • Buy: posture management, workload protection, WAF and DDoS mitigation, secrets management, log aggregation and managed detection.

  • Build: tenant isolation, authorisation logic, input validation, session handling, audit logging, field-level encryption and AI guardrails.

  • Configure carefully: identity policies, network segmentation, backup and recovery, and log retention, where the tools exist but the settings are yours.

To find what you build, rely on design reviews, authorisation tests that attempt cross-tenant access, code review focused on data access, and manual penetration testing. Automated scanners help with known-vulnerable dependencies and common code patterns, but not with logic.

The full guide, covering service categories, costs and a 90-day roadmap, is on the TechCirkle blog: Cloud Based Security Services: What to Buy, What to Build, and Where AI Actually Helps.

Security architecture belongs in the design from the first sprint, which is how we run SaaS development engagements.

Frequently Asked Questions

Why can't a CNAPP detect cross-tenant data leaks?

A CNAPP evaluates infrastructure configuration and workload behaviour. A cross-tenant leak happens through valid, authenticated requests to correctly configured services, so nothing looks wrong at that level. Detecting it requires knowing your data ownership rules.

Is row-level security enough for tenant isolation?

It is a strong safety net, not a complete answer. You also need tenant-aware caches, search indexes, background jobs and file storage, plus tests that actively attempt cross-tenant access, because data often escapes through paths outside the main database.

How do we test for IDOR vulnerabilities?

Create two test tenants, capture requests made by one, then replay them with the other's session while swapping identifiers. Automate this for key endpoints in your test suite and include it in the scope of every penetration test.

What makes business-logic flaws hard to find?

They depend on what your product is supposed to allow, which no generic tool knows. Finding them requires threat-modelling specific flows, such as payments, refunds and plan changes, and deliberately testing unusual sequences and concurrent requests.

When should a SaaS company commission a penetration test?

Before major enterprise sales or compliance audits, after significant architectural changes, and at least annually. Ask the testers to focus explicitly on authorisation and tenant isolation, since those are the flaws automated tools miss.

Subscribe to techcirkle