External risk intelligence

SQL Injection in asyncmy via Crafted Dictionary Keys

CVE advisorySeverity: CRITICAL (CVSS 9.8)

CVE-2025-65896

asyncmy is a database driver library used by applications to interact with databases. It is a software component or dependency integrated into backend code, not a standalone service, gateway, or internet-facing application. Exposure is dependent on how a developer implements it within their own application logic, making public internet exposure of this library itself very unlikely.

SQL Injection

Long2ice Asyncmy

0.2.10 and earlier

Halo Surface Signal: 1 out of 5 — much less likely to be public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

This critical vulnerability involves a widely used database connection library that could allow attackers to run unauthorized commands. While the library itself is unlikely to be directly exposed to the internet, its integration into applications means a potential risk exists if not properly secured. Understanding this threat is important for assessing our application dependencies and potential indirect exposure.

  • Attackers can run unauthorized database commands.
  • It affects a common database connection component.
  • Confirm relevance and exposure of this dependency.

Attack Path

How an attacker could exploit the issue

An attacker can remotely send specially crafted input to an application that uses a vulnerable version of the `asyncmy` library. This input, when processed by the library, allows the attacker to inject malicious SQL commands. Successful exploitation could lead to the compromise of sensitive data or the modification of database contents.

  • No special access needed.
  • Crafted dictionary keys trigger injection.
  • Arbitrary SQL command execution.

Live Threat

Current exploitation, exposure, and threat context

When supported by the advisory, this vulnerability could allow attackers to execute arbitrary SQL commands by crafting specific dictionary keys. This could affect the integrity and availability of data managed by applications using the affected component.

  • Affected database commands.
  • Via crafted dictionary keys.
  • Data integrity and availability loss.

Operational Fix

Recommended remediation, mitigation, and detection steps

This SQL injection vulnerability affects the `asyncmy` library, a database driver. Responsibility for addressing this typically falls to application owners and platform teams who integrate and manage the applications using this library. The initial step involves identifying all applications that utilize `asyncmy`, determining their exposure, and assessing their criticality to prioritize remediation efforts.

  • Application owners should own the issue.
  • Verify library usage and application exposure.
  • Plan remediation during maintenance windows.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is asyncmy?

asyncmy is a Python-based database driver designed for asynchronous operations. Developers integrate it into their backend code to enable applications to communicate with MySQL databases efficiently. Because it acts as a library rather than a standalone service, it typically runs inside an application's environment to handle data queries.

What does CVE-2025-65896 mean?

This vulnerability is classified as CWE-89, or Improper Neutralization of Special Elements used in an SQL Command. In plain English, the library fails to properly filter or sanitize certain inputs. Specifically, it allows an attacker to inject their own malicious SQL commands into the database by sending crafted dictionary keys to the application.

How is this SQL injection triggered?

The flaw is triggered when an application using the affected library processes specific, maliciously crafted dictionary keys. It is important to note that simply having the library installed is not enough; the bug only activates when an application passes unsanitized user-provided input into the vulnerable component's data-handling functions.

Is my application at risk if it uses asyncmy?

Halo Surface Signal notes that since asyncmy is a library, it is not a standalone gateway, making direct internet exposure very unlikely. Your risk depends on whether your application takes untrusted input and passes it through this library to your database. You must assess if your specific code implementation provides an entry point for this input.

How should I respond to this vulnerability?

Begin by auditing your software inventory to identify which applications include asyncmy 0.2.10 or earlier as a dependency. Once identified, work with your development teams to confirm where user input is handled in these applications. Prioritize updating the library to a secure version as part of your standard maintenance and release cycle.

References