---
id: "CVE-2026-61719"
kind: "vulnerability"
aliases: ["CVE-2026-61719"]
title: "WeGIA: stored script injection in patient medical records"
severity: "high"
cvss: 8.9
epss: null
exploited: false
status: "open"
category: "other"
products: []
ecosystems: []
tags: ["healthcare", "other", "php", "self-hosted", "wegia"]
not_affected_if: ["no-health-module-use", "version-3.8.7-or-later"]
published_at: "2026-10-29T22:17:05+00:00"
first_seen_at: "2026-10-29T22:27:07+00:00"
updated_at: "2026-10-29T22:28:38+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-61719", "first_seen_at": "2026-10-29T22:27:07+00:00"}]
---

# WeGIA: stored script injection in patient medical records

WeGIA, a web manager for charitable institutions, stores a patient record field without sanitizing HTML or JavaScript. When another user opens that record, the script runs in their browser and can steal session cookies.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Look up the WeGIA version in use; affected versions are those before `3.8.7`
- Check whether users can create or edit patient medical records (the `textoProntuario` field in `saude/historico_prontuarios.php`)

## Fix

- Move WeGIA to version `3.8.7` or later

## Timeline

- 2026-10-29T22:27:07+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-61719

## From the sources

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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
