All reports
Critical

pgadmin4 has a Meta-Command Filter Command Execution

Affected versions

Version ranges need review.

Affected versions
<9.11
Fixed version
9.11
Affected versions
< 9.11
Fixed version
9.11

Exploitation

CVE-2025-13780

Probability of exploitation in the next 30 days: 0.95%

FIRST EPSS · 2026-11-22

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.

Links

Credits

  • zeropwn
  • Cycloctane