SQL injection via wrong DELETE and CTAS escaper
Published Aug 2, 2026 · Updated Aug 2, 2026
SQL injection in PyAthena 3.35.3 and earlier allows remote attackers to execute arbitrary Athena SQL through crafted query parameters. DefaultParameterFormatter.format() sends DELETE and CTAS values to _escape_hive, which backslash-escapes quotes that Athena and Trino treat as literal terminators. Exposure requires a consuming application to pass untrusted values into those statement types, and consequences are bounded by its Athena IAM role and accessible schemas.
Summary
What happened
SQL injection in PyAthena 3.35.3 and earlier allows remote attackers to execute arbitrary Athena SQL through crafted query parameters. DefaultParameterFormatter.format() sends DELETE and CTAS values to _escape_hive, which backslash-escapes quotes that Athena and Trino treat as literal terminators. Exposure requires a consuming application to pass untrusted values into those statement types, and consequences are bounded by its Athena IAM role and accessible schemas.
The record
- CVE
- CVE-2026-65321
- Published
- Aug 2, 2026
- Updated
- Aug 2, 2026
- Vendor
- laughingman7743
- Product
- PyAthena
- Classifications
- CWE-89, T1190
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Aug 2, 2026CVE publishedPublication date reported by the CVE source.
- Aug 2, 2026Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=0 <=3.35.3
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- CVE-2026-65321 PyAthena formatter PoCproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo