[email protected]

Basics · Security & Pentesting

Is Supabase Secure? Responsibility, Component Table and Self-Test

Editorial note: This guide was written to the best of our knowledge at the time of publication. Versions, commands, features, prices and licensing terms may change through vendor updates; the current information from the respective provider applies. Please verify critical steps independently before production use. All trademarks, product names and company names mentioned belong to their respective owners. As a rule, WZ-IT is not a partner of the vendors and projects mentioned and is not officially affiliated with them; existing partnerships are stated explicitly. This text does not replace individual professional, legal or tax advice. If any information is outdated or incorrect, please write to [email protected].

Have your Supabase security checked - We review access rules, grants, keys, storage and functions of your Supabase backend, on request attack a test instance and deliver confirmed findings with proof. Book an intro call · Pentest at a fixed price

Is Supabase secure? The question has two parts. Supabase operates the platform and describes security itself as a shared responsibility: access management, data and applying security controls rest with the project operator. Whether the data of an application is readable without signing in is therefore decided by the table grants, row level security (RLS), keys and storage rules of the project, not by the platform. This also applies to applications built with AI tools: according to Lovable, its built-in backend uses the open-source foundation of Supabase (Lovable documentation).

This article uses a table to show, per component, what Supabase takes over, what you configure and how you can check it yourself. It adds a self-test for the question "Is my database readable without signing in?", the state of the default values after the 2026 changes and the technical facts on region and data processing. The review of policies in detail is covered in the article Audit Supabase RLS. Status: 22 November 2026.

Table of contents

Is Supabase secure? The short answer

Supabase secures the platform, and the security of the application stays with the operator. This is how the Supabase blog puts it: "Supabase secures the platform. Application-level security remains the responsibility of each customer." (Security Retro 2025, 7 January 2026). The answer is therefore neither "yes" nor "no": for the platform, the statements of Supabase apply; for the application, it depends on how grants, RLS, keys and settings are set.

Question Short answer
Who secures the platform? Supabase: the diagram in the Shared Responsibility Model names Postgres backups, operating system maintenance and infrastructure including monitoring. The HTTP interfaces of a project accept only HTTPS with TLS 1.2 or 1.3 (Platform security)
Is my data readable without signing in? Table grants and RLS decide. A table in an exposed schema without RLS can be read and written by any role with a grant (Row Level Security). Check it with the self-test
Is the publishable (formerly anon) key a leak? No, it is meant for browsers and source code. A secret (formerly service_role) key in the frontend would be a leak (API keys)
Is RLS enabled by default? For tables from the Dashboard yes, for tables from the SQL Editor, migrations and other tools not automatically (Securing your API)
Have the defaults changed in 2026? Yes, with a source conflict on the date 30 October 2026 (default changes)
Is Supabase GDPR compliant? This article does not assess legal questions. Technically: region selectable, DPA available, and according to Supabase the region choice is no proof of compliance (technical facts)

What Supabase takes over and what stays with you

According to the Shared Responsibility Model, customers are always responsible for the Supabase account, access management (account, database, tables), the data and applying security controls. Supabase also names as the customer's task access rights on tables with sensitive data, database secrets and API keys, and integrated third-party services (OAuth and SAML providers, SMTP and SMS services, external calls from functions). Supabase delivers the warnings of the Security Advisor, and acting on them is up to the operator. Supabase recommends always applying row level security.

With self-hosted Supabase the boundary shifts: according to the self-hosting documentation, server provisioning, hardening, updates, service configuration, Postgres maintenance, high availability, backups and monitoring rest with the operator. Hosting and operations at WZ-IT are described on the page Supabase hosting, the comparison with the cloud in the article Supabase Cloud vs self-hosted.

Supabase security: responsibility and self-check per component

For every component, the table shows what the platform takes over according to the documentation pages, what the project operator has to configure and how this can be checked yourself. The selection of checkpoints follows the Supabase documentation; the assignment to the columns is our presentation.

Component What Supabase takes over What you configure How to check it yourself Source
Database, Data API and RLS Operation and backups of Postgres, operation of the automatically generated Data API (REST, GraphQL) RLS on every table in an exposed schema; limit grants for anon and authenticated to what is needed; one policy per operation; views with security_invoker; switch off the Data API if the app does not use it SQL query and request without signing in (self-test); Security Advisor, for example lints 0013, 0024, 0010; pgTAP tests with supabase test db Securing your API, Row Level Security, Advisors
Auth Operation of the Auth service; default limits per IP address (30 requests in 5 minutes for sign-up, magic link and OTP, 150 for the token endpoint); 2 emails per hour with the built-in mail provider Email confirmation on; remove test phone numbers; expiry of one-time codes and links at most 3600 seconds; own SMTP server; leaked password protection (from the Pro plan); exact redirect URLs instead of wildcards in production; with anonymous sign-ins, check is_anonymous in policies Dashboard: Authentication, Sign In / Providers and URL Configuration; read policies for authenticated knowing that anonymous users use this role as well (lint 0012) Production security checklist, Rate limits, Password security, Redirect URLs, Anonymous sign-ins
Storage Operation of the file service; buckets are private by default, and without RLS policies Storage does not allow uploads Set the bucket to public or private; policies on storage.objects per operation; no broad SELECT policy on public buckets; serve private files through signed URLs Dashboard: bucket type; lint 0025; try listing with the publishable key (self-test, step 5) Storage Buckets, Storage Access Control, Advisors
Edge Functions Execution of the functions; the platform check verify_jwt is on by default and expects a user JWT in the Authorization header Set the auth mode per function (user, secret, publishable, none); with verify_jwt = false (webhooks, calls with a secret key, public functions) the function checks the caller itself; supabaseAdmin only with a filter on the user ID supabase/config.toml or config.jsonc: which functions have verify_jwt = false? Read the handler: auth mode and filter. verify_jwt also lets publishable and secret keys through on the apikey header without authenticating the caller. Do not call functions that write as a test Securing Edge Functions, Authorization headers
Realtime Operation of the Realtime service; Postgres Changes checks every event for every subscriber Create RLS and policies for every replicated table with sensitive data (publication supabase_realtime); RLS does not filter DELETE events in Postgres Changes; send sensitive data through Broadcast with Realtime Authorization (policies on realtime.messages, private: true); "Allow public access to channels" is on by default, so anyone with the anon key can subscribe to and send on public channels Dashboard: Database, Publications; Realtime Settings Postgres Changes, Realtime Authorization, Realtime Settings, Production security checklist
API keys Issuing of the keys; a secret key is rejected in the browser with HTTP 401 based on the User-Agent; according to the blog, Supabase revokes secret keys of the new formats that are detected in public GitHub repositories publishable key only where the code is public; secret key only in code that you control; one secret key per backend component; the legacy keys anon and service_role stay valid until you disable them; rotate a leaked key Search build folder, repository and git history for sb_secret_, service_role and long JWT strings (starting with eyJ) (WZ-IT assessment); Dashboard: Settings, API Keys API keys, Rotate a leaked API key, Security Retro 2025
Dashboard access and direct database access MFA (TOTP) for the account; MFA enforcement for the organization from the Pro plan; SSL enforcement and network restrictions for Postgres (connections without SSL are possible by default) MFA for your account (with GitHub sign-in, 2FA on GitHub); MFA enforcement for the organization; more than one owner; enable SSL enforcement and network restrictions; store database secrets encrypted Dashboard: Organization, Team (members, roles, MFA); Database Settings: SSL Configuration, Network Restrictions Production security checklist, Shared Responsibility Model, SSL Enforcement, Network Restrictions

The statements come from the documentation as of 22 November 2026. Plan scopes and menu paths in the Dashboard can change.

Supabase RLS: two layers and typical findings

Two checks run before every access through the Data API: grants decide whether a role may perform the operation, RLS policies decide which rows it applies to (Securing your API). A table in an exposed schema without RLS can be read and written by any role with a matching grant, and policies do not take automatically granted privileges back (Row Level Security). If RLS is on and there is no policy, the PostgreSQL documentation applies "default-deny". According to the PostgreSQL documentation, superusers and roles with the attribute BYPASSRLS always bypass RLS, and table owners normally do as well unless FORCE ROW LEVEL SECURITY is set for the table.

On the question "Is RLS enabled by default?", Supabase documents three cases. Tables from the Dashboard have RLS on by default. Tables from the SQL Editor or from other tools need an explicit alter table ... enable row level security. And the documentation describes an event trigger that enables RLS on every newly created table in the schema public, "Existing tables still need RLS enabled manually" (Event Triggers). "RLS is off by default in Supabase" is therefore not accurate, and neither is "RLS is always on".

The following constellations are described as a risk in the Supabase documentation, and each has a counterpart in the Security Advisor. The order is not a ranking by frequency.

Finding Why it is a finding Remedy according to Supabase
Table without RLS in an exposed schema Anyone with the project URL and the publishable key, both readable from the shipped frontend, can read, edit and delete the data of the table given matching grants (lint 0013, level ERROR, Advisors) Enable RLS, revoke existing grants from anon and authenticated, give back only the privileges needed, one policy per operation
Policy with an always-true condition to anon using (true) gives every signed-out visitor read access to all rows that the role reaches through grants (lint 0024, WARN) Restrict the condition to owner or tenant, true only for data that is meant to be public
Policy that evaluates user_metadata Users can change user_metadata themselves (lint 0015, ERROR) Do not derive roles and tenants from user_metadata; according to Supabase there is no one-size-fits-all replacement
View without security_invoker Views run by default with the privileges and the RLS policies of their owner, not of the caller (CREATE VIEW). RLS is bypassed if that owner has BYPASSRLS, is a superuser or owns the table without FORCE ROW LEVEL SECURITY (Row Security Policies). According to Supabase, views are mostly created with the user postgres (Row Level Security). With security_invoker = true the privileges and RLS of the caller apply (lint 0010, ERROR) with (security_invoker = true) (Postgres 15 and higher), otherwise revoke access or move the view to an unexposed schema
SECURITY DEFINER function callable by anon The function runs with the privileges of its owner, not of the caller. If the owner has BYPASSRLS or is a superuser (Supabase names postgres as an owner with bypassrls) or owns the table without FORCE ROW LEVEL SECURITY, it bypasses RLS (CREATE FUNCTION, Row Security Policies). The privilege EXECUTE controls the call, new functions receive EXECUTE for PUBLIC by default; a call through the Data API additionally requires the schema to be exposed and the schema privilege USAGE, call through POST /rest/v1/rpc/<name> (lint 0028, WARN) Revoke EXECUTE, switch to SECURITY INVOKER or move out of the exposed schema

How to review policies, roles and tenant isolation in detail is covered in the article Audit Supabase RLS: policies, roles and tenant isolation. OWASP ranks missing access control first in the Top 10:2025 as A01:2025 Broken Access Control and recommends: "Except for public resources, deny by default."

Keys: publishable and anon versus secret and service_role

According to Supabase, every request to the APIs of a project carries an API key. It identifies which application component is calling, not which user (API keys). Direct Postgres connections, by contrast, use database credentials and no API key (Connecting to Postgres). Supabase knows four types of keys:

Key Format Use according to Supabase Postgres role
publishable sb_publishable_... Safe to expose: web page, mobile app, desktop app, CLI, source code anon, authenticated after sign-in
secret sb_secret_... Only in backend components (servers, APIs with their own authorization, Edge Functions); bypasses RLS as long as the request carries no user token service_role
anon (legacy) JWT, long-lived Predecessor of the publishable key anon
service_role (legacy) JWT, long-lived Predecessor of the secret key service_role

Three statements of the documentation matter for the review:

  • The publishable key does not protect against reverse engineering and the network view of the browser. Protection comes from grants, RLS on the tables in exposed schemas and regularly reviewed policies for anon and authenticated. A secret key bypasses RLS only as long as the request carries no user token; if it carries one, that user's policies apply (Row Level Security). Postgres checks grants before RLS, and a missing grant returns a permission error even for service_role (API keys).
  • New keys do not disable the old ones. The legacy keys stay valid until they are disabled in the Dashboard under Settings, API Keys. Their deprecation is announced for the end of 2026: the API keys documentation says "by the end of 2026" (API keys), and the timetable of the announcement names "Late 2026, TBC", that is, a date that is not yet confirmed (GitHub discussion, date of the "Latest Update" section: 17 June 2025).
  • The browser block for secret keys (HTTP 401 based on the User-Agent) does not stop other tools. A secret key must never be in a web page, in source code, in version control or in a shipped app. A leaked key is rotated once the cause of the leak is fixed (Rotate a leaked API key).

Which keys of other services may appear in the frontend goes beyond Supabase and is not the subject of this article.

Default changes 2026: what Supabase announces and what the documentation shows

In 2026 Supabase changed or announced several default values. The table names only dates that appear in Supabase sources: changelog entries, the related discussions in the Supabase GitHub repository and the documentation, each as of 22 November 2026.

Change According to Supabase What it means for your project
New tables are no longer automatically reachable through the Data API Changelog of 28 April 2026: selectable at project creation since 28 April 2026, default for new projects from 30 May 2026 (gradual rollout over a few weeks), announced for all existing projects from 30 October 2026 (changelog). On 22 November 2026 the documentation still says "Supabase is changing the platform default" and still describes automatic privileges on new objects in the schema public for existing projects (Securing your API) Existing tables keep their privileges and stay reachable, so the change does not close an old table without RLS. New tables need an explicit grant. Whether your project has already been switched is shown by the query "Check your default privileges" in the documentation
OpenAPI specification no longer with the anon key Changelog of 17 February 2026: new projects from 11 March 2026, all projects from 8 April 2026 announced, with a reservation that dates may be pushed back (changelog). On 22 November 2026 the API keys documentation states: GET /rest/v1/ accepts only secret keys Table names can no longer be retrieved with the public key; the self-test gets them from the query. Table routes such as /rest/v1/<table> are not affected
GraphQL (pg_graphql) Announcement of 26 January 2026: no longer enabled by default, for new projects and for existing projects older than 30 days with no GraphQL requests (changelog); introspection is off by default from pg_graphql 1.6.0 for new projects, the announcement names 29 June 2026 as the launch date, and the actual cut-off date of the rollout is not evidenced (discussion) Existing projects with GraphQL requests keep pg_graphql and introspection until pg_graphql is upgraded to 1.6.0 or higher. With introspection on, /graphql/v1 shows, according to lint 0026, all objects that anon can read, regardless of RLS
RLS on new tables Blog of 7 January 2026: tables from the Dashboard have RLS on by default, an event trigger enforces RLS for tables from migrations and other tools as well, set up with one click in the Dashboard (Security Retro 2025) The trigger applies only to tables created after it is installed. Enable RLS on old tables without it manually
API keys Documentation on 22 November 2026: the deprecation of anon and service_role is announced for the end of 2026, and the announcement on GitHub names "Late 2026, TBC" (API keys, discussion) Switch the keys and then disable the legacy keys in the Dashboard, otherwise they stay valid

