CVE-2026-65321: PyAthena 3.35.4 SQL Injection via DefaultParameterFormatter DELETE/CTAS
PyAthena prior to 3.35.4 contains a sql injection vulnerability that allows unauthenticated attackers to inject arbitrary SQL by exploiting improper quote-escaping in DefaultParameterFormatter.format(), which routes DELETE and CTAS statements to the escapehive function that backslash-escapes single quotes rather than doubling them. Because Athena and Trino do not treat backslashes as escape characters inside string literals, attacker-supplied input such as a single quote followed by SQL syntax causes the parser to terminate the string literal prematurely, enabling data exfiltration via UNION SELECT, execution of destructive statements, and attacker-controlled CTAS destination and content.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
PyAthenato a version that resolves this vulnerability.Fixed in 3.35.4 - Upgrade
Upgrade
PyAthenato a version that resolves this vulnerability.Patch PyAthena 3.35.4 SQL Injection via DefaultParameterFormatter DELETE/CTAS
Event History
Frequently Asked Questions
What is the severity of CVE-2026-65321?
CVE-2026-65321 has a critical severity score of 9.8.
How do I fix CVE-2026-65321?
To fix CVE-2026-65321, upgrade to PyAthena version 3.35.4 or later.
What type of vulnerability is CVE-2026-65321?
CVE-2026-65321 is an SQL injection vulnerability.
Who is affected by CVE-2026-65321?
Users of PyAthena versions prior to 3.35.4 are affected by CVE-2026-65321.
What can attackers achieve with CVE-2026-65321?
Attackers can inject arbitrary SQL commands into DELETE and CTAS statements.