# CVE-2026-18447: PostgreSQL type confusion in SQL-language functions arbitrary code execution

Source: https://junglewise.ai/threats/cve-2026-18447-type-confusion-in-postgresql-sql-language-functions-allows-an  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-11-12. Updated: 2026-11-12  
License: CC BY 4.0 with a link back

CVE-2026-18447 · Severity: high · CVSS 8.8 · Published 2026-11-12

PostgreSQL is a widely-used database server that executes functions defined in SQL and other languages. A type confusion vulnerability in SQL-language functions allows anyone with the ability to create database objects to execute arbitrary code with the privileges of the operating system user running the database, potentially leading to complete system compromise. This affects versions 14 through 18 before the patched versions.

Technologies: [PostgreSQL](https://junglewise.ai/threats/technologies/postgresql). Vendors: [PostgreSQL](https://junglewise.ai/threats/vendors/postgresql).

## Quick answers

**Is CVE-2026-18447 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-18447 being exploited in the wild.

**How severe is CVE-2026-18447?** High severity, with a CVSS score of 8.8, published 12 November 2026.

**Which products and versions are affected?** PostgreSQL 14 before 14.25, 15 before 15.20, 16 before 16.16, 17 before 17.12, 18 before 18.7.

**Is there a fix for CVE-2026-18447?** Yes: fixed in PostgreSQL 14.25, 15.20, 16.16, 17.12, 18.7. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-18447 attacked?** It is attacked over the network.

**Am I affected by CVE-2026-18447?** Check whether you run PostgreSQL at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Fixed in PostgreSQL 14.25, 15.20, 16.16, 17.12, 18.7

## Technical details

The vulnerability is a type confusion issue in PostgreSQL's handling of SQL-language function output parameters when the parameter is declared with type "any". An attacker with database object creation privileges can craft a malicious function that exploits this type confusion to achieve arbitrary code execution as the OS user running the database server. The attack requires local database access (authenticated) but no user interaction, and results in privilege escalation at the OS level.

## Affected products

- PostgreSQL PostgreSQL 14 before 14.25, 15 before 15.20, 16 before 16.16, 17 before 17.12, 18 before 18.7

## Timeline

- 2026-11-12: disclosed
- 2026-11-12: patched

## References

- [https://www.postgresql.org/support/security/CVE-2026-18447/](https://www.postgresql.org/support/security/CVE-2026-18447/)

## Related threats

- [PostgreSQL CREATE EXTENSION arbitrary SQL execution](https://junglewise.ai/threats/cve-2026-6467-uncontrolled-search-path-element-in-postgresql-create-extension)
- [PostgreSQL type confusion in ALTER allows arbitrary code execution](https://junglewise.ai/threats/cve-2026-6460-type-confusion-in-postgresql-allows-an-object-creator-to-execute)
- [PostgreSQL INSERT ON CONFLICT authorization bypass on auto-updatable views](https://junglewise.ai/threats/cve-2026-16237-improper-protection-in-postgresql-insert-on-conflict-on-auto)
- [PostgreSQL dblink and subscriptions arbitrary file append](https://junglewise.ai/threats/cve-2026-14661-external-control-of-file-name-in-postgresql-dblink-and-create)
- [PostgreSQL INSERT ... ON CONFLICT row security bypass](https://junglewise.ai/threats/cve-2026-120154-improper-protection-in-postgresql-insert-on-conflict-allows-an)
