{"id":"CVE-2026-120145","kind":"vulnerability","aliases":["CVE-2026-120145"],"related":[],"title":"PostgreSQL: logical replication lets a compromised publisher run code as the OS user","description":"Missing authorization in PostgreSQL logical replication allows a compromised publisher to execute arbitrary code as the operating system user running the superuser-owned subscription, via naming a system catalog as a replication target.  Only subscriptions owned by a superuser are vulnerable.  Versions before PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.","summary":"PostgreSQL logical replication does not check authorization when a replication target names a system catalog, so a compromised publisher can make a superuser-owned subscription execute arbitrary code as the operating system user running it. Only subscriptions owned by a superuser are vulnerable.","severity":"high","cvss":8.8,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["database","logical-replication","postgresql","runtime","self-hosted"],"not_affected_if":["no-logical-replication","non-superuser-subscription-owner","patched-versions"],"how_to_check":"- Run `SELECT current_setting('server_version');` and compare against the fixed versions below.\n- Run `SELECT subname, subowner::regrole FROM pg_subscription;` and check whether any subscription is owned by a superuser.","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:43+00:00","first_seen_at":"2026-11-12T15:41:56+00:00","triaged_at":"2026-11-12T15:43:12+00:00","updated_at":"2026-11-12T15:43:12+00:00","category":"runtime","confidence":0.7,"triage":{"at":"2026-11-12T15:43:12Z","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":"network","title":"PostgreSQL: logical replication lets a compromised publisher run code as the OS user","impact":"high","summary":"PostgreSQL logical replication does not check authorization when a replication target names a system catalog, so a compromised publisher can make a superuser-owned subscription execute arbitrary code as the operating system user running it. Only subscriptions owned by a superuser are vulnerable.","audience":"businesses","category":"runtime","nicknames":[],"who_cares":["postgresql","logical-replication","self-hosted","database"],"confidence":0.7,"fix_status":"available","needs_auth":"yes","worst_case":"Code runs as the OS user of the database server","analyst_note":"Advisory details on the PostgreSQL site could confirm the fixed-version list and the exact catalog-target condition.| ”product_name”:","how_to_check":"- Run `SELECT current_setting('server_version');` and compare against the fixed versions below.\n- Run `SELECT subname, subowner::regrole FROM pg_subscription;` and check whether any subscription is owned by a superuser.","plain_action":"","product_name":"","needs_analyst":false,"not_affected_if":["no-logical-replication","non-superuser-subscription-owner","patched-versions"],"who_is_affected":"Only servers running PostgreSQL before the fixed versions that use logical replication with a subscription owned by a superuser are exposed. A compromised publisher, meaning the upstream database feeding the subscription, is the attack path. Servers without logical replication subscriptions owned by superusers can skip it.","user_interaction":"no","product_ecosystem":"","needs_special_setup":"yes","severity_if_unknown":"high"},"cost_usd":0.000782,"input_tokens":4585,"output_tokens":648,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-120145':16A,19A '-2026':15A,18A '14.25':123C '15.20':121C '16.16':120C '17.12':119C '18.7':118C 'affect':125C 'allow':79C 'arbitrari':56B,85C 'author':35B,74C 'catalog':43B,102C 'check':34B 'code':9A,57B,86C 'compromis':6A,46B,81C 'cve':14A,17A 'databas':20B 'execut':55B,84C 'host':28B 'let':4A 'logic':2A,22B,30B,77C 'logical-repl':21B 'make':49B 'miss':73C 'name':40B,99C 'oper':60B,89C 'os':12A 'own':53B,67B,96C,109C 'postgresql':1A,24B,29B,76C,117C 'publish':7A,47B,82C 'replic':3A,23B,31B,38B,78C,105C 'run':8A,63B,92C 'runtim':25B 'self':27B 'self-host':26B 'subscript':54B,66B,97C,108C 'superus':52B,70B,95C,112C 'superuser-own':51B,94C 'system':42B,61B,90C,101C 'target':39B,106C 'user':13A,62B,91C 'version':115C 'via':98C 'vulner':72B,114C","nicknames":[],"mitigations":[],"who_affected":"Only servers running PostgreSQL before the fixed versions that use logical replication with a subscription owned by a superuser are exposed. A compromised publisher, meaning the upstream database feeding the subscription, is the attack path. Servers without logical replication subscriptions owned by superusers can skip it.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"businesses","plain_action":null,"pkeys":[],"ptokens":[],"labels":["database","high","logicalreplication","postgresql","runtime","selfhosted"],"campaign_type":null,"search_a":"'-120145':16A,19A '-2026':15A,18A 'code':9A 'compromis':6A 'cve':14A,17A 'let':4A 'logic':2A 'os':12A 'postgresql':1A 'publish':7A 'replic':3A 'run':8A 'user':13A","search_b":"'arbitrari':56B 'author':35B 'catalog':43B 'check':34B 'code':57B 'compromis':46B 'databas':20B 'execut':55B 'host':28B 'logic':22B,30B 'logical-repl':21B 'make':49B 'name':40B 'oper':60B 'own':53B,67B 'postgresql':24B,29B 'publish':47B 'replic':23B,31B,38B 'run':63B 'runtim':25B 'self':27B 'self-host':26B 'subscript':54B,66B 'superus':52B,70B 'superuser-own':51B 'system':42B,61B 'target':39B 'user':62B 'vulner':72B","search_c":"'14.25':123C '15.20':121C '16.16':120C '17.12':119C '18.7':118C 'affect':125C 'allow':79C 'arbitrari':85C 'author':74C 'catalog':102C 'code':86C 'compromis':81C 'execut':84C 'logic':77C 'miss':73C 'name':99C 'oper':89C 'own':96C,109C 'postgresql':76C,117C 'publish':82C 'replic':78C,105C 'run':92C 'subscript':97C,108C 'superus':95C,112C 'superuser-own':94C 'system':90C,101C 'target':106C 'user':91C 'version':115C 'via':98C 'vulner':114C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-11-12T15:17:43+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/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-120145","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-120145","severity":null,"published_at":"2026-11-12T15:17:43+00:00","modified_at":"2026-11-12T15:17:43+00:00","first_seen_at":"2026-11-12T15:41:56+00:00","fetched_at":"2026-11-12T15:41:56+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"}