# CVE-2024-45601: Local file Inclusion via static file serving functionality in Mesop

> An attacker can read arbitrary files on the server via insufficient input validation in the static file serving endpoint of the Mesop framework.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 18 Sep 2024
- **Updated:** 18 Sep 2024
- **Also known as:** GHSA-pmv9-3xqp-8w42, PYSEC-2026-1625

## What is CVE-2024-45601?

CVE-2024-45601 is a high-severity path traversal vulnerability in google mesop, published on 18 Sep 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Mesop is a Python-based UI framework designed for rapid web apps development. A vulnerability has been discovered and fixed in Mesop that could potentially allow unauthorized access to files on the server hosting the Mesop application. The vulnerability was related to insufficient input validation in a specific endpoint. This could have allowed an attacker to access files not intended to be served. Users are strongly advised to update to the latest version of Mesop immediately. The latest version includes a fix for this vulnerability. At time of publication 0.12.4 is the most recently available version of Mesop.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory), CWE-20 (Improper Input Validation)

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

3 open source packages ship an affected version, including mesop.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `mesop` | PyPI | From 0.9.0 | 0.12.4 |
| `mesop` | PyPI | From 0.9.0 | 0.12.4 |
| `mesop` | PyPI | From 0.9.0 | 0.12.4 |

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

Upgrade mesop to 0.12.4 or later.

## Is CVE-2024-45601 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2024-45601 is a high-severity path traversal vulnerability in google mesop, published on 18 Sep 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2024-45601 in the wild and no public exploit code.

Affected packages and fixed versions:
- mesop (PyPI): affected from 0.9.0; fixed in 0.12.4
- mesop (PyPI): affected from 0.9.0; fixed in 0.12.4
- mesop (PyPI): affected from 0.9.0; fixed in 0.12.4

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

## Sources

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

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