# CVE-2025-49138: HAX CMS vulnerable to Local File Inclusion via saveOutline API Location Parameter

> An authenticated low-privileged user can read arbitrary server files via Local File Inclusion in the saveOutline API.

- **Severity:** Medium 6.5 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 9 Jun 2025
- **Updated:** 10 Jun 2025
- **Also known as:** GHSA-hxrr-x32w-cg8g

## What is CVE-2025-49138?

CVE-2025-49138 is a medium-severity path traversal vulnerability in haxtheweb issues, published on 9 Jun 2025. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

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.

Weakness: CWE-73 (External Control of File Name or Path), CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2025-49138?

2 open source packages ship an affected version, including elmsln/haxcms. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `elmsln/haxcms` | Packagist | All versions | 11.0.0 |
| `elmsln/haxcms` | Packagist | All versions | 11.0.0 |

Products: Psu Haxcms-Php.

## How do I fix CVE-2025-49138?

Upgrade elmsln/haxcms to 11.0.0 or later.

## Is CVE-2025-49138 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-49138 exists.

## Other vulnerabilities in haxtheweb issues

- [CVE-2025-32028](https://insights.sbomify.com/CVE-2025-32028/): HAX CMS PHP allows Insecure File Upload to Lead to Remote Code Execution (critical 10.0)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-49138 and fix it if it is affected.

What it is: CVE-2025-49138 is a medium-severity path traversal vulnerability in haxtheweb issues, published on 9 Jun 2025. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-49138 exists.

Affected packages and fixed versions:
- elmsln/haxcms (Packagist): affected all versions; fixed in 11.0.0
- elmsln/haxcms (Packagist): affected all versions; fixed in 11.0.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-49138/ (Markdown: https://insights.sbomify.com/CVE-2025-49138/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-49138
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-49138
- OSV: https://osv.dev/vulnerability/CVE-2025-49138

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-49138/
Summaries are generated and may contain mistakes; the official description above is the record.
