Skip to main content

pgAdmin 4 CVE-2026-86861

| EUVDEUVD-2026-81693 MEDIUM
Time-of-check Time-of-use (TOCTOU) Race Condition (CWE-367)
2026-09-17 PostgreSQL GHSA-2wg3-5wmg-5872
6.0
CVSS 4.0 · Vendor: PostgreSQL
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain pgAdmin session plus shared-storage filesystem access
  2. Delivery
    Submit save_file request from Query Tool/ERD
  3. Exploit
    Race a symlink into final path component after check
  4. Execution
    open() follows link past the check
  5. Impact
    Write/overwrite arbitrary file as pgAdmin OS account

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture TOCTOU prevention
Exploitation Conditions

Requires: (1) an authenticated pgAdmin user able to invoke the File Manager save_file endpoint via the Query Tool or ERD (PR:L); AND (2) the ability to create or replace a symbolic link inside that user's storage directory - pgAdmin exposes no symlink-creation interface, so this mandates filesystem access to the pgAdmin host or to a shared/network-mounted storage backend; AND (3) winning the narrow TOCTOU timing window between check_access_permission() and the plain open() write. Limiting factors: exploitation is confined to pgAdmin 4 versions before 9.18; the race is hard to win (reporter failed ~63,000 attempts on a released build); a symlink already present when the check runs is rejected, so only a link substituted at the final path component during the window works; intermediate-directory substitution is out of scope. A default single-host deployment where no other party can write to the storage directory is effectively not exploitable.

Impact

This is a genuine but low-priority defect. The CVSS 3.1 vector (AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:L, score 5.9) already signals the tension: although scored as network-reachable, the actual exploit requires an out-of-band prerequisite the vector cannot express - the attacker must be able to create or replace a symbolic link inside the requesting user's storage directory, meaning filesystem access to the pgAdmin host or a shared/network-mounted storage backend. AC:H is well justified: this is a classic TOCTOU (CWE-367) race between check_access_permission() and the plain open(), and the reporter explicitly failed to win it - roughly 63,000 racing requests produced no successful arbitrary write against a released build. No EPSS, KEV, or SSVC data is supplied, and there is no public exploit; the referenced material is a project issue tracker, not weaponized code. Net: I:H would be serious if reliably reachable, but the combination of a hard-to-win race plus a mandatory local/shared-filesystem foothold makes real-world exploitability marginal. Treat as a defense-in-depth hardening fix, not an urgent patch - the vendor characterizes it as an uncovered write path rather than a demonstrated sandbox escape.

Exploit ScenarioDerived

An attacker who already has an authenticated pgAdmin session (PR:L) and separate filesystem access to a shared or network-mounted storage backend triggers a save from the Query Tool or ERD, then races to swap a symlink into the final path component after check_access_permission() passes but before the plain open() writes. Winning the window makes pgAdmin follow the link and create or overwrite an arbitrary file as the OS account running pgAdmin. No public exploit exists, and the original reporter could not achieve a write in ~63,000 attempts against a released version.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 17, 2026

A time-of-check/time-of-use race in the pgAdmin 4 File Manager save_file endpoint (versions before 9.18) allows an authenticated user who can also plant or replace a symbolic link inside their own storage directory to redirect a save issued from the Query Tool or ERD so the write follows the link and lands outside the intended storage path, creating or overwriting an arbitrary file as the operating-system account running pgAdmin. Exploitation is tightly constrained: pgAdmin exposes no symlink-creation interface, so the attacker needs filesystem access to the pgAdmin host or a shared/network-mounted storage backend, plus a winning timing window that the reporter could not achieve in roughly 63,000 racing requests against a released build, and no public exploit code or confirmed active exploitation is known. The reported defect is a genuine but low-priority uncovered write path rather than a demonstrated sandbox escape.

RemediationAI

