{"id":"CVE-2026-61719","kind":"vulnerability","aliases":["CVE-2026-61719"],"related":[],"title":"WeGIA: stored script injection in patient medical records","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.","summary":"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.","severity":"high","cvss":8.9,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["healthcare","other","php","self-hosted","wegia"],"not_affected_if":["no-health-module-use","version-3.8.7-or-later"],"how_to_check":"- Look up the WeGIA version in use; affected versions are those before `3.8.7`\n- 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","status":"open","published_at":"2026-10-29T22:17:05+00:00","first_seen_at":"2026-10-29T22:27:07+00:00","triaged_at":"2026-10-29T22:28:38+00:00","updated_at":"2026-10-29T22:28:38+00:00","category":"other","confidence":0.8,"triage":{"at":"2026-10-29T22:28:38Z","model":"claude-haiku-5-5","output":{"fix":"- Move WeGIA to version `3.8.7` or later","reach":"network","title":"WeGIA: stored script injection in patient medical records","impact":"high","summary":"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.","audience":"businesses","category":"other","nicknames":[],"who_cares":["wegia","self-hosted","php","healthcare"],"confidence":0.8,"fix_status":"available","needs_auth":"yes","worst_case":"Session cookies stolen; victim account compromised, possibly with admin rights","analyst_note":"","how_to_check":"- Look up the WeGIA version in use; affected versions are those before `3.8.7`\n- Check whether users can create or edit patient medical records (the `textoProntuario` field in `saude/historico_prontuarios.php`)","plain_action":"","needs_analyst":false,"not_affected_if":["version-3.8.7-or-later","no-health-module-use"],"who_is_affected":"Charitable institutions running WeGIA before version 3.8.7 that let staff create or edit patient medical records. The risk is that one staff member's malicious record entry runs script in a colleague's browser when they open it, which can lead to account takeover depending on that colleague's privileges. Installations that do not use the health module or restrict who can edit records have less exposure.","user_interaction":"yes","needs_special_setup":"unknown","severity_if_unknown":"high"},"cost_usd":0.000695,"input_tokens":4290,"output_tokens":531,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-2026':10A,13A '-61719':11A,14A '/controle/control.php':107C '/html/saude/historico_prontuarios.php':125C '3.8.7':66C,162C 'abl':91C 'accept':81C 'access':95C,124C 'account':148C 'alterarprontuario':112C 'anoth':40B,122C 'arbitrari':82C 'aris':76C 'attack':90C,132C 'attacker-control':131C 'automat':129C 'browser':50B,139C 'charit':27B,62C 'compromis':149C 'content':118C 'control':133C 'cooki':55B,144C 'creat':93C 'cross':70C 'cross-sit':69C 'cve':9A,12A 'depend':150C 'execut':130C 'fichamedica':115C 'field':33B,80C,104C 'fix':159C 'healthcar':15B 'historico':128C 'host':20B 'html':36B,83C 'id':114C,127C 'inject':4A 'institut':28B,63C 'issu':157C 'javascript':38B,85C,134C 'manag':25B,60C 'medic':7A,99C 'metodo':111C 'nomeclass':109C 'open':42B 'patient':6A,31B,97C 'permit':142C 'php':17B 'post':106C 'potenti':147C 'prior':64C 'privileg':155C 'proper':87C 'record':8A,32B,44B,100C 'render':120C 'run':47B 'sanit':35B,88C 'saude/historico_prontuarios.php':75C 'saudecontrol':110C 'script':3A,46B,72C 'self':19B 'self-host':18B 'session':54B,143C 'site':71C 'steal':53B 'store':2A,29B,68C,117C 'submit':102C 'textoprontuario':79C 'theft':145C 'user':41B,123C 'version':161C 'victim':137C,153C 'vulner':73C,141C 'web':24B,59C 'wegia':1A,21B,22B,56C 'without':34B,86C","nicknames":[],"mitigations":[],"who_affected":"Charitable institutions running WeGIA before version 3.8.7 that let staff create or edit patient medical records. The risk is that one staff member's malicious record entry runs script in a colleague's browser when they open it, which can lead to account takeover depending on that colleague's privileges. Installations that do not use the health module or restrict who can edit records have less exposure.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"businesses","plain_action":null,"first_public_at":"2026-10-29T22:17:05+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:L","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-61719","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-61719","severity":null,"published_at":"2026-10-29T22:17:05+00:00","modified_at":"2026-10-29T22:17:05+00:00","first_seen_at":"2026-10-29T22:27:07+00:00","fetched_at":"2026-10-29T22:27:07+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}