# CVE-2025-62611: aiomysql allows arbitrary access to client files through vulnerability of a malicious MySQL server

> A malicious MySQL server can force the aiomysql client to send arbitrary local files, allowing attackers to read sensitive data from the client system.

- **Severity:** High 8.2 (`CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 22 Oct 2025
- **Updated:** 22 Oct 2025
- **Also known as:** CLEANSTART-2026-MF63070, DEBIAN-CVE-2025-62611, GHSA-r397-ff8c-wv2g, MINI-q8gv-59c7-x444, OESA-2025-2616, OESA-2025-2617, OESA-2025-2618, OESA-2025-2619, OESA-2025-2675, PYSEC-2026-1110, ROOT-APP-PYPI-CVE-2025-62611, UBUNTU-CVE-2025-62611

## What is CVE-2025-62611?

CVE-2025-62611 is a high-severity path traversal vulnerability in aio-libs aiomysql, published on 22 Oct 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

aiomysql is a library for accessing a MySQL database from the asyncio. Prior to version 0.3.0, the client-side settings are not checked before sending local files to MySQL server, which allows obtaining arbitrary files from the client using a rogue server. It is possible to create a rogue MySQL server that emulates authorization, ignores client flags and requests arbitrary files from the client by sending a LOAD_LOCAL instruction packet. This issue has been patched in version 0.3.0.

Weakness: CWE-73 (External Control of File Name or Path)

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

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `aiomysql` | PyPI | All versions | 0.3.0 |
| `aiomysql` | PyPI | All versions | 0.3.0 |
| `aiomysql` | PyPI | All versions | 0.3.0 |

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

Upgrade aiomysql to 0.3.0 or later.

## Is CVE-2025-62611 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2025-62611 is a high-severity path traversal vulnerability in aio-libs aiomysql, published on 22 Oct 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-62611 exists.

Affected packages and fixed versions:
- aiomysql (PyPI): affected all versions; fixed in 0.3.0
- aiomysql (PyPI): affected all versions; fixed in 0.3.0
- aiomysql (PyPI): affected all versions; fixed in 0.3.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-62611/ (Markdown: https://insights.sbomify.com/CVE-2025-62611/index.md)
```

## Sources

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

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