A database account that cannot read a single application table can still take over the server that hosts it. A researcher has just shown this with proof-of-concept exploits, and the PostgreSQL vulnerability CVE-2026-116331 is one of five bugs in the work. The fix has been available since November 12, 2026, yet many systems have not applied it.

The technical write-up came out on November 18, 2026, and The Hacker News reported it on November 19. No real-world attacks have been observed so far, so this is a good window to act before working exploit code spreads.

A low-privilege account can reach engine code

PostgreSQL's security page describes CVE-2026-116331 as a type confusion bug in the min/max aggregate optimization. Someone who can create objects can define a custom aggregate with the SORTOP option, which makes the planner treat the aggregate's input and result as the same type when they differ. The outcome is arbitrary code execution as the operating system user running PostgreSQL. The CVSS score is 8.8 with a PR:L vector, meaning an ordinary login is enough.

The analysis by Zheng Yu of Depthfirst makes the point sharper: a plain login role can build the objects it needs inside its own temporary schema without touching any application data. SQL permissions decide which tables and schemas an account can reach, but they do not control the C and C++ code running behind every query.

The TEMPORARY privilege on a database is granted to PUBLIC by default, so many application accounts hold it without anyone having chosen to give it.

It is not just PostgreSQL

The same research covers MySQL (CVE-2026-101786, versions 26.7.0 to 26.7.1, fixed October 20), ClickHouse (fixed in September, no CVE) and an Oracle chain that needs no login. If you run several database engines, review each one. The rest of this article focuses on PostgreSQL.

Check your PostgreSQL servers

Affected versions are everything before 18.7, 17.12, 16.16, 15.20 and 14.25. Work through the steps below.

Step 1: find the running version

SHOW server_version;

For PostgreSQL in Docker, do not rely on the image name alone. Run the command inside the live container: an old container keeps its old binaries even after you pull a new image. The fix only takes effect once the container is recreated from the new image.

Step 2: update to a patched release

Minor updates do not need pg_upgrade or a dump/reload: back up, replace the binaries or image, and restart. Reindex details and other notes are in our article on PostgreSQL 18.7 and its 52 vulnerabilities. Branch 14 is out of support after 14.25, so plan a move to a newer branch.

Step 3: list who holds which privileges

Start with the roles that can log in:

SELECT rolname, rolsuper, rolcreatedb, rolcreaterole
FROM pg_roles
WHERE rolcanlogin
ORDER BY rolname;

Then inspect a specific application account (replace app_user and app_db with your real names):

SELECT has_database_privilege('app_user', 'app_db', 'TEMPORARY') AS temp_priv,
       has_database_privilege('app_user', 'app_db', 'CREATE')    AS create_priv,
       has_schema_privilege('app_user', 'public', 'CREATE')       AS public_create;

A true means the account holds that privilege. An application account that only reads and writes rows rarely needs all three.

Step 4: revoke TEMPORARY from PUBLIC

REVOKE TEMPORARY ON DATABASE app_db FROM PUBLIC;
-- grant it back only to roles that really need temp tables
GRANT TEMPORARY ON DATABASE app_db TO report_role;

Test on staging first. Some reporting tools, migrations or ORMs use temporary tables; if a role lacks the privilege you will see permission denied to create temporary tables, and you can grant it back to that specific role.

Important: tightening privileges is an extra layer of mitigation. The real fix for this bug is the patched release, so do not treat revoking rights as a substitute.

Common blind spots

  • The application account is a superuser or database owner because someone configured it quickly.
  • The connection string sits in a shared .env file or in a repository, so people outside the project can log in.
  • Staging and test environments share a cluster with production, turning one weak staging account into a way into everything.
  • SQL injection in the application layer, because the attacker then inherits the application account's rights.

If your test data is a copy of production with personal information, mask it before it goes to staging or to a third party; AI Masking supports exactly that. Patch the application tier in the same maintenance window, as covered in our piece on Node.js fixing 16 vulnerabilities.

If someone else operates your systems

Ask them three things: has the server run the November 12 patch, what rights does the application account have beyond reading and writing data, and has the TEMPORARY privilege been reviewed. An answer with dates and concrete check results is a sign of a sound operations process.

What to do today: run SHOW server_version; on every environment, put the patch into the nearest maintenance window, and set aside time to review application account privileges.

References