CVE-2026-65321: PyAthena 3.35.4 SQL Injection via DefaultParameterFormatter DELETE/CTAS

Published Aug 2, 2026
·
Updated

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

1 affected component
PyAthena PyAthena<3.35.4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade PyAthena to a version that resolves this vulnerability.

    Fixed in 3.35.4
  2. Upgrade

    Upgrade PyAthena to a version that resolves this vulnerability.

    Patch PyAthena 3.35.4 SQL Injection via DefaultParameterFormatter DELETE/CTAS

Event History

Aug 2, 2026
CVE Published
via MITRE·02:56 PM
Data Sourced
via MITRE·02:56 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·03:16 PM
DescriptionSeverityWeakness
Feb 29, 58556
Event
via NVD·07:22 PM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-65321?

CVE-2026-65321 has a critical severity score of 9.8.

2

How do I fix CVE-2026-65321?

To fix CVE-2026-65321, upgrade to PyAthena version 3.35.4 or later.

3

What type of vulnerability is CVE-2026-65321?

CVE-2026-65321 is an SQL injection vulnerability.

4

Who is affected by CVE-2026-65321?

Users of PyAthena versions prior to 3.35.4 are affected by CVE-2026-65321.

5

What can attackers achieve with CVE-2026-65321?

Attackers can inject arbitrary SQL commands into DELETE and CTAS statements.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203