On the date 30 October 2026, two statements by Supabase exist: the announcement names it as the date for all existing projects, while on 22 November 2026 the documentation still describes the change as ongoing ("is changing") and still lists the automatic privileges for existing projects. The changelog entry and the page Securing your API contain, on 22 November 2026, no statement that confirms completion for all projects or postpones the date. The date therefore stands as an announcement according to the changelog, not as a finding. What matters is the state of your project, and that is shown by the query in the documentation, not by a date.

Self-test: is my database readable without signing in?

The test answers one question: what does someone reach who knows only your project URL and the publishable key, without signing in? Both can be read from a shipped frontend (API keys). Run it only against your own project. Supabase allows customers to run security tests on their own project without approval and prohibits DoS tests and request flooding (Security testing); the test works with individual requests, at least one per table and test case (step 3). Our recommendation: a test project with test data instead of production.

Step 1: get the project URL and the publishable key. Both are shown in the Connect dialog of the project in the Dashboard (API keys). The publishable key is meant to be published. The test needs no secret key.

export SUPABASE_URL="https://<project-ref>.supabase.co"
export SUPABASE_PUBLISHABLE_KEY="sb_publishable_..."

Step 2: list the objects and read off the privileges of anon. The query lists all tables and views of the chosen schemas, not only those on which anon has privileges. The query returns the names as well, because the publishable key can no longer retrieve the OpenAPI overview (GET /rest/v1/, see default changes). It runs in the SQL Editor of the Dashboard or with psql and changes nothing. It asks for the privileges of the role anon as Postgres keeps them in its system catalogs (privilege functions, pg_class). Only the schemas in the list behind in (...) are checked, here public. Enter further schemas that the Data API exposes there; which ones those are is shown in the API settings of the Dashboard under "Exposed schemas" (Row Level Security):

select n.nspname as schema,
       c.relname as object,
       c.relkind as kind,
       case when c.relkind in ('r', 'p') then c.relrowsecurity end as rls_enabled,
       c.reloptions as options,
       pg_get_userbyid(c.relowner) as owner,
       case when c.relkind = 'v' then r.rolsuper or r.rolbypassrls end as owner_role_level_bypass,
       has_schema_privilege('anon', n.oid, 'usage') as anon_schema_usage,
       has_table_privilege('anon', c.oid, 'select')
         or coalesce((select bool_and(has_column_privilege('anon', c.oid, a.attnum, 'select'))
                      from pg_attribute a
                      where a.attrelid = c.oid and a.attnum > 0 and not a.attisdropped), false) as anon_select_all_columns,
       has_any_column_privilege('anon', c.oid, 'select') as anon_select_some_columns,
       has_any_column_privilege('anon', c.oid, 'insert') as anon_insert_any_column,
       has_any_column_privilege('anon', c.oid, 'update') as anon_update_any_column,
       has_table_privilege('anon', c.oid, 'delete') as anon_delete
from pg_class c
join pg_namespace n on n.oid = c.relnamespace
join pg_roles r on r.oid = c.relowner
where n.nspname in ('public')
  and c.relkind in ('r', 'p', 'v', 'm', 'f')
order by n.nspname, c.relname;

The columns in detail: kind is r (table), p (partitioned table), v (view), m (materialized view) or f (foreign table). rls_enabled shows for tables whether RLS is enabled; for the other object types the column stays empty. options shows for views whether security_invoker is set. owner is the owner of the object, and owner_role_level_bypass is true for views if that owner is a superuser or has the attribute BYPASSRLS. anon_schema_usage shows the schema privilege USAGE. anon_select_all_columns is true if anon has SELECT on the whole object or on every individual column, and anon_select_some_columns if anon has SELECT on at least one column. For INSERT and UPDATE, a privilege on a single column counts, and DELETE exists only for the whole table (privilege functions). The columns show privileges, not policies: which rows actually come back is shown by step 3. For authenticated, replace anon with authenticated.

This is how to read the result: every statement in the table that anon can read something presupposes anon_schema_usage true. RLS is a separate, downstream question that step 3 answers.

