CVE-2025-62611: CWE-73: External Control of File Name or Path in aio-libs aiomysql
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.
AI Analysis
Technical Summary
CVE-2025-62611 is a vulnerability classified under CWE-73 (External Control of File Name or Path) affecting the aiomysql library, a Python asyncio-based client for MySQL databases. Versions prior to 0.3.0 do not properly validate client-side settings before sending local files to the MySQL server. This flaw allows a malicious or rogue MySQL server to bypass authorization checks and client flags, issuing a LOAD_LOCAL instruction packet that forces the client to send arbitrary local files. The vulnerability arises because the client blindly trusts server instructions to load local files without verifying the legitimacy of the request or the server's identity. Exploitation requires no authentication or user interaction, making it remotely exploitable over the network. The impact is primarily on confidentiality, as sensitive files on the client machine can be exfiltrated. The vulnerability has been addressed in aiomysql version 0.3.0 by implementing proper validation and restrictions on local file loading. No known exploits are currently reported in the wild, but the high CVSS 4.0 score of 8.2 reflects the serious risk posed by this flaw, especially in environments where clients connect to untrusted or external MySQL servers.
Potential Impact
For European organizations, this vulnerability poses a significant risk to data confidentiality, particularly for those using asynchronous Python applications that rely on aiomysql to connect to MySQL databases. If an attacker can operate a rogue MySQL server or compromise an existing one, they can extract arbitrary files from client machines, potentially exposing sensitive corporate data, credentials, or configuration files. This risk is heightened in sectors with extensive use of Python for backend services, such as finance, healthcare, and technology. The vulnerability could lead to data breaches, regulatory non-compliance (e.g., GDPR violations), and reputational damage. Since exploitation requires no authentication or user interaction, the attack surface includes any client connecting to a malicious or compromised server, making it critical for organizations to control and monitor database connections. The absence of known exploits in the wild suggests the threat is currently theoretical but could become practical if attackers develop exploit tools.
Mitigation Recommendations
1. Upgrade all aiomysql library instances to version 0.3.0 or later, where the vulnerability is patched. 2. Restrict database connections to trusted and verified MySQL servers only; avoid connecting to unknown or untrusted servers. 3. Implement network-level controls such as firewall rules and VPNs to limit access to MySQL servers. 4. Monitor and audit database connection logs for unusual or unauthorized connection attempts. 5. Employ application-layer validation to detect and block suspicious LOAD_LOCAL commands or unexpected file access requests. 6. Educate developers and DevOps teams about the risks of connecting to untrusted database servers and the importance of using updated client libraries. 7. Consider using alternative MySQL client libraries with stronger security controls if upgrading is not immediately feasible. 8. Integrate runtime application self-protection (RASP) or endpoint detection solutions to detect anomalous file access patterns triggered by database clients.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland
CVE-2025-62611: CWE-73: External Control of File Name or Path in aio-libs aiomysql
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.
AI-Powered Analysis
Technical Analysis
CVE-2025-62611 is a vulnerability classified under CWE-73 (External Control of File Name or Path) affecting the aiomysql library, a Python asyncio-based client for MySQL databases. Versions prior to 0.3.0 do not properly validate client-side settings before sending local files to the MySQL server. This flaw allows a malicious or rogue MySQL server to bypass authorization checks and client flags, issuing a LOAD_LOCAL instruction packet that forces the client to send arbitrary local files. The vulnerability arises because the client blindly trusts server instructions to load local files without verifying the legitimacy of the request or the server's identity. Exploitation requires no authentication or user interaction, making it remotely exploitable over the network. The impact is primarily on confidentiality, as sensitive files on the client machine can be exfiltrated. The vulnerability has been addressed in aiomysql version 0.3.0 by implementing proper validation and restrictions on local file loading. No known exploits are currently reported in the wild, but the high CVSS 4.0 score of 8.2 reflects the serious risk posed by this flaw, especially in environments where clients connect to untrusted or external MySQL servers.
Potential Impact
For European organizations, this vulnerability poses a significant risk to data confidentiality, particularly for those using asynchronous Python applications that rely on aiomysql to connect to MySQL databases. If an attacker can operate a rogue MySQL server or compromise an existing one, they can extract arbitrary files from client machines, potentially exposing sensitive corporate data, credentials, or configuration files. This risk is heightened in sectors with extensive use of Python for backend services, such as finance, healthcare, and technology. The vulnerability could lead to data breaches, regulatory non-compliance (e.g., GDPR violations), and reputational damage. Since exploitation requires no authentication or user interaction, the attack surface includes any client connecting to a malicious or compromised server, making it critical for organizations to control and monitor database connections. The absence of known exploits in the wild suggests the threat is currently theoretical but could become practical if attackers develop exploit tools.
Mitigation Recommendations
1. Upgrade all aiomysql library instances to version 0.3.0 or later, where the vulnerability is patched. 2. Restrict database connections to trusted and verified MySQL servers only; avoid connecting to unknown or untrusted servers. 3. Implement network-level controls such as firewall rules and VPNs to limit access to MySQL servers. 4. Monitor and audit database connection logs for unusual or unauthorized connection attempts. 5. Employ application-layer validation to detect and block suspicious LOAD_LOCAL commands or unexpected file access requests. 6. Educate developers and DevOps teams about the risks of connecting to untrusted database servers and the importance of using updated client libraries. 7. Consider using alternative MySQL client libraries with stronger security controls if upgrading is not immediately feasible. 8. Integrate runtime application self-protection (RASP) or endpoint detection solutions to detect anomalous file access patterns triggered by database clients.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2025-10-16T19:24:37.268Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 68f932a662bc771d0f4e4a9d
Added to database: 10/22/2025, 7:38:14 PM
Last enriched: 10/22/2025, 7:53:21 PM
Last updated: 10/22/2025, 10:03:41 PM
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2025-62708: CWE-409: Improper Handling of Highly Compressed Data (Data Amplification) in py-pdf pypdf
MediumCVE-2025-62707: CWE-834: Excessive Iteration in py-pdf pypdf
MediumCVE-2025-62614: CWE-862: Missing Authorization in booklore-app booklore
HighCVE-2025-62613: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in steveseguin vdo.ninja
MediumCVE-2025-62612: CWE-918: Server-Side Request Forgery (SSRF) in labring FastGPT
MediumActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.