Upgrade to pgAdmin 4 9.18 or later, which is the vendor-released patch and routes save_file's write through the same O_NOFOLLOW-protected helper already used by the upload path (see the upstream issue at https://github.com/pgadmin-org/pgadmin4/issues/10385 for details). Because the fix only protects the final path component and intermediate-directory substitution is explicitly out of scope, pair the upgrade with compensating controls: ensure the pgAdmin storage directory is writable only by the pgAdmin operating-system account and not by any other local or remote user, and avoid hosting that storage on shared or network-mounted backends (NFS, SMB, or similar) where a second party could create or replace symlinks - the trade-off is that this breaks multi-writer or shared-storage workflows that some deployments rely on. Run pgAdmin under a least-privilege service account so that any redirected write lands somewhere inconsequential, and if File Manager save functionality is not required, restrict or disable access to the Query Tool/ERD save paths for non-administrative users; note that this removes a legitimate feature. Also be aware that files created by save_file are now given mode 0600, which can break downstream processes or shared consumers that previously relied on group- or world-readable output.

Affected VersionsENISA

pgAdmin 4 0 <9.18

Affected Packages

euvd pgadmin_4 fix: 9.18

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

pgAdmin 4's File Manager backs file saving from the Query Tool and ERD through a save_file endpoint that first validated the requested path with Filemanager.check_access_permission() and then wrote to it with a plain open() call, leaving a classic time-of-check/time-of-use gap (CWE-367). A prior fix, CVE-2026-7819, had already hardened the separate upload path by opening its target with O_NOFOLLOW so the kernel refuses to follow a symlink present at the final path component; save_file never received that protection, so while a symlink already in place when the check ran was rejected by the check itself, a link substituted at the final component between check and write would be followed, redirecting the write outside the user's storage directory. The exploited primitive is therefore a filesystem race, not a missing authorization check, which is why the assessed vector is AC:H with PR:L and shows integrity and availability impact (I:H/A:L) but no confidentiality impact (C:N) - the write lands where the symlink points as the pgAdmin OS account. The 9.18 fix routes save_file's write through the same O_NOFOLLOW-protected helper used by the upload path, so both File Manager write sinks carry identical kernel-enforced protection, and it reports a symlink refusal explicitly instead of leaking the underlying system error text; newly created files are also assigned mode 0600, inheriting the upload behaviour. The protection covers only the final path component - substitution of an intermediate directory component remains unaddressed by this change; the CPE cpe:2.3:a:pgadmin.org:pgadmin_4:*:*:*:*:*:*:*:* identifies the affected pgAdmin 4 product line, and EUVD-2026-81693 records the affected range as before 9.18.

Know when Pgadmin 4 gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (PostgreSQL) PRIMARY 6.0 MEDIUM
CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N
vuln.today AI 5.9 MEDIUM

AC:H for the TOCTOU race plus required filesystem/symlink foothold; PR:L for an authenticated pgAdmin user; I:H arbitrary file overwrite, A:L, C:N as no read primitive exists.

3.1 AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:L
4.0 AV:N/AC:H/AT:P/PR:L/UI:N/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N
SUSE 5.0 MEDIUM
AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:H/A:L

Primary rating from Vendor (PostgreSQL).

CVSS VectorVendor: PostgreSQL

Attack Vector
Network
Attack Complexity
High
Attack Requirements
Present
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
High
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

3
CVSS changed
Sep 17, 2026 - 16:22 NVD
5.9 (MEDIUM) 6.0 (MEDIUM)
Patch available
Sep 17, 2026 - 16:02 EUVD
CVE Published
Sep 17, 2026 - 15:30 cve.org
MEDIUM 5.9

DescriptionCVE.org

