/

CVE-2026-124450

Severity:

CRITICAL RISK

(9.9)

Improper File Path Control (CWE-73) in OpenEMR Fax

CVE-2026-124450

Analyzed

Vulnerability type

Category:

Improper File Path Control

CWE:

CWE-73

Impact:

Sensitive Information Disclosure and Arbitrary File Write, with Potential Remote Code Execution

Severity:

CRITICAL RISK

(9.9)

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 fax/SMS disposeDocument action does not adequately validate the file_path parameter, creating a file path control and access control weakness. An authenticated low-privilege user may be able to read sensitive files, including database configuration, and write files as the web user, potentially leading to remote code execution.

Affected context

The issue is in the fax/SMS module's disposeDocument action, where a supplied file_path is used without adequate validation or authorization checks. It affects OpenEMR deployments with this vulnerable behavior; exploitation depends on the action being reachable and the web process having access to the targeted files or write locations.

Exploit preconditions

  • Attack surface: The fax/SMS module's disposeDocument action
  • Required access: An authenticated account with low privileges
  • Trigger point: Processing a request containing a file_path value
  • Why exploitation is possible: Insufficient path validation and access control may let a user reach files or write locations beyond those intended for the action

Why this happens

The application uses a caller-controlled file path without sufficiently constraining it to an authorized location or verifying that the user may perform the requested operation. This maps to CWE-73: External Control of File Name or Path. When path handling and authorization checks are inadequate, file operations may expose sensitive data or permit writes outside the intended scope.

Potential impact

  • An attacker could read sensitive files, including database configuration and credentials.
  • An attacker may write arbitrary files with the web server user's permissions.
  • A crafted file write could enable remote code execution under the web server account.
  • Compromised credentials or application access could facilitate further compromise.

General mitigation guidance

Defensive patterns include:

  • Derive file locations from trusted server-side identifiers rather than accepting arbitrary paths.
  • Canonicalize and validate paths, and enforce that resolved locations remain within explicitly authorized directories.
  • Apply authorization checks to each file operation and limit file access to the minimum required.
  • Keep sensitive configuration files outside locations accessible to application file operations.
  • Run the web process with least privilege and restrict its filesystem write permissions.
  • Treat request parameters as untrusted and use allowlists for permitted document identifiers and operations.

How teams detect issues like this

  • Review file-handling code for request parameters that flow into path construction, file reads, or writes.
  • Use static analysis to identify externally controlled paths and verify canonicalization and directory-boundary checks.
  • Check whether authorization is enforced at the point of each file operation, rather than only at module entry.
  • Monitor application and web-server logs for unusual document paths, denied file access, and unexpected file creation.
  • Apply policy checks that flag file operations using untrusted input without explicit validation and authorization.

Sources

SourceLink
github.comgithub.com/openemr/openemr/security/advisories/GHSA-wf4w-mx2w-j4vv
vulncheck.comvulncheck.com/advisories/openemr-before-8.3.0-arbitrary-file-read-write-via-disposedocument

Frequently asked

questions

The described issue requires authentication; a low-privilege user may be able to trigger the vulnerable file operation.

The attacker needs access to the fax/SMS action. The resulting file access or write is constrained by the permissions of the web server process.

Avoid accepting arbitrary filesystem paths from users. Resolve file operations from trusted identifiers, constrain them to authorized directories, and enforce per-operation access checks.

Treat all request input as untrusted, use path-boundary validation and allowlists, minimize process filesystem permissions, and include file-handling paths in code review and automated security checks.

Find out what's already
exploitable in your codebase.