{"id":"CVE-2026-61719","published":"2026-10-29T22:17:05.763","lastModified":"2026-10-29T22:17:05.883","description":"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.","cvssScore":8.9,"cvssSeverity":"HIGH","cvssVector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:L","cwes":["CWE-79"],"vendors":[],"products":[],"references":[{"url":"https://github.com/LabRedesCefetRJ/WeGIA/commit/52eeca63e9df1298c6f661d55aa26dc9eb0f564d","tags":[]},{"url":"https://github.com/LabRedesCefetRJ/WeGIA/issues/1704","tags":[]},{"url":"https://github.com/LabRedesCefetRJ/WeGIA/releases/tag/3.8.7","tags":[]},{"url":"https://github.com/LabRedesCefetRJ/WeGIA/security/advisories/GHSA-qm7p-cprp-f974","tags":[]}],"exploitRefs":[{"url":"https://github.com/LabRedesCefetRJ/WeGIA/commit/52eeca63e9df1298c6f661d55aa26dc9eb0f564d","tags":[]},{"url":"https://github.com/LabRedesCefetRJ/WeGIA/issues/1704","tags":[]},{"url":"https://github.com/LabRedesCefetRJ/WeGIA/releases/tag/3.8.7","tags":[]},{"url":"https://github.com/LabRedesCefetRJ/WeGIA/security/advisories/GHSA-qm7p-cprp-f974","tags":[]}],"hasPoc":true,"ai":{"summary":"A stored XSS flaw in WeGIA's medical record history page allows authenticated attackers to inject malicious JavaScript that executes when other users view the same record, enabling session theft and privilege escalation.","exploitability":"Exploitation requires low skill and only a valid authenticated user account with access to create or edit a patient's medical record.","blast_radius":"Any staff member who views the tampered record—especially those with elevated privileges—could have their session hijacked, leading to unauthorized access to sensitive health data or system functions.","remediation":"Upgrade to WeGIA version 3.8.7 or later, which patches the stored XSS vulnerability in the `textoProntuario` field.","detection":"Look for unexpected JavaScript or HTML tags (e.g., `<script>`, `onerror=`, `javascript:` URIs) submitted via POST requests to `/controle/control.php` with `nomeClasse=SaudeControle` and `metodo=alterarProntuario`, especially when stored in the `textoProntuario` field; subsequent rendering of such content in `/html/saude/historico_prontuarios.php` may be observable in access logs or browser console errors if the victim's session triggers execution.","tags":["xss","stored-xss","web-app","healthcare","session-theft"],"model":"garnet-coder","analyzedAt":"2026-10-30T09:21:51.585Z"}}