SaaS Security Testing: What to Test Before Customers Ask
SaaS SecurityHetz Team

SaaS Security Testing: What to Test Before Customers Ask

A practical guide to security testing for SaaS products: tenant isolation, roles, APIs, billing logic and integrations, plus how often to test and what customers expect.

A SaaS product is many companies' data living in one system. That is what makes the business model work, and it is also what makes SaaS security different. A bug in a single-customer app exposes one customer. A bug in the boundary between tenants can expose all of them at once.

This guide covers what security testing for a SaaS product should focus on, the parts most often missed, how often to test, and what your customers will ask to see. For the basics of the method itself, see what penetration testing is.

Why SaaS Security Testing Is Different

Three things set a SaaS product apart from a typical website:

  1. Multi-tenancy. Many customers share the same database, the same API and the same code. Isolation between them is enforced by your code, not by separate machines.
  2. Roles inside each tenant. Owners, admins, members, viewers, billing contacts, guests. Each role should see and do different things.
  3. A large API. The frontend is usually a thin layer over an API that does everything, and the API is reachable directly by anyone with a token.

A test that does not sign in as several users in several tenants will miss the bugs that matter most. The OWASP API Security Top 10 puts broken object level authorization, the classic cross-tenant bug, at the top of the list for a reason.

What to Test in a SaaS Product

Tenant isolation

The first and most important question: can tenant A ever see or change tenant B's data? Test it everywhere:

  • Every API endpoint that takes an ID, by swapping in an ID from another tenant.
  • Search, filters and exports, which often query the database differently from the main views.
  • File storage, where signed URLs and bucket paths can leak across tenants.
  • Background jobs, webhooks and email templates that render data for a tenant.
  • Caches, where a key without the tenant ID can serve one customer's data to another.

Our guide to IDOR and broken access control shows exactly how these bugs appear and how to fix them in code.

Roles and permissions

Within each tenant, check that every role is limited to what it should do. Common findings:

  • A member can call an admin-only API endpoint directly, because only the button was hidden.
  • A viewer can change data through an endpoint the UI never uses.
  • A user can change their own role by editing a field in a profile update request.
  • A removed user's session or API key still works.

Authentication and account flows

Sign-up, login, password reset, email change, invitations, single sign-on and multi-factor authentication. Invitations deserve extra attention in SaaS: can an invite link be reused, guessed or redeemed into a different tenant? Can someone accept an invite meant for another email address?

Billing and plan limits

Business logic around money is easy to get wrong and invisible to scanners:

  • Can a free plan reach paid features by calling the API directly?
  • Can seat or usage limits be bypassed by sending requests in parallel?
  • Can a discount code be applied more than once, or to a plan it was not meant for?
  • Do webhooks from the payment provider verify their signature?

APIs and integrations

Public APIs, API keys, OAuth apps and webhooks multiply the attack surface. Test key scopes, rate limits, webhook signature checks and server-side request forgery in any feature that fetches a URL a user supplies, such as an avatar from a link or an import from a URL.

Data exposure

APIs often return more fields than the UI shows: internal notes, other users' emails, hashed passwords, tokens. Check what each response actually contains, not just what the page displays.

A SaaS Security Testing Checklist

AreaKey questionTypical finding
Tenant isolationCan tenant A reach tenant B?Swapping an ID returns another tenant's record
RolesIs every role limited server-side?Hidden admin button, open admin endpoint
AuthAre tokens, resets and sessions safe?Reset links that never expire
InvitationsCan invites be abused?Invite accepted into the wrong tenant
BillingAre plan limits enforced on the server?Paid feature reachable on a free plan
APIDoes every endpoint check authorization?Old endpoint still live without checks
IntegrationsAre webhooks and URL fetches safe?Unsigned webhooks, SSRF through imports
Data exposureDo responses leak extra fields?User emails in a public listing
SecretsAre keys kept out of the client?Service keys in the frontend bundle

SaaS Built on Supabase, Firebase or an AI App Builder

Many SaaS products today run on backend platforms where the database is reachable from the browser and access rules are written as policies. That shifts the most important security work into those policies. If they are missing or too broad, the database is effectively public. Our guide to Supabase security and row level security covers the most common mistakes, and if the product was generated with Lovable, Bolt or Base44, read AI app builder security too.

How Often to Test a SaaS Product

A SaaS product is never finished. New endpoints, new roles and new integrations ship every week, and each can open a new path. A practical rhythm:

WhenWhat
Every releaseA quick automated test of what changed
MonthlyA full automated test of the whole product
Before major launchesA full test of the new area, with retest
Yearly, or when a customer or auditor asksA full test with a formal report and attestation

This is the thinking behind continuous testing: instead of one deep look at one version of the product each year, every version gets looked at.

What Your Customers Will Ask For

If you sell to larger companies, their security team will send a questionnaire. Expect questions such as:

  • When was your last penetration test, and who performed it?
  • Were all critical and high findings fixed, and were the fixes retested?
  • Is the test repeated regularly?
  • Can you share a summary or attestation letter?

A detailed report is sensitive; it describes your weaknesses. Most companies share a summary instead: an attestation letter or certificate with the date, scope and result, or a public trust page. This is why Hetz ends every test with a certificate, a badge for your site and a trust page that shows that you test, never what was found. Our guide to penetration testing for SOC 2 and ISO 27001 covers what auditors expect from the same report.

Preparing for a SaaS Penetration Test

  • Two tenants at least. Cross-tenant bugs can only be tested with two.
  • Every role, twice. Two users per role per tenant, so the tester can test horizontal access too.
  • Realistic data. Empty accounts hide bugs in lists, exports and search.
  • API docs or an OpenAPI file. Not required, but it speeds up mapping.
  • A clear scope. Production or staging, which domains, and anything that must not be touched, such as live payments.

Common Mistakes in SaaS Authorization

Most SaaS access bugs come from a handful of patterns. Knowing them makes both testing and fixing faster.

  • Trusting the tenant ID from the request. If the client sends the tenant ID and the server uses it as is, any user can switch tenants by editing one field. The tenant should come from the session on the server.
  • Checking access in the UI only. Hiding a button is not a permission. Every endpoint has to check, every time.
  • Checking the user but not the object. The server confirms the user is logged in, then loads whatever record ID was asked for, without checking it belongs to the user's tenant.
  • One check at the top, none below. A list endpoint filters by tenant, but the export, the count or the bulk update next to it does not.
  • Forgetting non-HTTP paths. Background jobs, scheduled reports and webhooks run without a user session and often skip the checks the API has.

The OWASP Authorization Cheat Sheet recommends denying by default and enforcing access on every request on the server. In a SaaS product, that usually means one shared function that loads a record only through the current tenant, used by every endpoint, so a new endpoint cannot forget the check.

Turning Findings Into Fixes

A finding is only useful when it is closed. For each one, you want the evidence to reproduce it, a fix that fits your stack, a test that proves the fix, and a retest. That is the part many reports skip and the part that costs your team the most time. We wrote about why in our guide to penetration testing cost.

Next Steps

Start with tenant isolation, because it is the bug that turns into a headline. Then cover roles, billing and the API. If you want to see how an automated, agent-driven SaaS test runs from domain to fixes, walk through it on our home page, compare plans on pricing, or start a scan.

FAQ

Frequently asked questions

Keep reading