CVE-2026-6460 – Arbitrary Code Execution in Postgres postgresql.org · 12 points ...
HN Best 200 @best
CVE-2026-6460 – Arbitrary Code Execution in Postgres postgresql.org · 12 points · 10 comments · HN thread
TL;DR The PostgreSQL project's security advisory for CVE-2026-6460 describes a type confusion bug that lets a user who can create database objects execute arbitrary code as the operating system user running the database. The main trigger is ALTER ... SET DATA TYPE, with other DDL routes such as ADD COLUMN combined with ROLLBACK also reported. Fixed releases are 18.7, 17.12, 16.16, 15.20 and 14.25. The HN thread (12 points, 10 comments) mostly ignores the bug and argues about whether small applications need a database at all.
- Type confusion in the core server lets an object creator run arbitrary code as the OS user running PostgreSQL.
- The main route is ALTER ... SET DATA TYPE; the advisory also cites ALTER TABLE ... ADD COLUMN, ROLLBACK, then ADD COLUMN again.
- The root cause is inadequate tracking of typed values, which are not self-identifying, so stale values can show up in data dictionary entries, PL/pgSQL variables and other parts of the system.
- Affected versions are those before 18.7, 17.12, 16.16, 15.20 and 14.25, with fixes listed in the advisory's table.
- The CVSS overall score is 8.8, with vector AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H, meaning network attack requiring low privileges and no user interaction.
- Security reports go to security@postgresql.org.
Discussion The comment thread has little to do with the vulnerability. It starts from a comment that databases are unnecessary for small applications, arguing that plain file reads and writes or a batch import into a read-only SQL store are enough below about a million users. Replies push back that databases provide consistency, atomic transactions and indexes that are hard to rebuild, and the exchange becomes a long, somewhat combative back-and-forth about dependencies, 'not invented here' thinking and multi-node scaling. The mood is argumentative but not hostile, and nobody in the thread discusses the CVE itself.
- Databases are needed for most apps above trivial scale (some): Commenters argue that consistency, atomic transactions and indexing are not niche needs and that rebuilding them in application code usually produces worse results. They say the database is justified well below a million users, though some note that SQLite may suffice for many of those cases.
- Plain files or simple storage are enough for small systems (a few): One commenter argues that without many users, a 100M-line dependency is unnecessary and that write and read calls to files can do the job. For multi-node setups they propose per-node storage, replicated indexes and partitioning, which they say are only needed at around 100k users and beyond.
- Writing a custom storage engine is a heavy burden (a few): Replies to the file-based view argue that matching the performance of PostgreSQL or SQLite on non-trivial datasets would effectively require building a database engine, which is much harder than swapping out a web framework or game engine.
- Databases are often used where they are not needed (a few): A commenter points to WordPress on static sites as an example of overusing a database, while still holding that many workloads under a million users genuinely need one.