# CVE-2026-86861: pgAdmin 4: File Manager save_file writes through a symbolic link planted after the containment check

> An attacker with filesystem access can exploit a race condition in pgAdmin 4's file manager to write arbitrary files outside the intended directory.

- **Severity:** Medium 6.0 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 17 Sep 2026
- **Updated:** 17 Sep 2026
- **Also known as:** GHSA-2wg3-5wmg-5872

## What is CVE-2026-86861?

CVE-2026-86861 is a medium-severity path traversal vulnerability in pgadmin.org pgAdmin 4, published on 17 Sep 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

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.

Weakness: CWE-59 (Improper Link Resolution Before File Access), CWE-367 (Time-of-check Time-of-use (TOCTOU) Race Condition)

## Which versions are affected by CVE-2026-86861?

It affects 1 product.


Products: Pgadmin Pgadmin 4.

## How do I fix CVE-2026-86861?

No fix has been published for CVE-2026-86861 yet. Limit exposure of the affected software until one is available.

## Is CVE-2026-86861 being exploited?

There is no known exploitation of CVE-2026-86861 in the wild and no public exploit code.

## Other vulnerabilities in pgadmin.org pgAdmin 4

- [CVE-2025-2945](https://insights.sbomify.com/CVE-2025-2945/): pgAdmin 4: Remote Code Execution in Query Tool and Cloud Deployment (critical 9.9)
- [CVE-2024-9014](https://insights.sbomify.com/CVE-2024-9014/): OAuth2 client id and secret exposed through the web browser in pgAdmin 4 (critical 9.9)
- [CVE-2026-12046](https://insights.sbomify.com/CVE-2026-12046/): Deserialization in pgAdmin 4 (critical 9.5)
- [CVE-2026-17351](https://insights.sbomify.com/CVE-2026-17351/): SQL injection in pgAdmin 4 (critical 9.4)
- [CVE-2026-17566](https://insights.sbomify.com/CVE-2026-17566/): Command injection in pgAdmin 4 (critical 9.4)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-86861 and fix it if it is affected.

What it is: CVE-2026-86861 is a medium-severity path traversal vulnerability in pgadmin.org pgAdmin 4, published on 17 Sep 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-86861 in the wild and no public exploit code.

Affected product: pgadmin.org pgAdmin 4. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-86861/ (Markdown: https://insights.sbomify.com/CVE-2026-86861/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-86861
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-86861
- OSV: https://osv.dev/vulnerability/CVE-2026-86861

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-86861/
Summaries are generated and may contain mistakes; the official description above is the record.
