🇰🇷 한글 설명
OpenEMR 8.2.0 이하 버전에서 백업 설정 가져오기 기능의 인증된 SQL 인젝션 취약점이 발견되었습니다. 관리자 권한을 가진 공격자가 조작된 SQL 파일을 업로드하여 데이터베이스에 임의의 DDL 및 DML 문을 실행할 수 있습니다. 이를 통해 자격 증명 해시 추출, 접근 제어 테이블 수정, 백도어 계정 생성 및 파일 시스템에 임의 파일을 작성하는 것이 가능합니다.
💡 쉬운 설명
관리자 권한을 가진 사용자가 악성 SQL 파일을 업로드하여 데이터베이스를 마음대로 조작할 수 있는 보안 약점입니다. 이 공격을 통해 해커가 비밀번호를 훔치거나 시스템에 몰래 뒷문을 만들어 둘 수 있습니다.
🇺🇸 원문 (English)
OpenEMR through 8.2.0 contains an authenticated SQL injection vulnerability in the backup configuration import feature that allows administrators with admin or super ACL privileges to execute arbitrary DDL and DML statements against the application database by uploading a crafted SQL file at the form_step=202 parameter in backup.php. Attackers can exploit the unfiltered shell_exec invocation of the mysql command-line client to extract credential hashes, modify access control tables, inject backdoor accounts, create persistent triggers or stored procedures, and write arbitrary files to the filesystem where MySQL FILE privileges and permissive secure_file_priv settings are configured.
📍 영향받는 시스템
OpenEMR 8.2.0 및 그 이전 버전
⚔️ 공격 벡터
backup.php의 form_step=202 파라미터에 조작된 SQL 파일을 업로드하여 mysql 명령어를 통한 SQL 인젝션 수행
🛡️ 대응 방법
OpenEMR을 최신 보안 패치가 적용된 버전으로 업데이트하고, MySQL의 secure_file_priv 설정을 강화하여 파일 쓰기 권한을 제한하십시오.
🔧 검증 코드
출력 결과에 OpenEMR 8.2.0 이하 버전이 표시되면 해당 취약점에 노출된 상태입니다.
curl -s http://<target_ip>/version.php | grep -E 'OpenEMR [0-8]\.[0-2]'