{"id":156,"date":"2026-11-13T13:47:03","date_gmt":"2026-11-13T08:17:03","guid":{"rendered":"https:\/\/nomorebreach.com\/blog\/?p=156"},"modified":"2026-11-14T12:33:16","modified_gmt":"2026-11-14T07:03:16","slug":"postgres-rls-multi-tenant","status":"publish","type":"post","link":"https:\/\/nomorebreach.com\/blog\/postgres-rls-multi-tenant\/","title":{"rendered":"Multi-Tenant Postgres Row Level Security: 7 Ways Around It"},"content":{"rendered":"<p><!-- WordPress post body. Title\/category\/tags are passed on the command line. --><\/p>\n<p>We wrote one Postgres row level security policy, checked it was right, and never touched it again. Then we let a normal logged-in user from tenant B try to read tenant A&#8217;s data. He got it seven different ways. None of them involved breaking the policy.<\/p>\n<p>If you use Postgres row level security for multi-tenant isolation, this is where we&#8217;d look first. It&#8217;s a lab we built on purpose to fail, so these are mechanisms, not a count of how often each mistake happens in the wild. Below are the raw requests, the one-line fixes, and a catalog query that flagged five of the seven.<\/p>\n<div class=\"key-takeaways\">\n<p><strong>Key takeaways<\/strong><\/p>\n<ul>\n<li>The policy held every time. Isolation failed around it: the role the app connects as, how tenant context reaches a pooled connection, views and SECURITY DEFINER functions, a table with no RLS, and a unique constraint.<\/li>\n<li>The worst one was a pool leak. In three bursts of 200 concurrent requests, 33, 95 and 103 responses carried the other tenant&#8217;s rows. After the fix it was 0 in all three.<\/li>\n<li>Each route closed with a one-line fix. A read-only audit query caught five of the seven from catalog data alone. The other two need a code review and a two-tenant test.<\/li>\n<\/ul>\n<\/div>\n<h2>The lab: one app, two tenants, one policy we never changed<\/h2>\n<p>The app is a small notes API: Express 5.3.0, node-postgres 8.23.1 and PostgreSQL 18.6, all on 127.0.0.1. Two tenants. Acme has alice, 3 notes and 2 attachments. Globex has bob, 2 notes and 1 attachment. Bob is the attacker in every test: a normal authenticated Globex user with his own valid API key.<\/p>\n<p>The policy on <code>notes<\/code> is the textbook one, and we never edited it:<\/p>\n<pre><code>CREATE POLICY tenant_isolation ON notes\n  USING      (tenant_id = current_setting('app.tenant_id', true)::int)\n  WITH CHECK (tenant_id = current_setting('app.tenant_id', true)::int);<\/code><\/pre>\n<p>Two roles matter. <code>app_owner<\/code> runs migrations and owns every object. <code>app_user<\/code> has DML grants only. Both are NOSUPERUSER and NOBYPASSRLS. Every test started from a fresh database. As a baseline, <code>count(*)<\/code> on <code>notes<\/code> as <code>app_user<\/code> with no tenant set is 0. As <code>app_owner<\/code> it&#8217;s 5. Hold onto that second number.<\/p>\n<table>\n<thead>\n<tr>\n<th>ID<\/th>\n<th>Mistake around the policy<\/th>\n<th>What bob got<\/th>\n<th>Fix<\/th>\n<th>After<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>L0<\/td>\n<td><code>attachments<\/code> table added later, RLS never enabled<\/td>\n<td>3 attachments incl. <code>acme-cap-table.xlsx<\/code><\/td>\n<td>enable RLS + policy<\/td>\n<td>1 (his own)<\/td>\n<\/tr>\n<tr>\n<td>L1<\/td>\n<td>App connects as the table owner, RLS not forced<\/td>\n<td>5 notes (3 Acme)<\/td>\n<td><code>FORCE ROW LEVEL SECURITY<\/code><\/td>\n<td>2 (his own)<\/td>\n<\/tr>\n<tr>\n<td>L2<\/td>\n<td>App connects as a superuser<\/td>\n<td>5 notes, even with FORCE on<\/td>\n<td>connect as <code>app_user<\/code><\/td>\n<td>2<\/td>\n<\/tr>\n<tr>\n<td>L3<\/td>\n<td>Tenant set at session level on a connection pool<\/td>\n<td>33, 95, 103 of 200 responses held the other tenant&#8217;s rows<\/td>\n<td>transaction-local setting<\/td>\n<td>0, 0, 0 of 200<\/td>\n<\/tr>\n<tr>\n<td>L4<\/td>\n<td>Reporting view owned by the table owner<\/td>\n<td>Acme&#8217;s row: 3 notes, latest title &#8220;Acme Q4 board deck&#8221;<\/td>\n<td><code>security_invoker = true<\/code><\/td>\n<td>Globex row only<\/td>\n<\/tr>\n<tr>\n<td>L5<\/td>\n<td>SECURITY DEFINER search function<\/td>\n<td>all 3 Acme titles for <code>?q=acme<\/code><\/td>\n<td><code>SECURITY INVOKER<\/code><\/td>\n<td><code>[]<\/code><\/td>\n<\/tr>\n<tr>\n<td>L6<\/td>\n<td>Globally unique <code>slug<\/code><\/td>\n<td>409 for an Acme slug, 201 for a made-up one<\/td>\n<td><code>UNIQUE (tenant_id, slug)<\/code><\/td>\n<td>201 for both<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Seven routes tried, seven reproduced, seven closed by the listed fix with a positive control still working. Bob still saw his own rows every time.<\/p>\n<h2>L1 and L2: the role you connect as decides whether RLS exists<\/h2>\n<p>According to the <a href=\"https:\/\/www.postgresql.org\/docs\/current\/ddl-rowsecurity.html\">PostgreSQL docs<\/a>, superusers and roles with BYPASSRLS always skip row security. Table owners skip it too, unless the table has <code>FORCE ROW LEVEL SECURITY<\/code>.<\/p>\n<p>In L1 the app connected as <code>app_owner<\/code>, the migration role. This is the usual way in: one <code>DATABASE_URL<\/code> for migrations and for the app. The catalog showed the table was set up exactly as most tutorials say:<\/p>\n<pre><code>relname | relrowsecurity | relforcerowsecurity | owner\nnotes   | true           | false               | app_owner<\/code><\/pre>\n<p>Bob listed his notes and got all five, three of them Acme&#8217;s:<\/p>\n<pre><code>$ curl -s http:\/\/127.0.0.1:5301\/api\/notes -H \"Authorization: Bearer $BOB_KEY\"\nHTTP 200\n{\"you\": \"<span \n                data-original-string='y4KumBrLwCdwix4apePmfQ==b3dGIlgWVIFOGMgqQ9HrZeiNg=='\n                class='apbct-email-encoder'\n                title='This contact has been encoded by Anti-Spam by CleanTalk. Click to decode. To finish the decoding make sure that JavaScript is enabled in your browser.'>bo<span class=\"apbct-blur\">*<\/span>@<span class=\"apbct-blur\">****<\/span>ex.test<\/span> (tenant 2)\",\n \"notes\": [{\"id\":1,\"tenant_id\":1,\"title\":\"Acme Q4 board deck\"},\n           {\"id\":2,\"tenant_id\":1,\"title\":\"Acme layoff plan\"},\n           {\"id\":3,\"tenant_id\":1,\"title\":\"Acme pentest findings\"},\n           {\"id\":4,\"tenant_id\":2,\"title\":\"Globex roadmap\"},\n           {\"id\":5,\"tenant_id\":2,\"title\":\"Globex pricing draft\"}]}<\/code><\/pre>\n<p>Same role, one statement later:<\/p>\n<pre><code>ALTER TABLE notes FORCE ROW LEVEL SECURITY;<\/code><\/pre>\n<p>Bob got his two notes. But FORCE doesn&#8217;t bind everyone. In L2 we left FORCE on and connected the app as <code>postgres<\/code>, where <code>rolsuper<\/code> and <code>rolbypassrls<\/code> are both true. Bob got all five again. The fix was the connection string: <code>app_user<\/code>. The <a href=\"https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Multi_Tenant_Security_Cheat_Sheet.html\">OWASP Multi-Tenant Application Security Cheat Sheet<\/a> says the same thing: FORCE doesn&#8217;t constrain a superuser or BYPASSRLS role, so don&#8217;t serve tenant-scoped requests through a privileged connection.<\/p>\n<p>A related note on Supabase. Its <a href=\"https:\/\/supabase.com\/docs\/guides\/database\/postgres\/row-level-security\">docs<\/a> say the secret key acts through the <code>service_role<\/code> role, which has <code>bypassrls<\/code>, and skips RLS when the request carries no user token. We didn&#8217;t test any Supabase project. We&#8217;d just keep that key off any path that serves end users.<\/p>\n<h2>L3: the pooled connection that remembered the last tenant<\/h2>\n<p>This is the one we&#8217;d fix first. Here&#8217;s the bug, from the lab&#8217;s <code>app.js<\/code>:<\/p>\n<pre><code>await pool.query(\"SELECT set_config('app.tenant_id', $1, false)\", [String(tenantId)]);\nreturn pool.query(text, params);<\/code><\/pre>\n<p>It looks fine. It isn&#8217;t, for two reasons. The <code>false<\/code> means the setting lasts for the rest of the session, according to the <a href=\"https:\/\/www.postgresql.org\/docs\/current\/functions-admin.html\">Postgres docs<\/a>. And two separate <code>pool.query<\/code> calls can land on different pooled connections. The <a href=\"https:\/\/node-postgres.com\/features\/transactions\">node-postgres docs<\/a> say to use one client for every statement in a transaction, and not to use transactions with <code>pool.query<\/code>.<\/p>\n<p>So a connection that last served Acme can serve the next request, from Globex, with Acme&#8217;s tenant still set. We fired 200 concurrent <code>GET \/api\/notes<\/code> requests, 100 from alice and 100 from bob, interleaved, and counted responses holding the other tenant&#8217;s rows. We did it three times:<\/p>\n<pre><code>burst 1: 200 requests, 167 correct, other_tenant_rows: 33\nburst 2: 200 requests, 105 correct, other_tenant_rows: 95\nburst 3: 200 requests,  97 correct, other_tenant_rows: 103<\/code><\/pre>\n<p>One of bob&#8217;s leaked responses:<\/p>\n<pre><code>HTTP 200\n{\"you\": \"<span \n                data-original-string='NnkZRQBLyjBXr8lhTLqt0w==b3d3Hs1tTenkyHA5FrOiY0VOQ=='\n                class='apbct-email-encoder'\n                title='This contact has been encoded by Anti-Spam by CleanTalk. Click to decode. To finish the decoding make sure that JavaScript is enabled in your browser.'>bo<span class=\"apbct-blur\">*<\/span>@<span class=\"apbct-blur\">****<\/span>ex.test<\/span> (tenant 2)\",\n \"notes\": [{\"id\":1,\"tenant_id\":1,\"title\":\"Acme Q4 board deck\"},\n           {\"id\":2,\"tenant_id\":1,\"title\":\"Acme layoff plan\"},\n           {\"id\":3,\"tenant_id\":1,\"title\":\"Acme pentest findings\"}]}<\/code><\/pre>\n<p>HTTP 200, no error. The number moves from run to run (33 to 103 across three bursts), so don&#8217;t read it as a rate you&#8217;d see in production. Any non-zero count is the finding.<\/p>\n<p>The variant is odder. After one alice request, an unauthenticated <code>GET \/api\/status<\/code> reported <code>\"visible_notes\": 3<\/code>. The developer expected 0. A request with no identity at all inherited Acme&#8217;s context.<\/p>\n<p>The fix is boring. One client, one transaction, and a setting that dies with it:<\/p>\n<pre><code>async function asTenant(tenantId, sql, params = []) {\n  const client = await pool.connect();          \/\/ one connection for the whole unit of work\n  try {\n    await client.query('BEGIN');\n    await client.query(\"SELECT set_config('app.tenant_id', $1, true)\", [String(tenantId)]); \/\/ true = this transaction only\n    const result = await client.query(sql, params);\n    await client.query('COMMIT');\n    return result;\n  } catch (err) {\n    await client.query('ROLLBACK');\n    throw err;\n  } finally {\n    client.release();\n  }\n}<\/code><\/pre>\n<p>Same three bursts after the fix: 0, 0 and 0 of 200. The OWASP cheat sheet recommends exactly this: scope tenant context to the transaction and never assume a borrowed connection has the right setting. <a href=\"https:\/\/www.pgbouncer.org\/features.html\">PgBouncer&#8217;s feature table<\/a> lists <code>SET<\/code> and <code>RESET<\/code> as unsupported in transaction pooling mode, so the same reasoning applies there. We didn&#8217;t test PgBouncer.<\/p>\n<h3>The 500 the fix introduced<\/h3>\n<p>After the fix, the same unauthenticated <code>\/api\/status<\/code> call returned this:<\/p>\n<pre><code>HTTP 500\n{\"error\": \"invalid input syntax for type integer: \\\"\\\"\"}<\/code><\/pre>\n<p>A custom setting that was never set reads as NULL. After a transaction-local <code>set_config<\/code> has run on a connection, it reads as an empty string, not NULL. <code>''::int<\/code> throws. That fails closed, which is good, but it echoes a database error to the client. Wrapping the value in <code>nullif<\/code> makes the policy return zero rows instead:<\/p>\n<pre><code>ALTER POLICY tenant_isolation ON notes\n  USING      (tenant_id = nullif(current_setting('app.tenant_id', true), '')::int)\n  WITH CHECK (tenant_id = nullif(current_setting('app.tenant_id', true), '')::int);<\/code><\/pre>\n<h2>L4 and L5: views and SECURITY DEFINER functions run as their owner<\/h2>\n<p>By default, a view reads its base tables with the view owner&#8217;s permissions, and if RLS is on, the owner&#8217;s policies apply. That&#8217;s from the <a href=\"https:\/\/www.postgresql.org\/docs\/current\/sql-createview.html\">CREATE VIEW docs<\/a>. Setting <code>security_invoker = true<\/code> switches to the caller, and it arrived in <a href=\"https:\/\/www.postgresql.org\/docs\/release\/15.0\/\">PostgreSQL 15<\/a>.<\/p>\n<p>Our migration role created a reporting view, <code>notes_summary<\/code>. Bob called the endpoint that reads it:<\/p>\n<pre><code>GET \/api\/notes\/summary\n{\"summary\": [{\"tenant_id\":1,\"notes\":\"3\",\"latest_title\":\"Acme Q4 board deck\"},\n             {\"tenant_id\":2,\"notes\":\"2\",\"latest_title\":\"Globex roadmap\"}]}<\/code><\/pre>\n<p>One statement fixed it:<\/p>\n<pre><code>ALTER VIEW notes_summary SET (security_invoker = true);<\/code><\/pre>\n<p>After that, bob saw only the Globex row.<\/p>\n<p>L5 is the same idea in a function. We wrote a search helper &#8220;so it can read the index&#8221;, declared <code>SECURITY DEFINER<\/code>, owned by <code>app_owner<\/code>:<\/p>\n<pre><code>CREATE FUNCTION search_notes(q text) RETURNS TABLE (id int, tenant_id int, title text)\n  LANGUAGE sql STABLE SECURITY DEFINER SET search_path = public AS\n  $$ SELECT id, tenant_id, title FROM notes WHERE title ILIKE '%' || q || '%' $$;<\/code><\/pre>\n<p>Bob searched for <code>acme<\/code> and got all three Acme titles back. Note the <code>SET search_path = public<\/code>. We pinned it, as the <a href=\"https:\/\/www.postgresql.org\/docs\/current\/sql-createfunction.html\">CREATE FUNCTION docs<\/a> advise for SECURITY DEFINER, and it still leaked. A pinned search_path protects against hijacking. It does nothing about a function that reads every tenant.<\/p>\n<pre><code>ALTER FUNCTION search_notes(text) SECURITY INVOKER;<\/code><\/pre>\n<p>After that, <code>?q=acme<\/code> returned <code>[]<\/code> and <code>?q=globex<\/code> still returned his two notes. If a function really must be DEFINER, filter by tenant inside it, explicitly. The Supabase docs flag both patterns: views bypass RLS by default because they&#8217;re usually created by <code>postgres<\/code>, and DEFINER functions in an exposed schema can be called through the Data API with the creator&#8217;s privileges.<\/p>\n<p>Views and DEFINER functions aren&#8217;t insecure. They run as their owner by design. The mistake is using them on tenant data without a tenant filter.<\/p>\n<h2>L0 and L6: the table nobody enabled RLS on, and the 409 that answers a question<\/h2>\n<p>L0 is the dull one. <code>attachments<\/code> arrived in a later migration. Someone wrote the table and the grants and forgot <code>ENABLE ROW LEVEL SECURITY<\/code>. Bob listed three attachments, including <code>acme-cap-table.xlsx<\/code> and <code>acme-soc2-bridge-letter.pdf<\/code>. Enable RLS, add the policy, and he saw one file, his own.<\/p>\n<p>L6 doesn&#8217;t read a row at all. The Postgres docs say unique, primary key and foreign key checks always bypass row security, and warn about covert channels. Our <code>slug<\/code> column was globally <code>UNIQUE<\/code>. Bob posted a note with a slug that exists in Acme:<\/p>\n<pre><code>$ curl -s -X POST http:\/\/127.0.0.1:5301\/api\/notes -H \"Authorization: Bearer $BOB_KEY\" \\\n    -H 'Content-Type: application\/json' -d '{\"slug\":\"acme-layoff-plan\",\"title\":\"x\",\"body\":\"x\"}'\nHTTP 409\n{\"error\": \"duplicate key value violates unique constraint \\\"notes_slug_key\\\"\"}<\/code><\/pre>\n<p>Then one that doesn&#8217;t exist:<\/p>\n<pre><code>-d '{\"slug\":\"acme-ipo-plan\",\"title\":\"x\",\"body\":\"x\"}'\nHTTP 201\n{\"id\": 7, \"slug\": \"acme-ipo-plan\"}<\/code><\/pre>\n<p>409 versus 201 answers &#8220;does Acme have a layoff plan note?&#8221; without returning a single row. To be precise, Postgres didn&#8217;t hand the key value back to <code>app_user<\/code> here. It returned the constraint name only. The status code was enough. Also note probe 2 created a real row in bob&#8217;s tenant, so an oracle like this writes data as it asks.<\/p>\n<p>A generic error message won&#8217;t fix this, because the signal is the 409 itself. The fix is a per-tenant constraint:<\/p>\n<pre><code>ALTER TABLE notes DROP CONSTRAINT notes_slug_key;\nALTER TABLE notes ADD CONSTRAINT notes_tenant_slug_key UNIQUE (tenant_id, slug);<\/code><\/pre>\n<p>The same slug request then returned 201. If you need global uniqueness for something like public URLs, add a random suffix instead.<\/p>\n<h2>Check your own database in one query<\/h2>\n<p>Five of the seven show up in catalog data. This query is read-only. Replace <code>app_user<\/code> with the role your app connects as:<\/p>\n<pre><code>SELECT 'table without RLS' AS finding, n.nspname || '.' || c.relname AS object\n  FROM pg_class c JOIN pg_namespace n ON n.oid = c.relnamespace\n WHERE c.relkind IN ('r','p') AND n.nspname NOT IN ('pg_catalog','information_schema') AND NOT c.relrowsecurity\nUNION ALL\nSELECT 'RLS on but not FORCEd (owner bypasses)', n.nspname || '.' || c.relname || ' owner=' || pg_get_userbyid(c.relowner)\n  FROM pg_class c JOIN pg_namespace n ON n.oid = c.relnamespace\n WHERE c.relrowsecurity AND NOT c.relforcerowsecurity\nUNION ALL\nSELECT 'role bypasses RLS', rolname || CASE WHEN rolsuper THEN ' (superuser)' ELSE ' (BYPASSRLS)' END\n  FROM pg_roles WHERE (rolsuper OR rolbypassrls) AND rolcanlogin\nUNION ALL\nSELECT 'view runs as owner (no security_invoker)', n.nspname || '.' || c.relname || ' owner=' || pg_get_userbyid(c.relowner)\n  FROM pg_class c JOIN pg_namespace n ON n.oid = c.relnamespace\n WHERE c.relkind = 'v' AND n.nspname NOT IN ('pg_catalog','information_schema')\n   AND NOT coalesce(c.reloptions @&gt; ARRAY['security_invoker=true'] OR c.reloptions @&gt; ARRAY['security_invoker=on'], false)\nUNION ALL\nSELECT 'SECURITY DEFINER function', p.oid::regprocedure::text || ' owner=' || pg_get_userbyid(p.proowner)\n  FROM pg_proc p JOIN pg_namespace n ON n.oid = p.pronamespace\n WHERE p.prosecdef AND n.nspname NOT IN ('pg_catalog','information_schema')\nUNION ALL\nSELECT 'app role owns an RLS table', c.relname\n  FROM pg_class c WHERE c.relrowsecurity AND pg_get_userbyid(c.relowner) = 'app_user'\nORDER BY 1, 2;<\/code><\/pre>\n<p>On the lab before any fixes it returned seven rows: <code>notes<\/code> not forced, the <code>postgres<\/code> superuser, <code>search_notes(text)<\/code>, <code>attachments<\/code>, <code>notes_summary<\/code>, and two lookup tables (<code>tenants<\/code>, <code>auth.api_keys<\/code>) that have no RLS on purpose. After the fixes only the superuser and those two lookup tables were left.<\/p>\n<p>The query lists expected objects too, so a human has to read it. It can&#8217;t see L3, because that bug lives in application code. It can&#8217;t see L6, because a unique constraint being global is a schema decision, not a catalog flag. Those two need a code review and a test.<\/p>\n<h2>Patch level matters too<\/h2>\n<p>One short note. PostgreSQL 18.7, 17.12, 16.16, 15.20 and 14.25 shipped on 12 November 2026. Per the Postgres security pages, they fix <a href=\"https:\/\/www.postgresql.org\/support\/security\/CVE-2026-120154\/\">CVE-2026-120154<\/a> (<code>INSERT ... ON CONFLICT<\/code> can read every row despite RLS for a user with INSERT, UPDATE and SELECT, CVSS 4.3) and <a href=\"https:\/\/www.postgresql.org\/support\/security\/CVE-2026-116311\/\">CVE-2026-116311<\/a> (<code>DROP OWNED<\/code> can remove restrictive RLS policies, CVSS 5.4). Our lab role has exactly the privilege set the first one describes, but we didn&#8217;t test either CVE. Our seven routes are configuration, not bugs. We also ran 18.6, not 18.7. According to the <a href=\"https:\/\/www.postgresql.org\/support\/versioning\/\">versioning policy<\/a>, 14 reached end of life with 14.25, and it has no <code>security_invoker<\/code> anyway.<\/p>\n<h2>Postgres row level security for multi-tenant apps: what to do, in order<\/h2>\n<ol>\n<li>Split the roles. Migrations run as the owner. The app runs as a NOSUPERUSER, NOBYPASSRLS role with DML grants only.<\/li>\n<li>Put <code>FORCE ROW LEVEL SECURITY<\/code> on every tenant table. Owner-run maintenance scripts will now see filtered rows, so run them as a dedicated role or set the context explicitly.<\/li>\n<li>Set tenant context per transaction: one client, <code>BEGIN<\/code>, <code>set_config(..., true)<\/code>, query, <code>COMMIT<\/code>. Use <code>nullif<\/code> so a missing value returns zero rows.<\/li>\n<li>Make views <code>security_invoker = true<\/code> and functions SECURITY INVOKER. Where DEFINER is needed, filter by tenant inside it. Invoker views need the caller to have grants on the base tables.<\/li>\n<li>Use <code>UNIQUE (tenant_id, slug)<\/code>, and random IDs for anything user-visible.<\/li>\n<li>Run the audit query in CI against a migrated test database and fail on new rows, with an allowlist for the intentional ones.<\/li>\n<li>Add a two-tenant test to your suite: a user from tenant B hits every endpoint and must see zero tenant A rows, including under concurrency.<\/li>\n<\/ol>\n<p>This is the same pattern we saw in our <a href=\"https:\/\/nomorebreach.com\/blog\/vibe-coding-security-pentest\/\">vibe-coding study<\/a>, flipped. There the authorization code held and the defaults around it didn&#8217;t. Here the policy holds and the database plumbing doesn&#8217;t. If you use Supabase JWT claims to carry the tenant, our <a href=\"https:\/\/nomorebreach.com\/blog\/jwt-vulnerabilities-6-mistakes-that-let-tokens-be-forged\/\">JWT mistakes post<\/a> covers what to check on the token side, and if tenants reach your data through an MCP server, our <a href=\"https:\/\/nomorebreach.com\/blog\/mcp-server-oauth-security\/\">MCP server OAuth security post<\/a> is relevant.<\/p>\n<h2>What we didn&#8217;t test<\/h2>\n<p>One app, one stack (Node and node-postgres). No other drivers or ORMs, no PgBouncer, no Supabase project. L3 depends on how the app sets context rather than on the driver, but we haven&#8217;t shown that on another stack. We didn&#8217;t test timing side channels, column-level exposure, materialized views or performance. And we wrote the vulnerable app ourselves, so this shows how each mistake works, not how often it appears in real codebases.<\/p>\n<h2>FAQ<\/h2>\n<h3>Does Postgres RLS apply to the table owner?<\/h3>\n<p>Not by default. Owners skip RLS unless the table has <code>FORCE ROW LEVEL SECURITY<\/code>. Superusers and BYPASSRLS roles skip it even then, so the role your app connects as matters as much as the policy. We saw both cases in the lab.<\/p>\n<h3>Is it safe to use SET for the tenant id with a connection pool?<\/h3>\n<p>Not at session level. The setting stays on the pooled connection after your request ends, and the next request inherits it. Use <code>set_config(..., true)<\/code> or <code>SET LOCAL<\/code> inside the same transaction, on the same client, as the query. We measured 33 to 103 leaked responses per 200 requests before the fix, and 0 after.<\/p>\n<h3>Can one tenant learn about another&#8217;s data with RLS on?<\/h3>\n<p>Yes, through unique and foreign key checks, which bypass RLS. Our 409 versus 201 test answered &#8220;does this exist?&#8221; for another tenant without returning a row. Make unique constraints per tenant, for example <code>UNIQUE (tenant_id, slug)<\/code>, so a duplicate in one tenant never depends on another.<\/p>\n<h3>Is RLS enough for tenant isolation?<\/h3>\n<p>It&#8217;s a strong backstop, not the whole design. OWASP still says to keep tenant-scoped requests on a least-privileged role and fail closed when context is missing. You also need application checks and a two-tenant test that runs on every build.<\/p>\n<h2>Want a human to try this on your app?<\/h2>\n<p>This is what our <a href=\"https:\/\/nomorebreach.com\/products.html\">web and API pentests<\/a> do: log in as one tenant and try to reach another&#8217;s data, through the policy and around it. Tenant isolation is a standard line on enterprise security questionnaires, and if SOC 2 is on your list, our <a href=\"https:\/\/nomorebreach.com\/blog\/does-soc-2-require-a-penetration-test-what-the-criteria-actually-say\/\">SOC 2 pentest guide<\/a> covers what auditors look for. Your policy is probably fine. Check what runs around it, or start with a <a href=\"https:\/\/nomorebreach.com\/#snapshot\">free external snapshot<\/a>, no access needed.<\/p>\n<p><em>Last updated 13 November 2026. Tested 13 November 2026 by the NoMoreBreach Team on PostgreSQL 18.6. All testing was on our own local lab. Keys and secrets are redacted.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>7 ways we got around one correct Postgres row level security policy in a multi-tenant lab: owners, pooled connections, views. Fixes and audit query.<\/p>\n","protected":false},"author":1,"featured_media":157,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[50],"tags":[42,80,78,79,81],"class_list":["post-156","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web-security","tag-appsec","tag-multi-tenant","tag-postgres","tag-rls","tag-saas-security"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Multi-Tenant Postgres Row Level Security: 7 Ways Around It - NoMoreBreach Insights<\/title>\n<meta name=\"description\" content=\"7 ways we got around one correct Postgres row level security policy in a multi-tenant lab: owners, pooled connections, views. Fixes and audit query.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/nomorebreach.com\/blog\/postgres-rls-multi-tenant\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Multi-Tenant Postgres Row Level Security: 7 Ways Around It - NoMoreBreach Insights\" \/>\n<meta property=\"og:description\" content=\"7 ways we got around one correct Postgres row level security policy in a multi-tenant lab: owners, pooled connections, views. Fixes and audit query.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/nomorebreach.com\/blog\/postgres-rls-multi-tenant\/\" \/>\n<meta property=\"og:site_name\" content=\"NoMoreBreach Insights\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-13T08:17:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-14T07:03:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/nomorebreach.com\/blog\/wp-content\/uploads\/2026\/11\/postgres-rls-multi-tenant.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"nomorebreachofficial\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@NoMoreBreachSec\" \/>\n<meta name=\"twitter:site\" content=\"@nomorebreach\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"nomorebreachofficial\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/postgres-rls-multi-tenant\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/postgres-rls-multi-tenant\\\/\"},\"author\":{\"name\":\"nomorebreachofficial\",\"@id\":\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/#\\\/schema\\\/person\\\/bb2410510214ded6aa0305e6ff04de94\"},\"headline\":\"Multi-Tenant Postgres Row Level Security: 7 Ways Around It\",\"datePublished\":\"2026-11-13T08:17:03+00:00\",\"dateModified\":\"2026-11-14T07:03:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/postgres-rls-multi-tenant\\\/\"},\"wordCount\":2250,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/postgres-rls-multi-tenant\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/postgres-rls-multi-tenant.png\",\"keywords\":[\"appsec\",\"multi-tenant\",\"postgres\",\"rls\",\"saas-security\"],\"articleSection\":[\"Web Security\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/postgres-rls-multi-tenant\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/postgres-rls-multi-tenant\\\/\",\"url\":\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/postgres-rls-multi-tenant\\\/\",\"name\":\"Multi-Tenant Postgres Row Level Security: 7 Ways Around It - NoMoreBreach Insights\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/postgres-rls-multi-tenant\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/postgres-rls-multi-tenant\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/postgres-rls-multi-tenant.png\",\"datePublished\":\"2026-11-13T08:17:03+00:00\",\"dateModified\":\"2026-11-14T07:03:16+00:00\",\"description\":\"7 ways we got around one correct Postgres row level security policy in a multi-tenant lab: owners, pooled connections, views. Fixes and audit query.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/postgres-rls-multi-tenant\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/postgres-rls-multi-tenant\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/postgres-rls-multi-tenant\\\/#primaryimage\",\"url\":\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/postgres-rls-multi-tenant.png\",\"contentUrl\":\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/postgres-rls-multi-tenant.png\",\"width\":1200,\"height\":630,\"caption\":\"Postgres row level security multi-tenant thumbnail: a correct policy with seven isolation gaps around it\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/postgres-rls-multi-tenant\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Multi-Tenant Postgres Row Level Security: 7 Ways Around It\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/\",\"name\":\"No More Breach Insights\",\"description\":\"Stop Threats Before They Start\",\"publisher\":{\"@id\":\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/#organization\",\"name\":\"No More Breach\",\"url\":\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/Untitled_design-removebg-preview.png\",\"contentUrl\":\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/Untitled_design-removebg-preview.png\",\"width\":500,\"height\":500,\"caption\":\"No More Breach\"},\"image\":{\"@id\":\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/nomorebreach\",\"https:\\\/\\\/instagram.com\\\/nomorebreach\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/#\\\/schema\\\/person\\\/bb2410510214ded6aa0305e6ff04de94\",\"name\":\"nomorebreachofficial\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6d4a84f25c82ed978512f73233e5c099b060eb4a2a74d789a240c355d0e280f4?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6d4a84f25c82ed978512f73233e5c099b060eb4a2a74d789a240c355d0e280f4?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6d4a84f25c82ed978512f73233e5c099b060eb4a2a74d789a240c355d0e280f4?s=96&r=g\",\"caption\":\"nomorebreachofficial\"},\"description\":\"The NoMoreBreach team helps startups and businesses find and fix security gaps before attackers do. We write practical, no-hype guides on real vulnerabilities, misconfigurations and attack techniques, each checked against primary sources and turned into steps you can act on. Want to see what attackers can see? Request a free external attack-surface snapshot at nomorebreach.com.\",\"sameAs\":[\"https:\\\/\\\/nomorebreach.com\\\/blog\",\"https:\\\/\\\/instagram.com\\\/nomorebreach\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/nomorebreach\",\"https:\\\/\\\/x.com\\\/NoMoreBreachSec\"],\"url\":\"https:\\\/\\\/nomorebreach.com\\\/blog\\\/author\\\/nomorebreachofficial\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Multi-Tenant Postgres Row Level Security: 7 Ways Around It - NoMoreBreach Insights","description":"7 ways we got around one correct Postgres row level security policy in a multi-tenant lab: owners, pooled connections, views. Fixes and audit query.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/nomorebreach.com\/blog\/postgres-rls-multi-tenant\/","og_locale":"en_US","og_type":"article","og_title":"Multi-Tenant Postgres Row Level Security: 7 Ways Around It - NoMoreBreach Insights","og_description":"7 ways we got around one correct Postgres row level security policy in a multi-tenant lab: owners, pooled connections, views. Fixes and audit query.","og_url":"https:\/\/nomorebreach.com\/blog\/postgres-rls-multi-tenant\/","og_site_name":"NoMoreBreach Insights","article_published_time":"2026-11-13T08:17:03+00:00","article_modified_time":"2026-11-14T07:03:16+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/nomorebreach.com\/blog\/wp-content\/uploads\/2026\/11\/postgres-rls-multi-tenant.png","type":"image\/png"}],"author":"nomorebreachofficial","twitter_card":"summary_large_image","twitter_creator":"@NoMoreBreachSec","twitter_site":"@nomorebreach","twitter_misc":{"Written by":"nomorebreachofficial","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/nomorebreach.com\/blog\/postgres-rls-multi-tenant\/#article","isPartOf":{"@id":"https:\/\/nomorebreach.com\/blog\/postgres-rls-multi-tenant\/"},"author":{"name":"nomorebreachofficial","@id":"https:\/\/nomorebreach.com\/blog\/#\/schema\/person\/bb2410510214ded6aa0305e6ff04de94"},"headline":"Multi-Tenant Postgres Row Level Security: 7 Ways Around It","datePublished":"2026-11-13T08:17:03+00:00","dateModified":"2026-11-14T07:03:16+00:00","mainEntityOfPage":{"@id":"https:\/\/nomorebreach.com\/blog\/postgres-rls-multi-tenant\/"},"wordCount":2250,"commentCount":0,"publisher":{"@id":"https:\/\/nomorebreach.com\/blog\/#organization"},"image":{"@id":"https:\/\/nomorebreach.com\/blog\/postgres-rls-multi-tenant\/#primaryimage"},"thumbnailUrl":"https:\/\/nomorebreach.com\/blog\/wp-content\/uploads\/2026\/11\/postgres-rls-multi-tenant.png","keywords":["appsec","multi-tenant","postgres","rls","saas-security"],"articleSection":["Web Security"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/nomorebreach.com\/blog\/postgres-rls-multi-tenant\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/nomorebreach.com\/blog\/postgres-rls-multi-tenant\/","url":"https:\/\/nomorebreach.com\/blog\/postgres-rls-multi-tenant\/","name":"Multi-Tenant Postgres Row Level Security: 7 Ways Around It - NoMoreBreach Insights","isPartOf":{"@id":"https:\/\/nomorebreach.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/nomorebreach.com\/blog\/postgres-rls-multi-tenant\/#primaryimage"},"image":{"@id":"https:\/\/nomorebreach.com\/blog\/postgres-rls-multi-tenant\/#primaryimage"},"thumbnailUrl":"https:\/\/nomorebreach.com\/blog\/wp-content\/uploads\/2026\/11\/postgres-rls-multi-tenant.png","datePublished":"2026-11-13T08:17:03+00:00","dateModified":"2026-11-14T07:03:16+00:00","description":"7 ways we got around one correct Postgres row level security policy in a multi-tenant lab: owners, pooled connections, views. Fixes and audit query.","breadcrumb":{"@id":"https:\/\/nomorebreach.com\/blog\/postgres-rls-multi-tenant\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/nomorebreach.com\/blog\/postgres-rls-multi-tenant\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/nomorebreach.com\/blog\/postgres-rls-multi-tenant\/#primaryimage","url":"https:\/\/nomorebreach.com\/blog\/wp-content\/uploads\/2026\/11\/postgres-rls-multi-tenant.png","contentUrl":"https:\/\/nomorebreach.com\/blog\/wp-content\/uploads\/2026\/11\/postgres-rls-multi-tenant.png","width":1200,"height":630,"caption":"Postgres row level security multi-tenant thumbnail: a correct policy with seven isolation gaps around it"},{"@type":"BreadcrumbList","@id":"https:\/\/nomorebreach.com\/blog\/postgres-rls-multi-tenant\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/nomorebreach.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Multi-Tenant Postgres Row Level Security: 7 Ways Around It"}]},{"@type":"WebSite","@id":"https:\/\/nomorebreach.com\/blog\/#website","url":"https:\/\/nomorebreach.com\/blog\/","name":"No More Breach Insights","description":"Stop Threats Before They Start","publisher":{"@id":"https:\/\/nomorebreach.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/nomorebreach.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/nomorebreach.com\/blog\/#organization","name":"No More Breach","url":"https:\/\/nomorebreach.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/nomorebreach.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/nomorebreach.com\/blog\/wp-content\/uploads\/2025\/01\/Untitled_design-removebg-preview.png","contentUrl":"https:\/\/nomorebreach.com\/blog\/wp-content\/uploads\/2025\/01\/Untitled_design-removebg-preview.png","width":500,"height":500,"caption":"No More Breach"},"image":{"@id":"https:\/\/nomorebreach.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/nomorebreach","https:\/\/instagram.com\/nomorebreach"]},{"@type":"Person","@id":"https:\/\/nomorebreach.com\/blog\/#\/schema\/person\/bb2410510214ded6aa0305e6ff04de94","name":"nomorebreachofficial","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/6d4a84f25c82ed978512f73233e5c099b060eb4a2a74d789a240c355d0e280f4?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/6d4a84f25c82ed978512f73233e5c099b060eb4a2a74d789a240c355d0e280f4?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6d4a84f25c82ed978512f73233e5c099b060eb4a2a74d789a240c355d0e280f4?s=96&r=g","caption":"nomorebreachofficial"},"description":"The NoMoreBreach team helps startups and businesses find and fix security gaps before attackers do. We write practical, no-hype guides on real vulnerabilities, misconfigurations and attack techniques, each checked against primary sources and turned into steps you can act on. Want to see what attackers can see? Request a free external attack-surface snapshot at nomorebreach.com.","sameAs":["https:\/\/nomorebreach.com\/blog","https:\/\/instagram.com\/nomorebreach","https:\/\/www.linkedin.com\/company\/nomorebreach","https:\/\/x.com\/NoMoreBreachSec"],"url":"https:\/\/nomorebreach.com\/blog\/author\/nomorebreachofficial\/"}]}},"_links":{"self":[{"href":"https:\/\/nomorebreach.com\/blog\/wp-json\/wp\/v2\/posts\/156","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nomorebreach.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nomorebreach.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nomorebreach.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nomorebreach.com\/blog\/wp-json\/wp\/v2\/comments?post=156"}],"version-history":[{"count":2,"href":"https:\/\/nomorebreach.com\/blog\/wp-json\/wp\/v2\/posts\/156\/revisions"}],"predecessor-version":[{"id":159,"href":"https:\/\/nomorebreach.com\/blog\/wp-json\/wp\/v2\/posts\/156\/revisions\/159"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nomorebreach.com\/blog\/wp-json\/wp\/v2\/media\/157"}],"wp:attachment":[{"href":"https:\/\/nomorebreach.com\/blog\/wp-json\/wp\/v2\/media?parent=156"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nomorebreach.com\/blog\/wp-json\/wp\/v2\/categories?post=156"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nomorebreach.com\/blog\/wp-json\/wp\/v2\/tags?post=156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}