CVE-2025-49138: HAX CMS vulnerable to Local File Inclusion via saveOutline API Location Parameter
Summary An authenticated Local File Inclusion (LFI) vulnerability in the HAXCMS saveOutline endpoint allows a low-privileged user to read arbitrary files on the server by manipulating the location field written into site.json. This enables attackers to exfiltrate sensitive system files such as /etc/passwd, application secrets, or configuration files accessible to the web server (www-data).
Details The vulnerability stems from the way the HAXCMS backend handles the location field in the site's outline. When a user sends a POST request to /system/api/saveOutline, the backend stores the provided location value directly into the site.json file associated with the site, without validating or sanitizing the input.
Later the location parameter is interpreted by the CMS like in HAXCMSSite.php line 1248 to resolve and load the content for a given node. If the location field contains a relative path like ../../../etc/passwd, the application will attempt to read and render that file.
PoC 1. Authenticate to the CMS and retrieve the JWT and CSRF token.
2. Issue a POST request to /system/api/saveOutline with the path traversal injection via the location parameter :
<img width="839" alt="LFI" src="https://github.com/user-attachments/assets/91b1bb7f-9248-40d2-81fc-f839beb4d39c" />
3. Curl the website root to see the file contents.
!passwd
Impact This is an authenticated Local File Inclusion (LFI) vulnerability, via the location parameter the attacker can read any file on the filesystem that is accessible by the www-data user.
Other sources
HAX CMS PHP allows users to manage their microsite universe with a PHP backend. Prior to version 11.0.0, an authenticated Local File Inclusion (LFI) vulnerability in the HAXCMS saveOutline endpoint allows a low-privileged user to read arbitrary files on the server by manipulating the location field written into site.json. This enables attackers to exfiltrate sensitive system files such as /etc/passwd, application secrets, or configuration files accessible to the web server (www-data). The vulnerability stems from the way the HAXCMS backend handles the location field in the site's outline. When a user sends a POST request to /system/api/saveOutline, the backend stores the provided location value directly into the site.json file associated with the site, without validating or sanitizing the input. Later the location parameter is interpreted by the CMS to resolve and load the content for a given node. If the location field contains a relative path like ../../../etc/passwd, the application will attempt to read and render that file. Version 11.0.0 fixes the issue.
— MITRE
HAX CMS vulnerable to Local File Inclusion via saveOutline API Location Parameter
— Packagist
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
composer/elmsln/haxcmsto a version that resolves this vulnerability.Fixed in 11.0.0 - Upgrade
Upgrade
HAXCMS PHPto a version that resolves this vulnerability.Fixed in 11.0.0
Event History
Frequently Asked Questions
What is the severity of CVE-2025-49138?
CVE-2025-49138 is considered to have a medium severity level due to its potential for unauthorized file access.
How do I fix CVE-2025-49138?
To fix CVE-2025-49138, upgrade to version 11.0.0 or later of the elmsln/haxcms package.
Who is affected by CVE-2025-49138?
All users of the elmsln/haxcms package prior to version 11.0.0 are affected by CVE-2025-49138.
What type of vulnerability is CVE-2025-49138?
CVE-2025-49138 is classified as a Local File Inclusion (LFI) vulnerability.
What can attackers do with CVE-2025-49138?
Attackers exploiting CVE-2025-49138 can read arbitrary files from the server, potentially exfiltrating sensitive data.