Impact
pgAdmin 4 renders user‑supplied description text inside a single‑quoted SQL literal without proper escaping, creating a classic SQL injection surface. An authenticated user who can create or alter objects such as Domains, Foreign Tables, Languages, Event Triggers, or Views can supply a description containing an apostrophe to break out of the literal and inject arbitrary SQL statements. The injected statements run under the PostgreSQL role that the user already holds, meaning the attacker does not gain additional database privileges beyond those already granted by the role. However, if that role also has privileges such as COPY … TO/FROM PROGRAM, the injection can lead directly to operating‑system command execution on the database host. Because the vulnerability does not cross a privilege boundary it is an application‑level flaw, but the impact can be severe for privileged roles.
Affected Systems
Affected systems are pgAdmin 4 versions 1.0 through 9.15 inclusive. All dialog templates that render the statement "COMMENT ON … IS '<description>'" are impacted, including Domain, Foreign Table, Language, Event Trigger, and View dialogs. Additional sites were found in statistics templates for pgstattuple and pgstatindex that also interpolate user data without proper escaping.
Risk and Exploitability
The CVSS score of 8.7 indicates high severity. The EPSS score is not currently available, and the vulnerability is not listed in the CISA KEV catalog, suggesting no confirmed exploitation yet. The attack vector requires an authenticated pgAdmin user with the ability to create or alter the affected object types. In practice the likelihood of exploitation depends on the datastore’s role configuration: users with superuser status or COPY TO/FROM PROGRAM privileges will confer the threat of OS command execution, while ordinary users face limited impact confined to the database role's existing authority.
OpenCVE Enrichment