Read the docs
TI-2026-46526 Aliases CVE-2026-65321

PyAthena SQL Injection via DefaultParameterFormatter DELETE/CTAS

Priority MEDIUM 49CWE-89Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Attack requirements
None
Impact type
SQL injection
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-89.

Summary

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00767 55th percentileScored 2026-11-07
Fix Fixed PyAthena (laughingman7743): 3.35.4

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
Yes
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
laughingman7743PyAthenaup to 3.35.33.35.4Patch availableCNA
  • PyAthena Vendorlaughingman7743 Affected up to 3.35.3 Fixed in 3.35.4 Patch available CNA

Remediation

  • Fix · CNA PyAthena (laughingman7743) Fixed in 3.35.4

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-65321

References

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences