---
id: "CVE-2026-116241"
kind: "vulnerability"
aliases: ["CVE-2026-116241"]
title: "pgAdmin 4: Import/Export quoting bypass lets a database user run OS commands"
severity: "critical"
cvss: 9.9
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["package", "pgadmin", "postgresql", "self-hosted"]
not_affected_if: ["import-export-restricted", "no-pgadmin-deployment", "pgadmin-9.19-or-later"]
published_at: "2026-10-30T20:17:03+00:00"
first_seen_at: "2026-10-30T20:25:37+00:00"
updated_at: "2026-10-30T20:26:06+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-116241", "first_seen_at": "2026-10-30T20:25:37+00:00"}]
---

# pgAdmin 4: Import/Export quoting bypass lets a database user run OS commands

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.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed pgAdmin 4 version in Help > About or the pgAdmin package manager output; affected if below `9.19`
- 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)

## Timeline

- 2026-10-30T20:25:37+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-116241

## From the sources

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.

This 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.

This issue affects pgAdmin 4: before 9.19.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
