{"id":"CVE-2026-116241","kind":"vulnerability","aliases":["CVE-2026-116241"],"related":[],"title":"pgAdmin 4: Import/Export quoting bypass lets a database user run OS commands","description":"pgAdmin 4's Import/Export Data tool wraps a user's query export in a psql \\copy (...) TO command and checks that the query's parentheses are balanced so that nothing can escape the wrapper. The check rejected a backslash inside a single-quoted string, but not inside a double-quoted identifier, where it treated the next double quote as closing the identifier. psql's \\copy parser applies the connection's escape character to whichever quote opened a token, so with standard_conforming_strings off a backslash-escaped double quote does not close the identifier. pgAdmin's and psql's view of the quoting then diverged, a closing parenthesis hidden from the check ended the \\copy (...) wrapper, and a following TO PROGRAM clause was executed by psql on the pgAdmin host, as the operating-system account running pgAdmin, before the server rejected the statement. An ordinary database role can turn standard_conforming_strings off for itself, and the Import/Export Data permission is granted to non-administrators by default.\n\nThis is a bypass of the fix for CVE-2026-17566. The fix rejects any backslash inside a double-quoted identifier, as was already done for single-quoted strings, since its meaning depends on a server setting that cannot be known reliably when the query is validated.\n\nThis issue affects pgAdmin 4: before 9.19.","summary":"pgAdmin 4's Import/Export Data tool passes a user's query into a psql \\copy command, and a quoting mismatch lets a crafted query end the wrapper and run a TO PROGRAM clause. The command runs on the pgAdmin host as the operating-system account running pgAdmin, before the database server rejects the statement.","severity":"critical","cvss":9.9,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["package","pgadmin","postgresql","self-hosted"],"not_affected_if":["import-export-restricted","no-pgadmin-deployment","pgadmin-9.19-or-later"],"how_to_check":"- Check the installed pgAdmin 4 version in Help > About or the pgAdmin package manager output; affected if below `9.19`\n- Check whether `standard_conforming_strings` can be turned off by ordinary database roles on your servers (unknown whether this is tested in your environment)","fix":"- pgAdmin 4: upgrade to `9.19` or later (the sources say the issue is fixed from this version on)","status":"open","published_at":"2026-10-30T20:17:03+00:00","first_seen_at":"2026-10-30T20:25:37+00:00","triaged_at":"2026-10-30T20:26:06+00:00","updated_at":"2026-10-30T20:26:06+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-10-30T20:26:06Z","model":"claude-haiku-5-5","output":{"fix":"- pgAdmin 4: upgrade to `9.19` or later (the sources say the issue is fixed from this version on)","reach":"network","title":"pgAdmin 4: Import/Export quoting bypass lets a database user run OS commands","impact":"high","summary":"pgAdmin 4's Import/Export Data tool passes a user's query into a psql \\copy command, and a quoting mismatch lets a crafted query end the wrapper and run a TO PROGRAM clause. The command runs on the pgAdmin host as the operating-system account running pgAdmin, before the database server rejects the statement.","audience":"businesses","category":"package","nicknames":[],"who_cares":["pgadmin","postgresql","self-hosted"],"confidence":0.8,"fix_status":"available","needs_auth":"yes","worst_case":"Operating-system commands run as the pgAdmin host account.","analyst_note":"Confirm the fixed version boundary and whether a patched release exists on the pgAdmin project page; the sources give only 'before 9.19'.","how_to_check":"- Check the installed pgAdmin 4 version in Help > About or the pgAdmin package manager output; affected if below `9.19`\n- Check whether `standard_conforming_strings` can be turned off by ordinary database roles on your servers (unknown whether this is tested in your environment)","plain_action":"","needs_analyst":true,"not_affected_if":["pgadmin-9.19-or-later","no-pgadmin-deployment","import-export-restricted"],"who_is_affected":"Any team that runs pgAdmin 4 below 9.19 and gives users access to the Import/Export Data tool, which non-administrator roles get by default. The attack needs a database login through pgAdmin, then the tool's query export; the command runs on the machine hosting pgAdmin, not on the database server. Teams that do not run pgAdmin 4, or that run 9.19 or later, are not affected.","user_interaction":"no","needs_special_setup":"no","severity_if_unknown":"critical"},"cost_usd":0.000794,"input_tokens":4467,"output_tokens":695,"severity_before":"critical"},"analyst_status":null,"analyst_note":null,"search":"'-116241':15A,18A '-17566':262C '-2026':14A,17A,261C '4':2A,26B,81C,305C '9.19':307C 'account':70B,218C 'administr':249C 'affect':303C 'alreadi':276C 'appli':148C 'backslash':118C,168C,267C 'backslash-escap':167C 'balanc':106C 'bypass':5A,255C 'cannot':292C 'charact':153C 'check':99C,115C,194C 'claus':57B,204C 'close':141C,174C,189C 'command':12A,40B,59B,97C 'conform':163C,234C 'connect':150C 'copi':39B,95C,146C,197C 'craft':47B 'cve':13A,16A,260C 'data':29B,84C,242C 'databas':8A,75B,229C 'default':251C 'depend':286C 'diverg':187C 'done':277C 'doubl':130C,138C,170C,271C 'double-quot':129C,270C 'end':49B,195C 'escap':111C,152C,169C 'execut':206C 'export':91C 'fix':258C,264C 'follow':201C 'grant':245C 'hidden':191C 'host':24B,64B,212C 'identifi':132C,143C,176C,273C 'import/export':3A,28B,83C,241C 'insid':119C,127C,268C 'issu':302C 'known':294C 'let':6A,45B 'mean':285C 'mismatch':44B 'next':137C 'non':248C 'non-administr':247C 'noth':109C 'open':157C 'oper':68B,216C 'operating-system':67B,215C 'ordinari':228C 'os':11A 'packag':19B 'parenthes':104C 'parenthesi':190C 'parser':147C 'pass':31B 'permiss':243C 'pgadmin':1A,20B,25B,63B,72B,80C,177C,211C,220C,304C 'postgresql':21B 'program':56B,203C 'psql':38B,94C,144C,180C,208C 'queri':35B,48B,90C,102C,298C 'quot':4A,43B,123C,131C,139C,156C,171C,185C,272C,281C 'reject':77B,116C,224C,265C 'reliabl':295C 'role':230C 'run':10A,53B,60B,71B,219C 'self':23B 'self-host':22B 'server':76B,223C,289C 'set':290C 'sinc':283C 'singl':122C,280C 'single-quot':121C,279C 'standard':162C,233C 'statement':79B,226C 'string':124C,164C,235C,282C 'system':69B,217C 'token':159C 'tool':30B,85C 'treat':135C 'turn':232C 'user':9A,33B,88C 'valid':300C 'view':182C 'whichev':155C 'wrap':86C 'wrapper':51B,113C,198C","nicknames":[],"mitigations":[],"who_affected":"Any team that runs pgAdmin 4 below 9.19 and gives users access to the Import/Export Data tool, which non-administrator roles get by default. The attack needs a database login through pgAdmin, then the tool's query export; the command runs on the machine hosting pgAdmin, not on the database server. Teams that do not run pgAdmin 4, or that run 9.19 or later, are not affected.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"businesses","plain_action":null,"first_public_at":"2026-10-30T20:17:03+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"f86ef6dc-4d3a-42ad-8f28-e6d5547a5007","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-116241","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-116241","severity":null,"published_at":"2026-10-30T20:17:03+00:00","modified_at":"2026-10-30T20:17:03+00:00","first_seen_at":"2026-10-30T20:25:37+00:00","fetched_at":"2026-10-30T20:25:37+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}