Katalog CVE

CVE-2026-86861

ŚrednieCVSS 5.9
Opublikowano: Przetłumaczono: NVD NIST

Streszczenie

W pgAdmin 4 endpoint save_file w File Managerze sprawdzał uprawnienia do ścieżki za pomocą Filemanager.check_access_permission(), a następnie otwierał plik do zapisu zwykłym wywołaniem open(), bez flagi O_NOFOLLOW. W efekcie, jeśli w oknie czasowym między sprawdzeniem a zapisem podmieniono ostatni element ścieżki na dowiązanie symboliczne, zapis podążał za tym dowiązaniem i mógł utworzyć lub nadpisać dowolny plik z uprawnieniami konta systemowego pgAdmin. Luka dotyczy wersji pgAdmin 4 od wprowadzenia sprawdzania zawartości w ścieżce zapisu File Managera do wersji 9.18.

Ocena ryzyka

Wykorzystanie wymaga możliwości utworzenia lub podmiany dowiązania symbolicznego w katalogu storage użytkownika oraz trafienia w okno czasowe między sprawdzeniem a zapisem, co zwykle oznacza dostęp do systemu plików hosta pgAdmin lub współdzielonego/montowanego sieciowo backendu storage. Skutkiem może być utworzenie lub nadpisanie dowolnego pliku z uprawnieniami konta systemowego pgAdmin, co potencjalnie prowadzi do eskalacji uprawnień lub dalszej kompromitacji.

Rekomendacja

Zaktualizuj pgAdmin 4 do wersji 9.18 lub nowszej, która kieruje zapis save_file przez ten sam helper z O_NOFOLLOW używany przy uploadzie i zgłasza odmowę obsługi dowiązania symbolicznego. Ogranicz dostęp do systemu plików hosta pgAdmin oraz do współdzielonego/montowanego sieciowo storage'u wyłącznie do zaufanych kont.

Inne podatności w pgAdmin 4

Zobacz wszystkie
Oryginalny opis (angielski, źródło NVD)

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.

Dane podatności pochodzą z NVD (NIST) · CISA KEV · EPSS