🇰🇷 한글 설명
pgAdmin 4 서버 모드의 심각한 인증 취약점으로, 인증된 사용자가 다른 사용자의 private 서버, 서버 그룹, 백그라운드 프로세스에 접근 가능합니다. Shared Servers 기능에서는 자격증명 유출 및 passexec_cmd를 통한 임의 명령 실행까지 가능하여 소유자 권한으로 코드 실행이 가능합니다.
💡 쉬운 설명
pgAdmin 데이터베이스 관리 프로그램에서 사용자 권한 확인 실패로 타인의 서버 정보와 비밀번호가 노출될 수 있고, 악의적으로 명령어를 실행할 수 있습니다. 버전 9.15 미만의 모든 pgAdmin 4 사용자가 위험합니다.
🇺🇸 원문 (English)
Authorization vulnerability in pgAdmin 4 server mode affecting Server Groups, Servers, Shared Servers, Background Processes, and Debugger modules.
Multiple endpoints fetched user-owned objects without filtering by the requesting user's identity. An authenticated user could access another user's private servers, server groups, background processes, and debugger function arguments by guessing object IDs.
Additionally, the Shared Servers feature contained multiple issues including credential leakage (passexec_cmd, passfile, SSL keys), privilege escalation via writable passexec_cmd (a shell command executed when establishing the connection) allowing arbitrary command execution in the owner's process context, and owner-data corruption via SQLAlchemy session mutations. Several owner-only fields (passexec_cmd, passexec_expiration, db_res, db_res_type) were writable by non-owners through the API, and additional fields (kerberos_conn, tags, post_connection_sql) lacked per-user persistence so non-owner edits mutated the owner's record.
Fix centralises access control via a new server_access module, scopes all user-owned models with a UserScopedMixin, returns HTTP 410 from connection_manager when access is denied in server mode, suppresses owner-only fields for non-owners across the merge / API response / ServerManager paths, and adds an explicit owner-only write guard. The remediation landed in two pull requests; both are referenced.
This issue affects pgAdmin 4: before 9.15.
📍 영향받는 시스템
pgAdmin 4 버전 9.15 미만 (server mode)
⚔️ 공격 벡터
인증된 사용자가 객체 ID를 추측하여 REST API 엔드포인트 접근, 또는 Shared Servers의 passexec_cmd 필드를 수정하여 임의 명령 실행
🛡️ 대응 방법
pgAdmin 4를 9.15 이상으로 업그레이드하거나 공개된 패치 적용 (PR 참조)
🔧 검증 코드
설치된 pgAdmin 버전이 표시되면 버전 번호가 9.15 이상인지 확인. 버전이 9.15 미만이면 업그레이드 필요
dpkg -l | grep pgadmin4 && pgadmin4 --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+' | head -1