CVE-2026-65321
published critical CVSS 4.0 · 9.3PyAthena SQL Injection via DefaultParameterFormatter DELETE/CTAS
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| laughingman7743 | — | PyAthena0 through 3.35.3 (affected · semver) · 3.35.4 (unaffected · semver) · Other versions: affected | Version-specific | Not stated | VulnCheck |
Description
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 9.3 / 10
- Severity
- critical
- Provider
- VulnCheck · cna
- Vector string
- CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
- Scenarios
- en: GENERAL
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 9.8 | critical | VulnCheck · cna | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | en: GENERAL |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| laughingman7743 | PyAthena | 0 through 3.35.3 (affected · semver)3.35.4 (unaffected · semver)Default: affected | VulnCheck · cna |
Weaknesses
1- CWE-89 CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
References
6- Product Repository https://github.com/laughingman7743/PyAthena
- GitHub Security Advisory (GHSA-xwj5-g6cv-4r5c) https://github.com/laughingman7743/PyAthena/security/advisories/GHSA-xwj5-g6cv-4r5c
- Patch Commit https://github.com/pyathena-dev/PyAthena/commit/27901d12245ea722b3b4e211c60e2ade4e7c8efd
- https://github.com/rahulreddykarne/CVE-2026-65321-pyathena
- https://rahulkarne.com/#/cve/CVE-2026-65321
- https://www.vulncheck.com/advisories/pyathena-sql-injection-via-defaultparameterformatter-delete-ctas
Provider assertions
2VulnCheck · cna
PyAthena SQL Injection via DefaultParameterFormatter DELETE/CTAS
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- f32e31c6cf269886806c7c8ef6d83e4b2d68a5782694532a0450ed38b72a546b
- Ingested
- 23 Sep 2026, 09:26:10 UTC
- Source record
- Official CVE record