/

CVE-2026-124457

Severity:

HIGH RISK

(7.6)

Path Traversal (CWE-22) in OpenEMR EOB File Processing

CVE-2026-124457

Analyzed

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Unauthorized file read and write

Severity:

HIGH RISK

(7.6)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

OpenEMR's EOB processing endpoint may use an unsanitized eraname value to access files, allowing an authenticated user to traverse outside the intended directory. Depending on the web user's permissions, this could enable file reads and writes, including creation of ERA report files and processing of arbitrary EDI files.

Affected context

The issue occurs in interface/billing/sl_eob_process.php when the application handles user-supplied eraname values for EOB and ERA processing. It may be present when those values are used to construct file paths without effective canonicalization and containment checks. The described access does not require billing privileges, but does require authentication.

Exploit preconditions

  • Attack surface: The authenticated OpenEMR EOB processing endpoint
  • Required access: An authenticated account; billing privileges are not required according to the report
  • Trigger point: Processing a request that supplies an eraname value used in file operations
  • Why exploitation is possible: Unsanitized path components may let the requested file path escape its intended directory, subject to the web user's filesystem permissions

Why this happens

The underlying issue is improper limitation of a pathname to a restricted directory, mapped to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'). The insecure pattern is using user-controlled path data to select files without reliably resolving the final path and verifying that it remains within an approved directory.

Potential impact

  • An authenticated user could read files accessible to the web application account.
  • An authenticated user could create or overwrite files in locations writable by that account.
  • Arbitrary EDI files could be processed and their contents included in generated HTML reports.
  • Resulting files or exposed data could affect application integrity or confidentiality, depending on deployment permissions.

General mitigation guidance

Defensive patterns include avoiding user-controlled path components where possible and mapping user-facing identifiers to server-selected files. When paths are necessary, resolve them to canonical form and enforce containment within a dedicated, approved directory before performing file operations.

Apply strict input validation, separate upload and report storage from application code and other sensitive files, and limit the web process to the minimum filesystem permissions needed. Treat EDI contents as untrusted data and encode them appropriately when generating HTML.

How teams detect issues like this

  • Use static analysis to identify file operations whose paths incorporate request parameters or other user-controlled values.
  • Review path construction and validation to confirm canonicalization and directory-containment checks occur before reads and writes.
  • Enforce code-review or CI policies that flag traversal-prone path handling and unsafe inclusion of file contents in HTML.
  • Monitor application and filesystem activity for unexpected file access or report creation outside designated storage locations.

Sources

SourceLink
github.comgithub.com/openemr/openemr/security/advisories/GHSA-m6q6-5j87-3cmp
vulncheck.comvulncheck.com/advisories/openemr-before-8.3.0-path-traversal-via-sl-eob-process-php-eraname

Frequently asked

questions

It is reachable through an application endpoint, but the reported conditions require an authenticated user.

The vulnerability description says billing privileges are not required; authentication is still needed.

Avoid deriving filesystem paths directly from user input. Use server-controlled file identifiers or canonicalize paths and verify they remain within an approved directory before access.

Validate inputs, restrict the web process's filesystem permissions, review user-influenced file operations, and safely encode untrusted content when rendering HTML.

Find out what's already
exploitable in your codebase.