GitHub Advisoryadvisory · PyPI

GHSA-fxmw-jcgr-w44v pgadmin4 has a Meta-Command Filter Command Execution

CRITICAL Published 2025-12-11 Modified 2025-12-12 Official page ↗
Aliases
CVE-2025-13780
Ecosystem
PyPI
Packages
pgadmin4
Severity
Critical
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:L
Weaknesses
CWE-77, CWE-94
Reviewed
2025-12-12

Affected packages

• PyPI pgadmin4: < 9.11 → fixed in 9.11

Description

The PLAIN restore meta-command filter introduced in pgAdmin as part of the fix for CVE-2025-12762 does not detect meta-commands when a SQL file begins with a UTF-8 Byte Order Mark (EF BB BF) or other special byte sequences. The implemented filter uses the function `has_meta_commands()`, which scans raw bytes using a regular expression. The regex does not treat the bytes as ignorable, so meta-commands such as `\\!` remain undetected. When pgAdmin invokes psql with --file, psql strips the bytes and executes the command. This can result in remote command execution during a restore operation.

Related

Alias · CVE (1)

  • CVE-2025-13780 pgAdmin versions up to 9.10 are affected by a Remote Code Execution (RCE) vulnerability that occurs when running in server mode and… vulnerability

Weakness · CWE (2)

  • CWE-77 Improper Neutralization of Special Elements used in a Command weakness
  • CWE-94 Improper Control of Generation of Code weakness

References