VYPR
Unrated severityNVD Advisory· Published May 5, 2022· Updated Aug 3, 2024

CVE-2022-29939

CVE-2022-29939

Description

In LibreHealth EHR 2.0.0, lack of sanitization of the GET parameters debug and InsId in interface\billing\sl_eob_process.php leads to multiple cross-site scripting (XSS) vulnerabilities.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

LibreHealth EHR 2.0.0 fails to sanitize GET parameters 'debug' and 'InsId' in sl_eob_process.php, leading to stored/reflected XSS.

Vulnerability

In LibreHealth EHR 2.0.0, the file interface/billing/sl_eob_process.php directly echoes the $_REQUEST['debug'] and $_REQUEST['InsId'] parameters into hidden input fields without sanitization, as shown in the reference [1]: <input type="hidden" name="debug" value="<?php echo $_REQUEST['debug'];?>" />. This lack of output encoding (htmlspecialchars()) permits an attacker to inject arbitrary HTML and JavaScript. The vulnerability affects version 2.0.0 and potentially earlier releases (the codebase remains unchanged through the 2.0.0 tag).

Exploitation

An attacker must be authenticated to the LibreHealth EHR instance [1]. The proof-of-concept URLs in reference [1] demonstrate that injecting a double-quote to break out of the value attribute followed by a ` tag is sufficient to execute attacker-controlled JavaScript. For example, the parameter debug=1%22%3E%3Cscript%3Ealert('true xss');%3C/script%3E%3C!--` results in the injected script being reflected in the page. No user interaction beyond viewing the page is required.

Impact

Successful exploitation allows an authenticated attacker to execute arbitrary JavaScript in the context of the victim's browser session. This could lead to session hijacking, data exfiltration (such as patient health information), or unauthorized actions performed on behalf of the victim user. Because the injected payload is reflected, it can be used in a targeted attack by luring an authenticated administrator to a crafted URL.

Mitigation

As of the publication date (2022-05-05), no official fix has been released; the latest tagged version (2.0.0 RC1) remains vulnerable. The advisory in reference [1] recommends using htmlspecialchars() on the $_REQUEST['debug'] and $_REQUEST['InsId'] values before echoing them. Administrators should apply the manual patch to interface/billing/sl_eob_process.php or upgrade to a future patched version once available. The issue has not been added to the CISA Known Exploited Vulnerabilities (KEV) catalog.

AI Insight generated on May 27, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

2
  • LibreHealth/LibreHealth EHRdescription
  • LibreHealth/EMRllm-fuzzy
    Range: = 2.0.0

Patches

0

No patches discovered yet.

Vulnerability mechanics

Root cause

"Lack of sanitization of the GET parameters `debug` and `InsId` in `sl_eob_process.php` allows reflected cross-site scripting."

Attack vector

An attacker must be authenticated (the advisory states "All this vulnerabilities needs authorization" [ref_id=1]). The attacker crafts a URL containing a malicious payload in the `debug` or `InsId` GET parameter, such as `debug=1%22%3E%3Cscript%3Ealert(%27true%20xss%27);%3C/script%3E%3C!--` [ref_id=1]. When a victim visits this URL, the unsanitized parameter value is injected into the HTML page, causing the attacker's JavaScript to execute in the victim's browser session.

Affected code

The vulnerable code is in `interface/billing/sl_eob_process.php` at line 592, where the GET parameters `debug` and `InsId` are echoed directly into hidden input fields without sanitization: `

What the fix does

The advisory recommends using `htmlspecialchars()` on the `$_REQUEST['debug']` and `$_REQUEST['InsId']` values before outputting them into the HTML [ref_id=1]. No official patch has been released; the vendor noted the project is migrating to Laravel, whose default filters would mitigate this class of vulnerability [ref_id=1].

Preconditions

  • authAttacker must be authenticated to access the vulnerable page

Reproduction

Visit the following URL while authenticated: `http://librehealth_host/interface/billing/sl_eob_process.php?eraname=1&debug=1%22%3E%3Cscript%3Ealert(%27true%20xss%27);%3C/script%3E%3C!--` [ref_id=1]. Alternatively, use the `InsId` parameter: `http://librehealth_host/interface/billing/sl_eob_process.php?eraname=1&InsId=1%22%3E%3Cscript%3Ealert(%27insid%20true%20xss%27);%3C/script%3E%3C!--` [ref_id=1].

Generated on May 25, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

1

News mentions

0

No linked articles in our index yet.