/

CVE-2026-124467

Severity:

HIGH RISK

(8.8)

Path Traversal (CWE-22) in OpenEMR ESign Router Component

CVE-2026-124467

Analyzed

Vulnerability type

Category:

Path Traversal / Local File Inclusion

CWE:

CWE-22

Impact:

Potential Remote Code Execution

Severity:

HIGH RISK

(8.8)

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 ESign router uses a module parameter to build a PHP include path without adequate sanitization, while the fax upload flow can place attacker-named files in a predictable temporary location. An authenticated attacker who can upload a PHP file and reach it through the router's include path may be able to execute code on the server.

Affected context

The issue is in OpenEMR's ESign router and fax upload handling. It can become exploitable when an authenticated user can submit files through the fax module, uploaded files are stored at a predictable location that is reachable by the router, and the router uses the module parameter to construct a require_once path without constraining it to approved modules.

Exploit preconditions

  • Attack surface: The ESign router and fax upload functionality.
  • Required access: An authenticated account with permission to upload files through the fax module.
  • Trigger point: A request to the ESign endpoint that causes the router to include a path derived from the module parameter.
  • Why exploitation is possible: The router does not sufficiently constrain the parameter to approved module paths, and the upload flow may store an attacker-named PHP file at a predictable location that the include can reach.

Why this happens

The router uses externally influenced input to construct a filesystem path for require_once without reliably restricting the resolved path to an approved directory. This is a path traversal weakness, mapped to CWE-22: Improper Limitation of a Pathname to a Restricted Directory. The upload flow compounds the risk by allowing attacker-controlled filenames and storing files where they may be reachable by PHP inclusion.

Potential impact

  • An attacker could execute PHP code with the privileges of the OpenEMR process.
  • The attacker may be able to access or alter data available to the application.
  • The compromise could disrupt application services or provide a foothold for further activity, depending on server permissions and network controls.

General mitigation guidance

Defensive patterns focus on avoiding filesystem paths derived from request parameters and keeping uploaded content separate from executable application code.

  • Map user-facing module identifiers to a fixed allowlist of known controllers rather than using them to build include paths.
  • Canonicalize and validate filesystem paths, ensuring resolved paths remain within an explicitly permitted directory.
  • Store uploads under server-generated names and outside directories from which PHP code can be included or executed.
  • Enforce file type and content policies as defense in depth; do not rely on filename extensions alone.
  • Apply least-privilege permissions to the application process and limit its access to sensitive files and directories.

How teams detect issues like this

  • Use static analysis to identify request parameters or other untrusted values flowing into include, require, or filesystem path construction.
  • Review upload handlers for attacker-controlled filenames, predictable storage locations, and paths that overlap with application code.
  • Add code review checks for dynamic includes and enforce policies that restrict executable files in upload directories.
  • Monitor application logs and filesystem activity for unusual ESign module values, traversal attempts, and unexpected PHP files in temporary or upload locations.
  • Automated security review tools may help identify input-to-file-include flows for manual assessment.

Sources

SourceLink
github.comgithub.com/openemr/openemr/security/advisories/GHSA-p4v7-crwp-qq7q
vulncheck.comvulncheck.com/advisories/openemr-before-8.4.0-remote-code-execution-via-esign-lfi-and-fax-upload

Frequently asked

questions

The described attack requires an authenticated user who can upload files through the fax functionality. The practical scope also depends on how the application and uploaded files are deployed.

The vulnerable flow involves the ESign endpoint, where the router uses the module parameter to select a controller. Exploitation depends on that include resolving to an attacker-controlled file.

Avoid constructing include paths from request values. Use a fixed allowlist of controller identifiers and keep uploaded files outside executable or includable paths.

Combine strict server-side path and module validation with generated upload names, isolated storage, least-privilege permissions, and static analysis for untrusted data flowing into filesystem operations.

Find out what's already
exploitable in your codebase.