Summary
OpenEMR's FaxSMS module has a path traversal vulnerability in the disposeDocument functions of its RCFaxClient and SignalWireClient components. An authenticated low-privilege user may be able to read arbitrary files or overwrite files writable by the web server by supplying an unsanitized file path.
Affected context
The vulnerability affects OpenEMR deployments before 8.3.0 where the FaxSMS module's RCFaxClient or SignalWireClient processes the file_path parameter in disposeDocument without adequately restricting it to an intended directory. The download action may expose cleartext files, while the setup action may overwrite files that the web server can write.
Exploit preconditions
- Attack surface: FaxSMS module actions that invoke
disposeDocument - Required access: An authenticated account with low privileges
- Trigger point: A request using the
downloadorsetupaction and a controlledfile_path - Why exploitation is possible: The supplied path is not sufficiently constrained before file access, allowing it to refer outside the intended location
Why this happens
The application uses externally controlled path data in file operations without reliably restricting the resolved target to an authorized directory. This is an external control of file name or path issue, classified as CWE-73. When path inputs are trusted without normalization and boundary checks, file reads or writes may escape the intended storage area.
Potential impact
- An attacker may read sensitive files, including cleartext configuration containing database credentials or keys.
- An attacker could overwrite files that are writable by the web server.
- Modified files could disrupt application behavior or affect the integrity of the web server's writable data.
- Exposed credentials or keys may enable further access, depending on their privileges and use.
General mitigation guidance
Defensive patterns include avoiding direct use of user-supplied paths and mapping user requests to server-controlled file identifiers instead. Where paths are necessary, normalize and canonicalize them, enforce that the resolved target remains within an explicitly allowed directory, and apply the same checks to both read and write operations.
Reduce trust in request parameters through strict validation, and limit the web server's filesystem permissions so it can access only the files it needs. Keep sensitive configuration and key material outside locations reachable through application file-handling features.
How teams detect issues like this
Review file operations in the FaxSMS module and related components for request parameters flowing into path construction, file reads, or file writes. Static analysis can flag externally controlled values passed to filesystem APIs; code review should check canonical path boundary enforcement and whether checks cover both download and setup flows.
Runtime monitoring and policy enforcement can alert on unexpected access to sensitive files or writes outside designated application directories. Automated code review tools may help identify similar path handling patterns.

