· via Hacker News – Front Page (native)
CVE-2026-6460 turns 22-year-old PostgreSQL type confusion into remote code execution
Security researcher Mehmet Ince says a type-confusion primitive present in PostgreSQL core for roughly 22 years can be turned into reliable memory corruption and remote code execution, now tracked as CVE-2026-6460.

Security researcher Mehmet Ince has published details of a type-confusion vulnerability in PostgreSQL's core, tracked as CVE-2026-6460, which he says has gone unnoticed for about 22 years and can be developed into remote code execution. The write-up is the third part of his six-part series 'Systemic Risks in the Managed PostgreSQL Industry' and reached the front page of Hacker News on 9 November.
From an extension exploit to the core
According to Ince, the work did not begin as a hunt for a core bug. Earlier in 2026 he was exploiting memory-corruption flaws in PostgreSQL extensions and achieved code execution in pg_clickhouse, an extension that converts ClickHouse values into PostgreSQL's native format. He reported that out-of-bounds read-and-write chain to the vendor, which fixed it on 23 June 2026. Finishing that exploit left him with a basic question about how PostgreSQL itself decides what a value is, and in late July he carried that question from extensions into the database core.
By early August he had the primitive at the centre of the report: place a value inside a composite type, change the type of one of that type's fields, then ask the database to read the value back. PostgreSQL interprets the stored bytes according to the newly declared type, and Ince calls the resulting confusion the basis of one of the most reliable memory-corruption exploits he has encountered. He frames the finding as a new class of type-confusion vulnerability rather than a single isolated bug.
A crash course in PostgreSQL types
The post doubles as a guided tour of the database's type system. Values move through PostgreSQL as Datums, generic eight-byte carriers that hold either the value itself or a pointer to a variable-length representation, as is the case for text. A Datum carries no type label of its own; the type is recorded as an OID pointing at a row in the pg_type system catalog, which stores a type's size, whether it is passed by value, and the input and output functions that convert values in and out of internal form. Ince also notes quirks he met along the way, such as the unknown type, OID 705, assigned to string literals whose final type has not yet been resolved.
Much of this education came from an AI agent. Ince says he asked Opus 5 to prepare a deep-dive course on PostgreSQL types and worked through the internals with the agent, which he named pg_expert. The pivotal realisation, reached late in the available text, is that the type attached to a value determines which conversion code the server executes. Because values are untyped at the Datum level, anything that desynchronises stored data from its declared type also changes the code path that processes it — the point where a modelling curiosity becomes an exploit primitive.
What the disclosure covers so far
The instalment is the story of the discovery rather than a full advisory. The available text does not state which PostgreSQL releases are affected, whether a patch has shipped, or how the flaw is scored. Ince says the first two parts of the series provide the surrounding context, and that the whole project started with a single April 2026 question about whether a project could use a managed PostgreSQL service.
Why it matters
Remote code execution on a database server typically means full access to the data it holds, plus a foothold for moving into adjacent systems. A flaw that has existed for roughly two decades potentially reaches an enormous installed base, including managed PostgreSQL offerings where customers depend on the provider to detect and patch core bugs — precisely the systemic risk the series is built around. The origin story is also a reminder that research on third-party extensions can surface weaknesses in the core underneath them, and it stands out as an early high-profile case of an AI agent acting as a tutor in serious vulnerability research. Operators running PostgreSQL, managed or self-hosted, should watch for advisories tied to CVE-2026-6460 and the remaining parts of the series.
- #postgresql
- #security
- #vulnerability
- #rce
- #database