CVE-2025-13780 is a critical command injection vulnerability in pgAdmin 4 affecting versions prior to 9.11 when the product is deployed in server mode and used to restore PLAIN-format PostgreSQL dump files. The flaw is caused by inadequate filtering of dangerous psql meta-commands during restore processing. An attacker can craft a malicious plain-text dump file that bypasses the application’s defensive checks, including by using unexpected whitespace to evade regex-based filtering, causing pgAdmin to pass attacker-controlled content to the underlying psql restore workflow. Because the restore path permits execution of injected commands on the host running pgAdmin, successful exploitation results in remote code execution on the server.
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
If you can’t patch tonight, do this now.
Patch, then assume compromise.
2 valid exploits after Mallory filtered fakes, detection scripts, and README-only repos (4 hidden).
This repository is a small standalone Python proof-of-concept for authenticated remote code execution against pgAdmin 4 via CVE-2026-17566. The repo contains three files: an MIT LICENSE, a README describing the vulnerability and usage, and a single executable Python script, pgadmin4_rce_poc.py, which is the clear entry point. The exploit is not part of a larger framework. It uses Python standard-library networking only: urllib for HTTP(S), cookiejar for session handling, ssl for optional certificate verification bypass, regex for CSRF token extraction, and json for request construction. The script implements a complete attack flow: authenticate to pgAdmin, retrieve a CSRF token from GET /login, submit credentials to POST /login, enumerate accessible server objects via GET /browser/servers, then send a crafted JSON request to POST /import_export/job/<sid>. Its core capability is command execution on the host running pgAdmin. The malicious query is built by build_query(), which returns a payload of the form SELECT 'a\') TO PROGRAM '%s' x'. This is designed to exploit a parsing mismatch between pgAdmin's parenthesis checker and psql string handling, causing the injected TO PROGRAM clause to become active. The operator can supply an arbitrary command with --command or request an automatically generated bash reverse shell with --reverse HOST:PORT. Default demonstration behavior writes command output to /tmp/pgadmin_rce_proof, and the export job uses /tmp/pgadmin_export.csv as the nominal output file. Operationally, this is more than a detector: it performs authentication, target enumeration, payload generation, and exploit delivery. However, it is still a PoC-style standalone script rather than a weaponized framework module. The README also notes the code was based on public analysis and may require minor field adjustments depending on exact pgAdmin version behavior.
This repository contains a proof-of-concept exploit targeting the pgAdmin web interface's database restore functionality. The main script (scripts/ui_restore_exploit.py) automates a session with pgAdmin, logs in as an admin, connects to a configured PostgreSQL server, and triggers a restore operation using a crafted SQL file. The SQL files (test_files/crlf_attack.sql and test_files/vt_attack.sql) contain meta-commands with special whitespace (carriage return, vertical tab) to bypass input validation and execute arbitrary shell commands on the server. Successful exploitation is indicated by the creation of files (/tmp/pgadmin_crlf, /tmp/pgadmin_vt) on the server, demonstrating command execution. The exploit requires access to a running pgAdmin instance and valid admin credentials. The attack vector is network-based, targeting the web interface via HTTP requests.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
14 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.
A related remote code execution vulnerability involving psql meta-command/COPY injection during PLAIN-format dump restore, mentioned for comparison as the same bug class.
A vulnerability in pgAdmin. No further details provided in the content.
A critical remote code execution vulnerability in pgAdmin that allows attackers to take over the server by exploiting a flaw in the database restore functionality. The flaw bypasses previous fixes.
A critical remote code execution vulnerability in pgAdmin 4 (prior to version 9.11) that allows attackers to bypass security filters and execute arbitrary shell commands on the host server via specially crafted SQL dump files.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.