/

CVE-2026-54675

Severity:

HIGH RISK

(8.8)

Path Traversal (CWE-22) in FreePBX Sound File Upload

CVE-2026-54675

Analyzed

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22, CWE-73, CWE-434

Impact:

Arbitrary File Write and 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

FreePBX contains a path traversal flaw in its sound language upload and conversion functionality that can allow authenticated attackers to write files to unintended locations. When a known username can be used to access the feature, a malicious server-side file may be placed in a web-accessible directory, potentially leading to remote code execution.

FreePBX contains a path traversal flaw in its sound language upload and conversion functionality that can allow authenticated attackers to write files to unintended locations. When a known username can be used to access the feature, a malicious server-side file may be placed in a web-accessible directory, potentially leading to remote code execution.

Affected context

The vulnerability occurs in FreePBX sound language upload and file conversion workflows. It may affect deployments where an authenticated user can reach this functionality and where uploaded or converted filenames are insufficiently constrained before being used in filesystem operations. Risk is increased when the web server can execute files written to its document root.

The vulnerability occurs in FreePBX sound language upload and file conversion workflows. It may affect deployments where an authenticated user can reach this functionality and where uploaded or converted filenames are insufficiently constrained before being used in filesystem operations. Risk is increased when the web server can execute files written to its document root.

Exploit preconditions

  • Attack surface: Authenticated FreePBX sound language upload and conversion functionality
  • Required access: Authentication using a known or otherwise valid username
  • Trigger point: File conversion processing that constructs or uses a filesystem path
  • Why exploitation is possible: Insufficient path sanitization may allow attacker-controlled path components to escape the intended upload directory and write arbitrary files
  • Attack surface: Authenticated FreePBX sound language upload and conversion functionality
  • Required access: Authentication using a known or otherwise valid username
  • Trigger point: File conversion processing that constructs or uses a filesystem path
  • Why exploitation is possible: Insufficient path sanitization may allow attacker-controlled path components to escape the intended upload directory and write arbitrary files

Why this happens

The underlying bug is improper restriction of user-controlled file paths during sound file conversion. Path components are not sufficiently normalized and constrained to an approved destination, allowing traversal outside the intended directory. This maps primarily to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, with related concerns involving external resource handling (CWE-73) and unrestricted upload of file types (CWE-434).

The underlying bug is improper restriction of user-controlled file paths during sound file conversion. Path components are not sufficiently normalized and constrained to an approved destination, allowing traversal outside the intended directory. This maps primarily to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, with related concerns involving external resource handling (CWE-73) and unrestricted upload of file types (CWE-434).

Potential impact

  • An attacker may write files outside the intended upload directory.
  • Malicious server-side files could be placed in a web-accessible location.
  • The web server process may execute attacker-controlled code.
  • FreePBX configuration, telephony services, or stored data could be compromised.
  • The host may be used for lateral movement or further attacks.
  • An attacker may write files outside the intended upload directory.
  • Malicious server-side files could be placed in a web-accessible location.
  • The web server process may execute attacker-controlled code.
  • FreePBX configuration, telephony services, or stored data could be compromised.
  • The host may be used for lateral movement or further attacks.

General mitigation guidance

Mitigation generally focuses on enforcing a strict destination boundary for every uploaded and converted file.

Common defensive patterns include:

  • Resolve and validate candidate paths against a fixed, non-writable-by-users upload directory.
  • Reject traversal sequences, absolute paths, unexpected separators, and ambiguous filename encodings.
  • Generate server-side filenames rather than trusting client-supplied names.
  • Permit only expected audio formats and validate file content independently of extensions.
  • Store uploaded content outside the web server's executable document root where possible.
  • Disable script execution in upload directories and apply least-privilege filesystem permissions.
  • Require authorization appropriate to administrative file-management operations and limit service-account privileges.

Mitigation generally focuses on enforcing a strict destination boundary for every uploaded and converted file.

Common defensive patterns include:

  • Resolve and validate candidate paths against a fixed, non-writable-by-users upload directory.
  • Reject traversal sequences, absolute paths, unexpected separators, and ambiguous filename encodings.
  • Generate server-side filenames rather than trusting client-supplied names.
  • Permit only expected audio formats and validate file content independently of extensions.
  • Store uploaded content outside the web server's executable document root where possible.
  • Disable script execution in upload directories and apply least-privilege filesystem permissions.
  • Require authorization appropriate to administrative file-management operations and limit service-account privileges.

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis rules identifying user-controlled path construction, concatenation, or filesystem writes.
  • Code review checks for canonicalization followed by destination-boundary validation.
  • Tests covering encoded traversal markers, absolute paths, alternate separators, and symlink behavior.
  • Web-server and application logs showing unusual upload names, conversion failures, or writes outside expected directories.
  • Policy enforcement that prevents executable content from being stored in web-accessible upload locations.
  • Automated security review tools that flag unrestricted uploads and path traversal patterns.

Organizations can look for this weakness through:

  • Static analysis rules identifying user-controlled path construction, concatenation, or filesystem writes.
  • Code review checks for canonicalization followed by destination-boundary validation.
  • Tests covering encoded traversal markers, absolute paths, alternate separators, and symlink behavior.
  • Web-server and application logs showing unusual upload names, conversion failures, or writes outside expected directories.
  • Policy enforcement that prevents executable content from being stored in web-accessible upload locations.
  • Automated security review tools that flag unrestricted uploads and path traversal patterns.

Sources

SourceLink
github.comgithub.com/FreePBX/security-reporting/security/advisories/GHSA-95gm-cmxf-cv8v

Frequently asked

questions

It may be exploitable through the FreePBX web application when the attacker can authenticate and access the affected sound upload or conversion functionality.

Authentication with a known username is required. The account's exact permissions and access to the vulnerable feature can affect practical exploitability.

Constrain every generated path to a dedicated non-executable directory, generate trusted filenames, validate file types, and prevent uploaded content from being interpreted as server-side code.

Combine strict path canonicalization and boundary checks with allowlisted file formats, least-privilege permissions, secure upload-directory policies, and testing for traversal and executable-upload cases.

It may be exploitable through the FreePBX web application when the attacker can authenticate and access the affected sound upload or conversion functionality.

Authentication with a known username is required. The account's exact permissions and access to the vulnerable feature can affect practical exploitability.

Constrain every generated path to a dedicated non-executable directory, generate trusted filenames, validate file types, and prevent uploaded content from being interpreted as server-side code.

Combine strict path canonicalization and boundary checks with allowlisted file formats, least-privilege permissions, secure upload-directory policies, and testing for traversal and executable-upload cases.

Find out what's already
exploitable in your codebase.