Would Your Tests Catch a Missing PostgreSQL Row Security Policy?
A tenant isolation test can pass while using exactly the wrong account. In PostgreSQL, a table owner normally bypasses row security. A test that runs every query as the migration owner can tell you plenty about the schema and very little about what a customer can read.
On November 12, PostgreSQL published a fix for CVE-2026-116311. A role-management operation could remove a restrictive policy from a table owned by someone else. The fixed releases are 18.7, 17.12, 16.16, 15.20, and 14.25. The operational fix is to apply the appropriate update. The engineering question is how quickly an unexpected change in effective access would show up in a test. PostgreSQL security advisory.
Make the forbidden row real
In an isolated test database, seed two fictional tenants with one invoice each. Run the normal invoice query with the application's ordinary tenant identity. Assert the exact invoice identifiers it returns. A count of one can pass even if the result belongs to the wrong customer. An empty table can make a missing restriction look flawless.
Repeat the check for the other tenant and include a legitimate update to its own invoice. Tests for allowed behavior matter too. A service that denies everybody access would otherwise look perfectly secure. Run this small suite after schema migrations and role maintenance, when policy definitions and ownership can change together.
Keep the expected policy definitions under review alongside those behavioral tests. A schema comparison can tell you what moved. A query executed under a real application role tells you what that movement means to a customer. PostgreSQL row security documentation.