Decloak is an AI-powered web security intelligence platform that scans a site's HTTP/TLS posture, JavaScript, and third-party scripts to produce a report anyone can read. This guide is part of Decloak's library of practical, source-backed security guidance.
In this guide
- Key takeaways
- Is an outdated Supabase Auth version exposing my users to account takeover?
- Does leaving Row Level Security disabled on new tables put my data at risk?
- Can an exposed `service_role` key give an attacker full database control?
- Are security - definer RPC functions a backdoor for unauthenticated users?
- Should I disable the auto - generated Data API for legacy projects?
- How do I secure self - hosted or one - click Supabase templates?
- Comparison of common Supabase misconfigurations
- How can Decloak help you detect these Supabase issues?
- What are the next steps after fixing the findings?
Key takeaways
- Upgrade Supabase Auth to v2.185.0 or later to close the OIDC token bypass.
- Enable Row Level Security (RLS) on every table; the default is still off for many legacy projects.
- Never ship the
service_roleJWT to client - side code; rotate it immediately if exposed. - Audit all
SECURITY DEFINERRPC functions and restrict them to authenticated roles. - Disable the auto - generated Data API or protect it with strict RLS policies.
- Harden self - hosted templates by changing default PostgreSQL passwords and binding ports to localhost.
Is an outdated Supabase Auth version exposing my users to account takeover?
Yes. Versions of supabase/auth (GoTrue) earlier than 2.185.0 allow crafted OIDC ID tokens to bypass authentication and create full sessions for any email address. The vulnerability (CVE - 2026 - 31813) is medium severity but grants complete account takeover.
Remediation steps:
- Update the Auth package to v2.185.0 or later.
- Enable multi - factor authentication (MFA) for all users.
- Review the
identitiestable for unexpectedissvalues that may indicate malicious tokens. - If you cannot patch immediately, disable Apple and Azure providers in the Auth settings.
Does leaving Row Level Security disabled on new tables put my data at risk?
Yes. When RLS is off, the public anon key can read or write any row through Supabase’s auto - generated REST API. The issue (CVE - 2025 - 48757) is rated critical (CVSS 9.3) and has exposed resumes, passwords, and payment data in real - world incidents.
Remediation steps:
-- List tables without RLS
SELECT tablename FROM pg_tables WHERE schemaname='public' AND NOT rowsecurity;
-- Enable RLS on each table
ALTER TABLE my_table ENABLE ROW LEVEL SECURITY;
-- Example policy that limits access to the owner
CREATE POLICY owner_policy ON my_table USING (auth.uid() = user_id);
Apply the ALTER TABLE … ENABLE ROW LEVEL SECURITY; command to every table, then create owner - scoped policies.
Can an exposed service_role key give an attacker full database control?
Yes. The service_role JWT bypasses all RLS checks. If it appears in client - side bundles or public repositories, anyone can issue unrestricted SELECT/INSERT/UPDATE/DELETE queries.
Remediation steps:
- Remove the key from all front - end code and public repos.
- Store it only in secure server - side environments (Edge Functions, backend services).
- Rotate the key immediately via the Supabase dashboard.
- Enable the Supabase Security Advisor alerts for "exposed service_role" findings.
Are security - definer RPC functions a backdoor for unauthenticated users?
Yes. Functions marked SECURITY DEFINER run with the owner’s privileges and ignore RLS. Several templates (Cap - go, others) expose such functions to the anon role, allowing enumeration, data insertion, or credential checks (e.g., CVE - 2026 - 56245, GHSA - 7r6g - whg3 - 5mm4).
Remediation steps:
-- Find all security - definer functions
SELECT proname FROM pg_proc WHERE prosecdef = true;
-- Revoke public execution rights
REVOKE ALL ON FUNCTION public.get_user_id(text) FROM anon;
REVOKE ALL ON FUNCTION public.record_build_time() FROM anon;
Replace SECURITY DEFINER with normal ownership or add explicit auth checks inside the function. Limit EXECUTE rights to authenticated roles only.
Should I disable the auto - generated Data API for legacy projects?
Yes. The Data API is enabled by default and will expose every table unless RLS blocks it. Projects that never disabled the Data API remain vulnerable even after RLS is enabled on some tables.
Remediation steps:
- Open the Supabase project settings.
- Turn off the Data API if you do not need the public REST endpoint.
- If you must keep it, verify that RLS is enabled on all tables and that policies deny access for the
anonrole.
How do I secure self - hosted or one - click Supabase templates?
The one - click Docker template publishes PostgreSQL on 0.0.0.0:5432 with the default password postgres (CVE - 2026 - 16503). This allows anyone on the internet to connect as a super - user.
Remediation steps:
- Change the PostgreSQL super - user password in the
.envfile before starting the container. - Bind the database port to
127.0.0.1or remove the host - port mapping entirely. - Add firewall rules (UFW, iptables) to restrict external access to the database port.
- Regularly scan the container image for known vulnerabilities.
Comparison of common Supabase misconfigurations
| Misconfiguration | Impact | Typical Fix |
|---|---|---|
| RLS disabled on tables | Full data read/write via anon key (critical) | ALTER TABLE <tbl> ENABLE ROW LEVEL SECURITY; and add policies |
Exposed service_role key | Unrestricted DB access (critical) | Keep key server - side only, rotate immediately |
Security - definer RPC exposed to anon | Bypass RLS, enumeration or data injection (high) | Revoke EXECUTE from anon, add auth checks |
| Data API left enabled without RLS | Public REST endpoint leaks data (high) | Disable Data API or enforce RLS on all tables |
| Default Postgres password on Docker template | Remote root access to DB (critical) | Change password, bind port to localhost, firewall |
How can Decloak help you detect these Supabase issues?
Decloak’s free scan runs eight core layers in about 15 seconds. Layer 7 (vibe - coded platform security) specifically fingerprints Supabase projects and checks for the most common real - world misconfigurations, including:
- Publicly readable tables with RLS disabled.
- Exposed
service_rolekeys in client - side bundles. - insecure
SECURITY DEFINERRPC functions. When such findings are detected, the report shows the table name, row count, and field names (no actual data) or the exact RPC that is exposed, giving you provable evidence to remediate.
What are the next steps after fixing the findings?
- Re - run a Decloak free scan to confirm the issues are resolved.
- Enable the Supabase Security Advisor alerts for continuous monitoring.
- Integrate Decloak’s REST API (
POST /api/v1/scans) into your CI pipeline to catch regressions early. - For larger teams, consider a Starter plan to get DNS/TLS analysis and subdomain takeover detection, which can surface additional exposure vectors.
All technical details are derived from publicly disclosed CVEs, vendor advisories, and security research published between 2025 - 2026.
Related guides
What is NIST in cybersecurity and why should you care?
NIST is the U.S. agency that creates the Cybersecurity Framework and a suite of standards like SP 800 - 53 that guide risk management for both government and private organizations.
Which NIST Cybersecurity Standards Should My Organization Adopt in 2024 - 2025?
Learn the core NIST publications that form a practical, layered security program, how they map together, and concrete steps to start using them today.
Does the EU AI Act apply to U.S. companies?
Yes - the EU AI Act has extraterritorial reach and can bind U.S. AI providers, deployers, importers or distributors whenever their systems are placed on the EU market, used by an EU entity, or produce output that is used in the Union.