Result of the row Meaning
anon_schema_usage false Access to objects of this schema requires the schema privilege USAGE (privileges); without it access fails as a rule, even if the other values in the row are true. Database sessions that are already running may keep access temporarily after a revoke
anon_schema_usage true, anon_select_all_columns true, table with rls_enabled false Finding: anon has SELECT on all columns and RLS filters no rows, so every row is readable without signing in. Write privileges are shown by anon_insert_any_column, anon_update_any_column and anon_delete; whether a write succeeds is not settled by them (constraints, triggers)
anon_schema_usage true, anon_select_all_columns true, table with rls_enabled true anon has SELECT on all columns, and the policies that apply to anon decide which rows are visible: step 3 shows it
anon_schema_usage true, anon_select_all_columns false, anon_select_some_columns true anon can read only some of the columns. select=* fails with 42501, and a request with the readable columns can succeed (Column Level Security). The additional query below names the readable columns, and step 3 requests them explicitly
anon_schema_usage true, anon_select_all_columns and anon_select_some_columns false anon has SELECT on no column, and a read fails for lack of the privilege
view (kind v) with anon_schema_usage and anon_select_all_columns true The schema privilege and the privilege on the view are prerequisites for querying it, but not sufficient in every case: with security_invoker, anon also needs privileges on the base tables, and without security_invoker the owner needs them. Which rows are visible depends on the owner. If options contains no security_invoker with a true value (for example true or on), access to the base tables uses the privileges and the RLS policies of the owner, not those of anon (CREATE VIEW). RLS is bypassed if the owner is a superuser or has BYPASSRLS (owner_role_level_bypass true) or if the owner owns a base table without FORCE ROW LEVEL SECURITY; the query does not show the latter. According to Supabase, views are mostly created with the user postgres (Row Level Security). With security_invoker, the privileges and RLS of the caller apply (Postgres 15 and higher, lint 0010)
materialized view or foreign table (kind m or f) with anon_schema_usage and anon_select_all_columns true According to the Advisor they cannot be protected by RLS, and protection runs through privileges (lints 0016, 0017)

For objects where anon has no SELECT on the whole object, this additional query names the readable columns. Every name is wrapped in double quotes, and quotation marks and backslashes in the name are escaped with a backslash. PostgREST documents quotation marks around reserved characters (, . : * ( )) and the escaping of quotation marks and backslashes for filters (URL grammar); for column names in the select parameter we tested both locally (see Status and methodology). The list readable_columns is used as the select parameter in step 3:

