CVE-2025-13780: pgadmin4 has a Meta-Command Filter Command Execution
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 hasmetacommands(), which scans raw bytes using a regular expression.
Published Dec 11, 2025 · Updated Dec 12, 2025
Affected packages
pgadmin4
- Ecosystem
- PyPI
- Affected
- < 9.11
- Fixed in
- 9.11
- Check
pip show pgadmin4
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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.
Credited to zeropwn, Cycloctane.
References
- https://nvd.nist.gov/vuln/detail/CVE-2025-13780
- https://github.com/pgadmin-org/pgadmin4/issues/9368
- https://github.com/pgadmin-org/pgadmin4/pull/9426
- https://github.com/pgadmin-org/pgadmin4/commit/1d397395f75320ca1d4ed5e9ca721c603415e836
- https://github.com/pgadmin-org/pgadmin4/commit/d5a909f14cb9713d89b49481ad1929fad89f4576
- https://github.com/advisories/GHSA-fxmw-jcgr-w44v
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More PyPI vulnerabilities
All PyPI entriesCVE-2026-7813
pgAdmin 4 server mode has an authorization vulnerability affecting Server Groups, Servers, Shared Servers, Background Processes, and Debugger modules
critical9.9May 11, 2026CVE-2025-12762
pgAdmin4 vulnerable to Remote Code Execution (RCE) when running in server mode
critical9.1Nov 13, 2025CVE-2025-2945
pgAdmin 4 Vulnerable to Remote Code Execution
critical9.9Apr 3, 2025CVE-2025-2946
pgAdmin 4 Vulnerable to Cross-Site Scripting (XSS) via Query Result Rendering
critical9.1Apr 3, 2025
