Laughingman7743 PyAthena
PyAthena 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 _escape_hive 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 versions and mitigation
From the CVE record and the vendor's references.Affected
- <= 3.35.3
Fixed in 3.35.4
Mitigation
Upgrade PyAthena to 3.35.4 or later.
References
Timeline
Days relative to CVE publicationFirst public PoC 19 h after publication; not in CISA KEV. First PoC: rahulreddykarne/CVE-2026-65321-pyathena (created 3 Aug 2026, found by us: backfilled).
PoC repositories
Found on GitHub.1 PoCs
PoCs 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| rahulreddykarne/CVE-2026-65321-pyathena | 3 Aug 2026 +19 h | 0 | PoC via PoC Index
Flags · score 15
Below the suspicion threshold (50); does not change the assessment. |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.