---
id: "CVE-2025-12762"
page: "https://infrastack.ai/live/CVE-2025-12762"
kind: "vulnerability"
aliases: ["CVE-2025-12762", "GHSA-w2p4-p4rh-qcm3"]
title: "pgAdmin4 vulnerable to Remote Code Execution (RCE) when running in server mode"
severity: "critical"
cvss: 9.8
epss: 0.12705
exploited: false
status: "open"
category: "package"
products: [{"name": "pgadmin4", "fixed": ["9.10"], "affected": "< 9.10", "ecosystem": "pypi"}, {"name": "pgadmin 4", "fixed": ["9.10"], "affected": "< 9.10", "ecosystem": "vendor"}]
ecosystems: ["pypi", "vendor"]
tags: ["cwe-94", "package", "pgadmin4", "postgresql", "python", "self-hosted"]
not_affected_if: ["desktop-mode", "no-restore-use"]
published_at: "2025-11-13T13:15:44+00:00"
first_seen_at: "2026-11-16T15:53:11+00:00"
updated_at: "2026-11-16T16:08:50+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-w2p4-p4rh-qcm3", "first_seen_at": "2026-11-16T15:53:11+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-12762", "first_seen_at": "2026-11-16T16:08:50+00:00"}]
exploit_sources: [{"type": "epss", "score": 0.12705, "url": "https://api.first.org/data/v1/epss?cve=CVE-2025-12762"}]
---

# pgAdmin4 vulnerable to Remote Code Execution (RCE) when running in server mode

Link for people: https://infrastack.ai/live/CVE-2025-12762 (this .md is for agents)

pgAdmin 4 versions before 9.10 let a user who restores a PLAIN-format dump file inject commands that run on the server hosting pgAdmin. An attacker who can supply or influence such a dump can execute arbitrary commands on that server.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- pypi:pgadmin4 affected < 9.10 fixed 9.10
- vendor:pgadmin 4 affected < 9.10 fixed 9.10

## How to check

- Check the installed version with `pip show pgadmin4` and confirm whether it is below `9.10`.
- Confirm whether pgAdmin runs in server mode (`SERVER_MODE = True` in the config) and whether users can restore dump files.

## Fix

- pgadmin4 (PyPI): upgrade to `9.10`.

## Timeline

- 2026-11-16T15:53:11+00:00 ghsa https://github.com/advisories/GHSA-w2p4-p4rh-qcm3
- 2026-11-16T16:08:50+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2025-12762

## Documents

- [advisory] Vendor advisory: github.com https://github.com/pgadmin-org/pgadmin4/issues/9320
- [fix] Patch: github.com https://github.com/pgadmin-org/pgadmin4/commit/1d397395f75320ca1d4ed5e9ca721c603415e836

## From the sources

pgAdmin versions up to 9.9 are affected by a Remote Code Execution (RCE) vulnerability that occurs when running in server mode and performing restores from PLAIN-format dump files. This issue allows attackers to inject and execute arbitrary commands on the server hosting pgAdmin, posing a critical risk to the integrity and security of the database management system and underlying data.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
