CVE-2026-61719

WeGIA: Stored Cross-Site Scripting (XSS) in "historico_prontuarios.php" via "textoProntuario" Field

Published Oct 29, 2026 CVSS 3.1 · 8.9 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

The vulnerability is a stored cross‑site scripting flaw in the WeGIA web manager that allows an attacker to submit malicious HTML or JavaScript through the 'textoProntuario' field. When a victim later views the medical history page, the attacker‑crafted script runs in the victim’s browser, enabling session cookie theft and potentially elevating privileges depending on user rights. This issue, identified as CWE‑79, can lead to account compromise and unauthorized data access.

Affected Systems

All installations of WeGIA older than version 3.8.7, maintained by LabRedesCefetRJ, are affected. The flaw exists in the 'saude/historico_prontuarios.php' page and the backend 'controle/control.php' handling of the 'alterarProntuario' method, allowing any user who can create or edit a patient record to inject scripts.

Risk and Exploitability

The CVSS score of 8.9 indicates a high severity flaw, while the EPSS score is not available; therefore the concrete likelihood of exploitation is unclear but the lack of sanitization suggests it could be easily abused. The vulnerability is not listed in the CISA KEV catalog, yet anyone with web access to the application can submit arbitrary content. An attacker who can authenticate or use an automated POST request can embed malicious code, which will be executed when other users view the affected page, leading to credential theft or session hijacking.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to WeGIA version 3.8.7 or later, where the stored XSS has been patched.
  • If an immediate upgrade is not feasible, sanitize the 'textoProntuario' input by stripping or encoding HTML and JavaScript before storing it, or configure the application to only accept safe content types.
  • Deploy a web application firewall or enable strict input validation on the 'alterarProntuario' endpoint to block scripts, and monitor logs for XSS attempts.

Generated by OpenCVE AI on October 29, 2026 at 22:25 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Labredescefetrj
Labredescefetrj wegia
Vendors & Products Labredescefetrj
Labredescefetrj wegia
Type Values Removed Values Added
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.
Title WeGIA: Stored Cross-Site Scripting (XSS) in "historico_prontuarios.php" via "textoProntuario" Field
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 8.9, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:L'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 3, 2026, 4:57 PM
Reserved
Jul 10, 2026, 6:51 PM
Status
Deferred
Published
Oct 29, 2026, 10:17 PM
Modified
Nov 3, 2026, 5:18 PM