Conversations
Researchers Disclose a 22-Year-Old Type Confusion Vulnerability Chain in PostgreSQL
A Hacker News article describes researcher Mehmet starting from questions about managed PostgreSQL projects and, after researching extension vulnerabilities, tracing a 22-year-old zero-day type confusion issue in PostgreSQL's core. He says the primitive can form a reliable memory-corruption exploit. The article is the third part of a series on systemic risks in the managed PostgreSQL industry.
According to an article published on Hacker News, researcher Mehmet says he was initially asked whether a project could use managed PostgreSQL. Later, while researching memory-corruption vulnerabilities in extensions such as pg_clickhouse, he began questioning how PostgreSQL understands its own data. He says pg_clickhouse converts ClickHouse values into PostgreSQL's native Datum values, and conversion errors once gave him code execution; the related out-of-bounds read/write chain was fixed by the vendor on June 23.
Mehmet pushed the subsequent investigation into PostgreSQL's core. In summary, he says the vulnerability is triggered by writing values into a composite type, then changing the type of one of its fields and asking the database to read it back, resulting in type confusion. He believes this introduces a new class of PostgreSQL type confusion vulnerabilities and forms one of the more reliable memory-corruption exploits he has seen.
The article also explains that during the research he used AI tools to gradually learn internal mechanisms such as query parsing, type trees, OIDs, and Datums. The available material mainly presents the researcher's own account of the discovery process and technical starting points, without providing a patch number, affected version range, or an official conclusion on how it was handled.