pgAdmin 4's File Manager save_file endpoint, which backs saving from the Query Tool and ERD, validated the requested path with Filemanager.check_access_permission() and then opened the file for writing with a plain open() call. CVE-2026-7819 had previously hardened the separate file upload path by opening its target with O_NOFOLLOW, so that the kernel refuses to follow a symbolic link at the final path component, but save_file was left on an unprotected open(). A symbolic link already present when the check ran was rejected by the check itself; the remaining exposure was a link substituted at the final path component in the interval between the check and the write, at which point the write followed the link and landed outside the user's storage directory, creating or overwriting an arbitrary file as the operating-system account running pgAdmin.

Exploitation requires the ability to create or replace a symbolic link inside the requesting user's storage directory. pgAdmin exposes no interface that creates symbolic links, so this requires filesystem access to the pgAdmin host or to a shared or network-mounted storage backend, together with winning the timing window. The reporter did not achieve a write against a released version, having attempted approximately 63,000 racing requests without success; the reported defect is the uncovered write path rather than a demonstrated sandbox escape.

The fix routes save_file's write through the same O_NOFOLLOW-protected helper already used by the upload path, so both File Manager write sinks carry identical kernel-enforced protection, and reports a symbolic-link refusal explicitly instead of surfacing the underlying system error text. Note that files created by save_file are now given mode 0600, inheriting the behaviour introduced for uploads. The protection covers the final path component; substitution of an intermediate directory component is not addressed by this change.

This issue affects pgAdmin 4: from the introduction of the containment check in the File Manager save path before 9.18.

Threat Intelligence Overview

EPSS Score
0.4%
Top 62% exploitable
Prevalence
High
pgAdmin 4 is the dominant GUI administration tool for PostgreSQL
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
High

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Malicious file upload attacks exploit insufficient validation when web applications accept user-provided files.

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2024-2044 CRITICAL POC
9.9 Mar 07

pgAdmin <= 8.3 is affected by a path-traversal vulnerability while deserializing users’ sessions in the session handling

CVE-2024-3116 CRITICAL POC
9.8 Apr 04

pgAdmin <= 8.4 is affected by a Remote Code Execution (RCE) vulnerability through the validate binary path API. Rated cr

CVE-2026-12046 CRITICAL POC
9.5 Jun 18

Remote unauthenticated access to two SQL Editor endpoints in pgAdmin 4 server-mode deployments (versions 6.9 through 9.1

CVE-2022-4223 HIGH POC
8.8 Dec 13

The pgAdmin server includes an HTTP API that is intended to be used to validate the path a user selects to external Post

CVE-2024-9014 MEDIUM POC
6.5 Sep 23

pgAdmin versions 8.11 and earlier are vulnerable to a security flaw in OAuth2 authentication. Rated medium severity (CVS

CVE-2025-12762 CRITICAL
9.8 Nov 13

Remote code execution in pgAdmin 4 (versions up to and including 9.9) lets an attacker who can get a crafted PLAIN-forma

CVE-2026-12045 CRITICAL
9.4 Jun 18

Remote SQL injection via prompt injection in pgAdmin 4 versions 9.13 through 9.15 allows attackers who can write content

CVE-2026-17351 CRITICAL
9.4 Jul 31

SQL injection sandbox escape in pgAdmin 4's AI Assistant (versions 9.13 through 9.16) lets an attacker break out of the

CVE-2026-17566 CRITICAL POC
9.4 Jul 31

OS command injection in pgAdmin 4 (all versions before 9.18) lets an authenticated user with the commonly-granted tools_

CVE-2026-7813 CRITICAL
9.4 May 11

Authorization bypass and privilege escalation in pgAdmin 4 server mode allows authenticated users to access other users'

CVE-2024-4216 MEDIUM POC
5.4 May 02

pgAdmin <= 8.5 is affected by XSS vulnerability in /settings/store API response json payload. Rated medium severity (CVS

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Affected
SUSE Linux Enterprise Module for Python 3 15 SP7 Affected
SUSE Linux Enterprise Server 15 SP7 Affected
SUSE Linux Enterprise Server for SAP Applications 15 SP7 Affected
SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy