🔍 CVE-2026-7816

8.8
CVSS Score
HIGH
2026-05-11
2026-10-26 18:10
✅ 완료

🇰🇷 한글 설명

pgAdmin 4의 Import/Export 쿼리 내보내기 기능에서 사용자 입력이 psql \copy 메타명령 템플릿에 검증 없이 삽입되어 OS 명령 주입(CWE-78) 취약점이 발생합니다. 인증된 사용자가 명령 실행 또는 임의 파일 쓰기를 수행할 수 있으며, 9.15 이전 버전에 영향을 줍니다.

💡 쉬운 설명

로그인한 사용자가 데이터 내보내기 기능의 입력란에 특수한 문자열을 넣어 pgAdmin 서버에서 임의의 명령을 실행할 수 있는 문제입니다. 해당 버전을 사용 중이라면 즉시 업데이트해야 합니다.

🇺🇸 원문 (English)

OS command injection (CWE-78) vulnerability in pgAdmin 4 Import/Export query export. User-supplied input was interpolated directly into a psql \copy metacommand template without sanitization. An authenticated user could inject ") TO PROGRAM 'cmd'" to break out of the \copy (...) context and achieve arbitrary command execution on the pgAdmin server, or ") TO '/path'" for arbitrary file write. Additional fields (format, on_error, log_verbosity) were also raw-interpolated and exploitable. Fix adds a parens-balance parser modeled on psql's strtokx tokenizer, allow-lists format/on_error/log_verbosity, rejects null bytes in the query, and tightens type and gating checks. This issue affects pgAdmin 4: before 9.15.

📍 영향받는 시스템

pgAdmin 4 9.15 이전 버전

⚔️ 공격 벡터

인증된 사용자가 쿼리 내보내기 입력값에 ') TO PROGRAM' 구문을 삽입해 서버에서 OS 명령을 실행하거나 임의 경로에 파일을 씁니다.

🛡️ 대응 방법

pgAdmin 4를 9.15 이상 버전으로 업데이트합니다.

🔧 검증 코드

출력된 버전이 9.15 미만이면 취약하므로 9.15 이상으로 업데이트가 필요하며, 버전 정보가 없으면 설치 여부를 별도로 확인해야 합니다.

Shell / Script
pip show pgadmin4 2>/dev/null | grep -i version || dpkg -l pgadmin4 2>/dev/null | grep pgadmin4

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

💻 영향받는 소프트웨어

UniFi OS Server