Headline
GHSA-hxrr-x32w-cg8g: 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
Authenticate to the CMS and retrieve the JWT and CSRF token.
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" />
- Curl the website root to see the file contents.
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.
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
Authenticate to the CMS and retrieve the JWT and CSRF token.
Issue a POST request to /system/api/saveOutline with the path traversal injection via the location parameter :
- Curl the website root to see the file contents.
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.
References
- GHSA-hxrr-x32w-cg8g
- https://github.com/haxtheweb/haxcms-php/blob/b158d8ba1f9602af92ab084fd03b418f953079fd/system/backend/php/lib/HAXCMSSite.php#L1248