Skip to main content
← All vulnerabilities
CVE-2026-65321

PyAthena SQL Injection via DefaultParameterFormatter DELETE/CTAS

Published
Last modified
published
Not listed in CISA KEV
Fix
Fix or patch referenced
1 proof of concept on GitHub
  • Exploitation: none
  • Automatable: yes
  • Technical impact: total

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: yes · Technical impact: total

  3. Record last updated

Affected versions

  • laughingman7743 PyAthena

    through 3.35.3

References 6

GitHub · laughingman7743/PyAthena

GitHub · pyathena-dev/PyAthena

vulncheck.com

rahulkarne.com

GitHub · rahulreddykarne/CVE-2026-65321-pyathena