{"id":"CVE-2026-18447","kind":"vulnerability","aliases":["CVE-2026-18447"],"related":[],"title":"PostgreSQL: type confusion lets a function creator run OS code","description":"Type confusion in PostgreSQL SQL-language functions allows an object creator to execute arbitrary code as the operating system user running the database, via an output parameter of type \"any\".  Versions before PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.","summary":"A flaw in PostgreSQL SQL-language functions lets a user who can create database objects confuse types through an output parameter of type \"any\". The attacker can execute arbitrary code as the operating system user running the database.","severity":"high","cvss":8.8,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["database","postgresql","runtime","self-hosted"],"not_affected_if":["managed-hosting","no-untrusted-object-creators","patched-version"],"how_to_check":"- Run `psql -c \"SHOW server_version;\"` and compare against the fixed versions below.\n- Confirm which roles can `CREATE` functions in your databases.","fix":"- PostgreSQL `18.7`\n- PostgreSQL `17.12`\n- PostgreSQL `16.16`\n- PostgreSQL `15.20`\n- PostgreSQL `14.25`","status":"open","published_at":"2026-11-12T15:17:51+00:00","first_seen_at":"2026-11-12T15:41:57+00:00","triaged_at":"2026-11-12T15:43:07+00:00","updated_at":"2026-11-12T15:43:07+00:00","category":"runtime","confidence":0.7,"triage":{"at":"2026-11-12T15:43:07Z","model":"claude-haiku-5-5","output":{"fix":"- PostgreSQL `18.7`\n- PostgreSQL `17.12`\n- PostgreSQL `16.16`\n- PostgreSQL `15.20`\n- PostgreSQL `14.25`","reach":"local","title":"PostgreSQL: type confusion lets a function creator run OS code","impact":"high","summary":"A flaw in PostgreSQL SQL-language functions lets a user who can create database objects confuse types through an output parameter of type \"any\". The attacker can execute arbitrary code as the operating system user running the database.","audience":"businesses","category":"runtime","nicknames":[],"who_cares":["postgresql","self-hosted","database"],"confidence":0.7,"fix_status":"available","needs_auth":"yes","worst_case":"Attacker runs arbitrary code as the database operating system user","analyst_note":"","how_to_check":"- Run `psql -c \"SHOW server_version;\"` and compare against the fixed versions below.\n- Confirm which roles can `CREATE` functions in your databases.","plain_action":"","product_name":"","needs_analyst":false,"not_affected_if":["managed-hosting","patched-version","no-untrusted-object-creators"],"who_is_affected":"Any PostgreSQL server before the fixed versions is exposed. The attacker must be able to create objects in the database, so servers where only trusted administrators can create functions are lower risk. Managed database services are handled by their provider.","user_interaction":"no","product_ecosystem":"","needs_special_setup":"no","severity_if_unknown":"high"},"cost_usd":0.000719,"input_tokens":4551,"output_tokens":528,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-18447':13A,16A '-2026':12A,15A '14.25':101C '15.20':99C '16.16':98C '17.12':97C '18.7':96C 'affect':103C 'allow':70C 'arbitrari':52B,76C 'attack':49B 'code':10A,53B,77C 'confus':3A,39B,63C 'creat':36B 'creator':7A,73C 'cve':11A,14A 'databas':17B,37B,61B,85C 'execut':51B,75C 'flaw':24B 'function':6A,30B,69C 'host':22B 'languag':29B,68C 'let':4A,31B 'object':38B,72C 'oper':56B,80C 'os':9A 'output':43B,88C 'paramet':44B,89C 'postgresql':1A,18B,26B,65C,95C 'run':8A,59B,83C 'runtim':19B 'self':21B 'self-host':20B 'sql':28B,67C 'sql-languag':27B,66C 'system':57B,81C 'type':2A,40B,46B,62C,91C 'user':33B,58B,82C 'version':93C 'via':86C","nicknames":[],"mitigations":[],"who_affected":"Any PostgreSQL server before the fixed versions is exposed. The attacker must be able to create objects in the database, so servers where only trusted administrators can create functions are lower risk. Managed database services are handled by their provider.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"businesses","plain_action":null,"pkeys":[],"ptokens":[],"labels":["database","high","postgresql","runtime","selfhosted"],"campaign_type":null,"search_a":"'-18447':13A,16A '-2026':12A,15A 'code':10A 'confus':3A 'creator':7A 'cve':11A,14A 'function':6A 'let':4A 'os':9A 'postgresql':1A 'run':8A 'type':2A","search_b":"'arbitrari':52B 'attack':49B 'code':53B 'confus':39B 'creat':36B 'databas':17B,37B,61B 'execut':51B 'flaw':24B 'function':30B 'host':22B 'languag':29B 'let':31B 'object':38B 'oper':56B 'output':43B 'paramet':44B 'postgresql':18B,26B 'run':59B 'runtim':19B 'self':21B 'self-host':20B 'sql':28B 'sql-languag':27B 'system':57B 'type':40B,46B 'user':33B,58B","search_c":"'14.25':101C '15.20':99C '16.16':98C '17.12':97C '18.7':96C 'affect':103C 'allow':70C 'arbitrari':76C 'code':77C 'confus':63C 'creator':73C 'databas':85C 'execut':75C 'function':69C 'languag':68C 'object':72C 'oper':80C 'output':88C 'paramet':89C 'postgresql':65C,95C 'run':83C 'sql':67C 'sql-languag':66C 'system':81C 'type':62C,91C 'user':82C 'version':93C 'via':86C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-11-12T15:17:51+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","cvss_by":"f86ef6dc-4d3a-42ad-8f28-e6d5547a5007","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-18447","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-18447","severity":null,"published_at":"2026-11-12T15:17:51+00:00","modified_at":"2026-11-12T15:17:51+00:00","first_seen_at":"2026-11-12T15:41:57+00:00","fetched_at":"2026-11-12T15:41:57+00:00","note":null}],"documents":[],"disclosures":[],"exploit_sources":[],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}