select n.nspname as schema,
       c.relname as object,
       string_agg('"' || replace(replace(a.attname, '\', '\\'), '"', '\"') || '"', ',' order by a.attnum) as readable_columns
from pg_class c
join pg_namespace n on n.oid = c.relnamespace
join pg_attribute a on a.attrelid = c.oid and a.attnum > 0 and not a.attisdropped
where n.nspname in ('public')
  and c.relkind in ('r', 'p', 'v', 'm', 'f')
  and not has_table_privilege('anon', c.oid, 'select')
  and has_column_privilege('anon', c.oid, a.attnum, 'select')
group by n.nspname, c.relname
order by n.nspname, c.relname;

Step 3: request without signing in. For every row with anon_schema_usage and anon_select_all_columns true, at least one request with select=, with the header apikey and without a user token (API keys). For rows where only anon_select_some_columns is true, a request with the list from readable_columns behind select= is added. These are the test cases: select= and, for partial privileges, the readable columns. If the object is not in public, the header Accept-Profile with the schema name is added (Using Custom Schemas). Names with spaces or special characters must be percent-encoded in the address (URL grammar):

curl -s -i "$SUPABASE_URL/rest/v1/<table>?select=*&limit=1" \
  -H "apikey: $SUPABASE_PUBLISHABLE_KEY"

For the request with the column list, curl encodes the list for the address; it is wrapped in single quotes because it contains double quotes itself:

curl -s -i -G "$SUPABASE_URL/rest/v1/<table>" \
  --data-urlencode 'select=<readable_columns>' \
  --data-urlencode "limit=1" \
  -H "apikey: $SUPABASE_PUBLISHABLE_KEY"
Response Meaning
HTTP 200 with a record Finding: the table is readable without signing in. That is intended for data that is deliberately public. Do not copy the content of the records into your log (recommendation)
HTTP 200 with [] No row released, or the table is empty. A policy that filters out all rows raises no error. For an empty table, the empty response is not conclusive: repeat in a test project with at least one test row
Error 42501 (PostgREST maps 42501 to HTTP status 401 or 403) Insufficient privileges, and the message names the object. "permission denied for table ...": the privilege on the table is missing, and with select=* a missing privilege on a single column is enough as well; in step 2, anon_select_all_columns and anon_select_some_columns tell the two apart. "permission denied for schema ...": the schema privilege USAGE is missing. According to Supabase, further causes are restricted or unexposed schemas and, for INSERT and UPDATE, missing RLS permissions (Securing your API, 42501 errors, PostgREST)
Error PGRST205, HTTP 404 PostgREST does not find the table from the address, for example because name or schema are wrong (PostgREST)

When reading, a missing privilege and a policy without a match look different: a missing privilege returns a permission error, a policy without a match returns an empty result (API keys).

Step 4: check functions without calling them. Functions are reachable through /rest/v1/rpc/<name>, and a test call executes them. List instead which functions anon may execute, who owns them and whether that owner has a role with an RLS bypass. Under /rpc, PostgREST offers functions of the exposed schemas, and it does not support stored procedures (Functions as RPC). The query therefore lists only functions (prokind = 'f'); procedures, aggregates and window functions do not appear, and it leaves out trigger functions (return type trigger or event_trigger). It is a list of candidates, not a mirror of the /rpc routes: PostgREST additionally checks whether the signature is callable, and the column anon_schema_usage is only shown, not filtered. It builds on the owner query that the Supabase documentation shows for lint 0028 (Advisors; pg_proc, pg_roles), checks only the schemas behind in (...) as step 2 does, and changes nothing:

select n.nspname as schema,
       p.proname as function,
       pg_get_function_identity_arguments(p.oid) as arguments,
       p.prosecdef as security_definer,
       pg_get_userbyid(p.proowner) as owner,
       case when p.prosecdef then r.rolsuper or r.rolbypassrls end as owner_role_level_bypass,
       has_schema_privilege('anon', n.oid, 'usage') as anon_schema_usage
from pg_proc p
join pg_namespace n on n.oid = p.pronamespace
join pg_roles r on r.oid = p.proowner
where n.nspname in ('public')
  and p.prokind = 'f'
  and p.prorettype not in ('trigger'::regtype, 'event_trigger'::regtype)
  and has_function_privilege('anon', p.oid, 'execute')
order by p.prosecdef desc, p.proname;

A function with security_definer true runs with the privileges of its owner (CREATE FUNCTION); arguments tells overloaded functions apart. owner_role_level_bypass shows only the role-wide bypass and stays empty for functions without security_definer: it is true if the owner is a superuser or has the attribute BYPASSRLS (Supabase names postgres as an owner with bypassrls, Row Level Security). Whether the function actually bypasses RLS additionally depends on every table it accesses: if its owner owns a table without FORCE ROW LEVEL SECURITY, RLS does not apply to that owner there, even if owner_role_level_bypass is false (Row Security Policies). The query does not show this. For an owner without BYPASSRLS that does not own the table, the RLS policies of the owner apply to the access; Supabase names an owner with low privileges as a possible false positive of lint 0028 (Advisors). What the function actually returns is shown only by its code. Functions from extensions installed in the schema public appear in the list as well (lint 0014).

Step 5: try listing storage. For every bucket, check whether the files can be listed without signing in. According to the JavaScript reference, the method list requires a select policy on storage.objects:

import { createClient } from '@supabase/supabase-js'

const supabase = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_PUBLISHABLE_KEY)
const { data, error } = await supabase.storage.from('<bucket>').list('', { limit: 5 })
console.log(error ?? data.map((file) => file.name))

If file names come back, anyone with the publishable key can list the file names in the bucket. For a public bucket the file URL is readable by anyone anyway, and listing is the additional step that the Advisor reports as lint 0025. For a private bucket, a response with file names means that a SELECT policy on storage.objects allows the role anon access; check whether that is intended.

Step 6: cross-check and repeat. The RLS Tester in the Dashboard runs SELECT queries as any role, including a user who is not signed in, and shows which policies apply. It was announced as a feature preview on 24 April 2026 and, according to the announcement, supports only SELECT for now (announcement). The checks become repeatable as pgTAP tests with supabase test db; the documentation tests there with set local role anon and set local role authenticated (Row Level Security).

What the test does not show: access between signed-in accounts and tenants, flaws in business logic, the code of Edge Functions, Realtime channels and Auth settings. For these, use the two-account test in Audit Supabase RLS, the component table above and a review with test accounts per role. For this article, the self-test was compiled from the documentation of Supabase, PostgreSQL and PostgREST. Neither the queries nor the HTTP steps were run against a Supabase project: the SQL queries ran against PostgreSQL 16, and we compared their results with requests to PostgREST (details under Status and methodology).

What does the Supabase Security Advisor do?

According to Supabase, advisors are deterministic checks that ship with the platform. They run in the Dashboard (Security Advisor), through the CLI (supabase db advisors), through MCP and through the Management API (Advisors). Supabase points out that individual findings may be intentional and have to be checked against the access model. A selection of the checks with a security focus:

Lint Level Message according to the documentation
0013 rls_disabled_in_public ERROR Table publicly accessible: RLS is not enabled
0010 security_definer_view ERROR View bypasses row level security
0015 rls_references_user_metadata ERROR Policy relies on user_metadata, which users can change
0024 permissive_rls_policy WARN Policy with an always-true condition such as USING (true)
0025 public_bucket_allows_listing WARN Public bucket with a broad SELECT policy, contents listable
0028 anon_security_definer_function_executable WARN SECURITY DEFINER function callable without signing in
0012 auth_allow_anonymous_sign_ins INFO Anonymous sign-ins enabled, policies may include them unintentionally

The list is an excerpt, and the documentation lists further checks. Whether a view reported by lint 0010 actually bypasses RLS depends on its owner (typical findings). The list contains no check of the code of Edge Functions, and in our assessment a fixed set of checks cannot settle whether a policy fits the business logic of an application. An Advisor without findings therefore only says that these checks found nothing.

Is Supabase GDPR compliant? Region, DPA and SOC 2 (technical facts)

This section is not legal advice. It states the technical information from Supabase that your data protection adviser needs as input.

Topic What Supabase documents What to clarify
Location Each project runs in one primary region, where the primary Postgres database, the Auth service and the storage objects are located. A specific EU region pins these services to exactly that AWS region, while the general region Europe also includes London and Zurich, which are not EU member states (GDPR compliance, Regions). The list of specific regions includes, among others, Ireland, Paris, Frankfurt and Stockholm Which region does the project have, and is the general region Europe sufficient? A region change is described in the article Migrate a Supabase project to another region or organisation
Limits of the region choice According to Supabase, choosing a region is a data-location control, not proof of compliance. Backups, logs, exported data, the execution of Edge Functions and sub-processors can affect data residency and international transfers (GDPR compliance) Record data flows, including email dispatch, payment providers and AI functions
Data processing For a formal data processing agreement, Supabase provides a Data Processing Agreement (DPA) Which agreement applies to your plan and your use?
SOC 2 Supabase states that it is SOC 2 Type 2 compliant and assessed annually; according to Supabase, the compliance does not transfer to environments outside the Supabase product (SOC 2) Request the report, read the boundary of responsibility, implement your own controls
Responsibility According to Supabase, building a compliant application is a shared responsibility: Supabase secures the infrastructure, the operator is responsible for processing activities, consent flows and access controls Legal basis, information duties and further obligations have to be assessed legally

With self-hosted Supabase, location and operations are in your hands, see Supabase hosting and Supabase Cloud vs self-hosted.

May I have a Supabase project pentested?

Yes, on your own project. According to the Supabase policy, customers may carry out security assessments and penetration tests of the hosted components of their project without prior approval. Permitted are Authentication, Database, Edge Functions, Storage and Realtime as well as the addresses https://<project-ref>.supabase.co/* and https://db.<project-ref>.supabase.co/*. Not permitted are:

  • DoS and DDoS tests,
  • cross-tenant attacks that affect accounts, organizations and projects of other Supabase customers,
  • request flooding,
  • any activity that violates the Acceptable Use Policy of Supabase.

The test stays limited to services within your own project. Vulnerabilities found directly in a Supabase product are, according to the terms, to be reported to Supabase Security within 24 hours of completing the test.

The self-test asks without signing in. A pentest with test accounts per role additionally checks whether one account can reach the data of another account or tenant, how functions and business logic behave and whether rights can be bypassed. In our assessment it makes sense before go-live and after significant changes to sign-in, roles, functions or data access. On the difference between pentest and vulnerability scan see Pentest vs vulnerability scan, on the interval How often should you run a penetration test.

Our approach at WZ-IT

For applications with a Supabase backend we review row level security, keys, storage and Edge Functions as well as access between accounts and tenants through the automatically generated API. The offer page Have your Supabase security checked describes the scope. The audit reads code, configuration and data access and separates what has to be fixed before go-live from what can wait. The pentest runs like this:

  1. Handover: you hand over the source code, a running test instance and test accounts per role and tenant, at least two accounts of equal rank.
  2. Ownership check: we verify ownership of the target.
  3. Inventory: we record the routes of the application in an inventory.
  4. Attack: the attacks run against the test instance in an isolated test environment, never against the production system.
  5. Proof: confirmed findings come with proof. Every finding carries one of four states: confirmed, refuted, suspicion without confirmation, or not tested.
  6. Manual review: the team reviews severe confirmed findings by hand.
  7. Report: the report contains a coverage table that shows what was tested and what was not.

The runtime view of the routes is currently available for Express (Node.js). Source code analysis, dependencies, secrets and the attacks on the test instance are not tied to a framework. Whether your framework fits is clarified before the offer. This sequence describes the WZ-IT offer and is not a statement by the cited sources.

The one-off pentest costs €1,000 (small), €1,500 (medium) or €2,000 (large) excl. VAT, as a fixed price by size of the application. Anyone who wants to test regularly uses the pentest subscription, quarterly or monthly. The subscription costs, excl. VAT per year, €2,500 (small), €3,750 (medium) or €5,000 (large) with quarterly tests and €4,000 (small), €6,000 (medium) or €8,000 (large) with monthly tests. On request we fix the findings and take over hosting and operations.

Common misconceptions

Misconception Correct Source
The Supabase key in the browser code is a leak. The publishable key and the project URL are meant for the browser, and protection comes from grants and RLS. A secret or service_role key in the browser would be a leak. API keys
RLS is off by default in Supabase. For tables from the Dashboard RLS is on by default, for tables from the SQL Editor, migrations and other tools not automatically. Securing your API, Security Retro 2025
RLS is enabled, so the data is protected. Grants and policies have to fit together. using (true) opens the table. RLS is also bypassed: by views and SECURITY DEFINER functions if their owner has BYPASSRLS, is a superuser or owns the table without FORCE ROW LEVEL SECURITY (for views this does not apply with security_invoker = true), and by a secret key as long as the request carries no user token. Row Level Security, Advisors
The secret key is protected because Supabase rejects it in the browser with 401. The block concerns the browser. According to Supabase an attacker can use the key from other tools, and a leaked key is rotated. API keys
An Edge Function with verify_jwt is protected. For migration compatibility, verify_jwt also accepts publishable and secret keys on the apikey header. The check alone does not authenticate a caller that sends only an API key. Authorization headers
A public bucket is only readable if you know the URL. Anyone who knows the URL reads the file. A broad SELECT policy additionally makes the contents listable (lint 0025). Storage Buckets, Advisors
The new defaults close my old tables. The change concerns new objects. Existing tables keep their privileges and stay reachable. Changelog
Supabase is SOC 2 compliant, so my app is too. According to Supabase, the compliance does not transfer to environments outside the Supabase product. SOC 2

Status and methodology

Research status: 22 November 2026. The Supabase documentation pages were retrieved on that date in the Markdown version of the pages and the quoted passages compared with their wording, as were the changelog entries, the blog of 7 January 2026, the policy on security testing and the pages of PostgreSQL, PostgREST and OWASP. We do not use comments by third parties in the discussions in the Supabase GitHub repository, posts by providers of security testing or studies on open databases as evidence, and reports on individual incidents are not included.

Dates in the documentation and in changelog entries are announcements by Supabase. Whether and when a change applies to an individual project, we have not determined. For the date 30 October 2026 the source conflict described above exists. We have not verified vendor statements such as SOC 2 Type 2 or the statements of Lovable. The assignment of the checkpoints to the columns of the component table, the notes marked "WZ-IT assessment" and the delimitation of self-test and pentest are our classification. We ran the SQL queries of the self-test against PostgreSQL 16, in a test database with re-created roles anon, authenticated and service_role (with BYPASSRLS) and with owner roles with and without BYPASSRLS. The setup contained tables with and without RLS, tables with a table-wide privilege, with SELECT on every column individually and with privileges on individual columns, a schema without USAGE for anon, views (owner with BYPASSRLS, superuser, owner without BYPASSRLS, security_invoker with true, on, 1 and false, owner of a table with and without FORCE ROW LEVEL SECURITY), a materialized view, functions, a procedure, an aggregate, a trigger function and column names with spaces and special characters. PostgREST 12.2.0 and 14.6 ran against the same test database: for all re-created objects, the outcome of select=* matched anon_schema_usage and anon_select_all_columns, the function list from step 4 matched the /rpc routes that were offered, and the column list from step 3 was also accepted with a quotation mark and a backslash in a column name. A service_role with BYPASSRLS received a permission error on a table without a table privilege. The test script is not part of this article. This setup does not fully reproduce the default privileges and roles of a Supabase project. The requests of step 3 and the query of the /rpc routes for step 4 ran against PostgREST and not against a Supabase project; the storage listing was checked against the documentation and not run. The Supabase documentation changes frequently, so check names and menu paths against the current state before implementing.

The Supabase documentation is not consistent on the secret key (as of 22 November 2026): the API keys page states that policies never apply to a secret key, while the Row Level Security page describes that with an additional user token that user's policies apply. We have not tested this against a Supabase project. Our recommendation: treat the secret key as if it bypassed RLS in every case.

Further guides

Have your Supabase backend checked before go-live: we review access rules, keys, storage and functions, prove confirmed findings and fix them on request. Have your Supabase security checked · Book an intro call

Sources

Enquiry

Have your application assessed

Describe the application, roles and baseline. We assess whether an audit, a pentest or both fits, and state the price.

  • You speak directly with Timo and Robin, who are technically responsible
  • A professional assessment of your situation
  • Concrete next steps for infrastructure, software or AI

The conversation is free and non-binding.

I got to know Timo and Robin as dedicated and professional partners who make a lot of things possible for their clients that initially seem impossible. I felt very well advised. The services offered have thoroughly convinced me. (translated)
Andrea PawlowskiCommunications Manager, Golem.de, Germany
Timo and Robin, founders of WZ-IT

Have your application assessed

I got to know Timo and Robin as dedicated and professional partners who make a lot of things possible for their clients that initially seem impossible. I felt very well advised. The services offered have thoroughly convinced me. (translated)
Andrea PawlowskiCommunications Manager, Golem.de, Germany

Frequently Asked Questions

Answers to the most important questions

Customers from mid-sized business, industry and the public sector, in Germany and internationally

  • Stadtwerke Brühl
  • DGHO e.V.
  • solarwerkstatt berlin
  • Krüger Dirndl
  • ABCO Water Systems
  • Golem.de
  • EVADXB
  • nextGYM
  • AInergy
  • ml&s
  • Odiseo Solutions
  • Annota
  • ARGE
  • SweetConnect GmbH
  • Aphy AG
  • CORGOS
  • Rekorder
  • SolidProof
  • Yonju
  • Keymate
  • Paritel
  • Mr. Clipart
  • Millenium
  • Negosh
  • Führerscheinmacher
  • BTI
  • Deutsche Gesellschaft für Datenschutz
Read client reviews