Skip to main content
Mallory
HighPublic exploitVulnerability

CVE-2025-13780: pgAdmin 4 PLAIN Restore Filter Bypass Leading to Remote Code Execution

Published Dec 11, 2025 · Updated 6 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS8.8High · v3.1
EPSS0.95%62nd percentile
CISA KEVNoNot listed
In the wildNonePublic exploit, no exploitation reported
Vendor
Pgadmin
IdentifiersCVE-2025-13780CWE-78

CVE-2025-13780 is a command injection vulnerability affecting pgAdmin 4 versions through 9.10 when running in server mode and restoring PLAIN-format database dumps. The has_meta_commands() filter, introduced to address CVE-2025-12762, does not interpret certain input bytes consistently with psql. A crafted dump beginning with a UTF-8 byte order mark or certain other special byte sequences can conceal dangerous meta-commands from validation. When psql processes the dump, it strips those bytes and executes commands that escaped detection, potentially allowing arbitrary shell command execution on the pgAdmin host.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation permits arbitrary command execution on the server hosting pgAdmin, within the operating-system privileges of the restore process. This can compromise application integrity and expose or modify database credentials, managed data, and other resources accessible to that process. The extent of host compromise depends on the process privileges and accessible resources.

Mitigation

If you can’t patch tonight, do this now.

Until the upgrade is deployed, prevent untrusted PLAIN-format dumps from being restored through pgAdmin in server mode. Restrict access to restore functionality and accept restore files only from trusted, verified sources. These measures reduce exposure but do not correct the filter bypass.

Remediation

Patch, then assume compromise.

Upgrade pgAdmin 4, including installations using the PyPI pgadmin4 package, to version 9.11 or a later fixed release. Version 9.11 uses psql's \restrict command during restore to block hazardous operations at execution time rather than relying solely on input filtering.

Public exploits

Exploits

2 exploits validated by Mallory's analysis. Hidden: 4 rejected by Mallory's analysis as not a working exploit.

View more in app →
CVE-2026-17566This 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.HackSpeak · Disclosed Aug 4, 2026 · python · markdown · web · networkOperationalPoC-CVE-2025-13780This 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.meenakshisl · Disclosed Dec 12, 2025 · python · sql · networkPoC
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
PgadminPgadmin 4application
FAQ

Frequently asked questions

Is CVE-2025-13780 exploited in the wild?
As of Nov 17, 2026, Mallory has no reports of CVE-2025-13780 being exploited in the wild. It is not listed in CISA KEV.
Is there a public exploit for CVE-2025-13780?
Yes. Mallory tracks 2 public exploits or proofs of concept for CVE-2025-13780, the earliest disclosed Dec 12, 2025.
Is there a patch for CVE-2025-13780?
Upgrade pgAdmin 4, including installations using the PyPI pgadmin4 package, to version 9.11 or a later fixed release. Version 9.11 uses psql's \restrict command during restore to block hazardous operations at execution time rather than relying solely on input filtering.
What products are affected by CVE-2025-13780?
Pgadmin 4.
How severe is CVE-2025-13780?
CVE-2025-13780 has a CVSS v3.1 score of 8.8 (High) and an EPSS score of 0.95% (62nd percentile) as of Nov 17, 2026.
Activity feed

Recent activity

15 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
+1 more in the timeline. Sign up to see them
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity10Community discussion across Reddit, Mastodon, and other social sources.