# CVE-2024-50336: matrix-js-sdk has insufficient MXC URI validation which allows client-side path traversal

> A malicious room member can trigger clients using matrix-js-sdk to issue arbitrary authenticated GET requests to the homeserver via crafted MXC URIs.

- **Severity:** Medium 5.3 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA: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:** 12 Nov 2024
- **Updated:** 3 Nov 2025
- **Also known as:** DEBIAN-CVE-2024-50336, GHSA-xvg8-m4x3-w6xr, MGASA-2024-0395, SUSE-SU-2024:4326-1, UBUNTU-CVE-2024-50336, openSUSE-SU-2024:14584-1

## What is CVE-2024-50336?

CVE-2024-50336 is a medium-severity path traversal vulnerability in matrix-org matrix-js-sdk, published on 12 Nov 2024. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

matrix-js-sdk is a Matrix messaging protocol Client-Server SDK for JavaScript. matrix-js-sdk before 34.11.0 is vulnerable to client-side path traversal via crafted MXC URIs. A malicious room member can trigger clients based on the matrix-js-sdk to issue arbitrary authenticated GET requests to the client's homeserver. Fixed in matrix-js-sdk 34.11.1.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2024-50336?

2 open source packages ship an affected version, including matrix-js-sdk.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `matrix-js-sdk` | npm | All versions | 34.11.1 |
| `matrix-js-sdk` | npm | All versions | 34.11.1 |
| `MozillaThunderbird` | SUSE:Linux Enterprise Module for Package Hub 15 SP5 | All versions | 128.5.2-150200.8.194.1 |
| `MozillaThunderbird` | SUSE:Linux Enterprise Module for Package Hub 15 SP6 | All versions | 128.5.2-150200.8.194.1 |
| `MozillaThunderbird` | SUSE:Linux Enterprise Workstation Extension 15 SP5 | All versions | 128.5.2-150200.8.194.1 |
| `MozillaThunderbird` | SUSE:Linux Enterprise Workstation Extension 15 SP6 | All versions | 128.5.2-150200.8.194.1 |
| `MozillaThunderbird` | openSUSE:Leap 15.5 | All versions | 128.5.2-150200.8.194.1 |
| `MozillaThunderbird` | openSUSE:Leap 15.6 | All versions | 128.5.2-150200.8.194.1 |
| `MozillaThunderbird` | openSUSE:Tumbleweed | All versions | 128.5.2-1.1 |

## How do I fix CVE-2024-50336?

Upgrade matrix-js-sdk to 34.11.1 or later.

## Is CVE-2024-50336 being exploited?

There is no known exploitation of CVE-2024-50336 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-50336 and fix it if it is affected.

What it is: CVE-2024-50336 is a medium-severity path traversal vulnerability in matrix-org matrix-js-sdk, published on 12 Nov 2024. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2024-50336 in the wild and no public exploit code.

Affected packages and fixed versions:
- matrix-js-sdk (npm): affected all versions; fixed in 34.11.1
- matrix-js-sdk (npm): affected all versions; fixed in 34.11.1

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-2024-50336/ (Markdown: https://insights.sbomify.com/CVE-2024-50336/index.md)
```

## Sources

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

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