🇰🇷 한글 설명
WeGIA는 자선 기관을 위한 웹 관리 도구입니다. 3.8.7 이전 버전에서 saude/historico_prontuarios.php의 textoProntuario 필드가 HTML이나 JavaScript를 적절한 검증 없이 허용하여 저장형 크로스 사이트 스크립팅(XSS) 취약점이 존재합니다. 이 취약점으로 공격자는 다른 사용자의 브라우저에서 임의의 스크립트를 실행하여 세션 쿠키를 탈취하고 계정을 침해할 수 있습니다.
💡 쉬운 설명
공격자가 환자 진료 기록에 악성 코드를 심어두면, 다른 사용자가 그 기록을 열 때 자동으로 실행됩니다. 이를 통해 피해자의 로그인 정보가 탈취될 수 있습니다.
🇺🇸 원문 (English)
WeGIA is a web manager for charitable institutions. Prior to 3.8.7, a stored cross-site scripting vulnerability in `saude/historico_prontuarios.php` arises because the `textoProntuario` field accepts arbitrary HTML or JavaScript without proper sanitization. An attacker able to create or access a patient's medical record can submit the field through `POST /controle/control.php` with `nomeClasse=SaudeControle`, `metodo=alterarProntuario`, and `id_fichamedica`. The stored content is rendered when another user accesses `/html/saude/historico_prontuarios.php` with `id_historico`, automatically executing attacker-controlled JavaScript in the victim's browser. The vulnerability permits session cookie theft and potential account compromise depending on the victim's privileges. This issue is fixed in version 3.8.7.
📍 영향받는 시스템
WeGIA 3.8.7 미만 버전
⚔️ 공격 벡터
진료 기록 저장 요청(POST /controle/control.php)에 악성 스크립트를 삽입한 뒤 피해자가 해당 기록 페이지를 열도록 유도
🛡️ 대응 방법
WeGIA를 3.8.7 이상 버전으로 업데이트
🔧 검증 코드
출력된 버전 값이 3.8.7 미만이면 취약하며, 3.8.7 이상이면 패치가 적용된 것입니다. 명령어 결과가 없으면 설치 경로를 직접 확인해야 합니다.
grep -rE "version|VERSION" /var/www/html/WeGIA 2>/dev/null | grep -iE "3\.8\.[0-9]+|3\.[0-7]\." | head -5