{"id":"CVE-2025-13780","aliases":["GHSA-fxmw-jcgr-w44v","PYSEC-2026-450"],"url":"https://o3.security/vulnerability/CVE-2025-13780","summary":"Remote Code Execution vulnerability when restoring PLAIN-format SQL dumps in server mode (pgAdmin 4)","details":"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.","published":"2025-12-11T18:30:47.812Z","modified":"2026-11-04T10:30:30.898940382Z","cvss":{"score":9.1,"severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:L"},"epss":{"score":0.00957,"percentile":0.58767,"asOf":"2026-08-24"},"cisaKev":null,"exploitsKnown":2,"affectedPackages":[{"ecosystem":"PyPI","name":"pgadmin4","fixedVersion":"9.11"}],"fix":{"url":"https://github.com/pgadmin-org/pgadmin4/pull/9426","label":"pgadmin-org/pgadmin4#9426"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/13xxx/CVE-2025-13780.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-13780"},{"type":"REPORT","url":"https://github.com/pgadmin-org/pgadmin4/issues/9368"},{"type":"PACKAGE","url":"https://github.com/pgadmin-org/pgadmin4"},{"type":"WEB","url":"https://github.com/pgadmin-org/pgadmin4/pull/9426"},{"type":"WEB","url":"https://github.com/pgadmin-org/pgadmin4/commit/1d397395f75320ca1d4ed5e9ca721c603415e836"},{"type":"WEB","url":"https://github.com/pgadmin-org/pgadmin4/commit/d5a909f14cb9713d89b49481ad1929fad89f4576"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-11-04T10:30:30.898940382Z"}}