CVE-2026-65321
PyAthena vor Version 3.35.4 enthält eine Schwachstelle für SQL-Injection-Angriffe, die es unauthentifizierten Angreifern ermöglicht, beli… (CVE-2026-65321)
Beschreibung
PyAthena vor Version 3.35.4 enthält eine Schwachstelle für SQL-Injection-Angriffe, die es unauthentifizierten Angreifern ermöglicht, beliebigen SQL-Code einzuschleusen, indem sie das unsachgemäße Anführungszeichen-Escape in DefaultParameterFormatter.format() ausnutzen. Dieses leitet DELETE- und CTAS-Anweisungen an die _escape_hive-Funktion weiter, die einfache Anführungszeichen mit einem Backslash escapet statt verdoppelt. Da Athena und Trino Backslashes nicht als Escape-Zeichen innerhalb von Zeichenketten behandeln, führt eingegebene Angreiferdaten wie ein einfaches Anführungszeichen gefolgt von SQL-Syntax dazu, dass der Parser die Zeichenkette vorzeitig beendet. Dies ermöglicht Datenexfiltration über UNION SELECT, Ausführung zerstörerischer Anweisungen und eine vom Angreifer kontrollierte CTAS-Ziel- und Inhaltsbestimmung.
Metriken
Weakness-Klassen (CWE)
CWE-89Base
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.
cwe.mitre.org →
Re-Analyse & Statuswechsel
Chronologie der NVD-Audit-Events für diese CVE — Reanalyses, CVSS-Updates, CPE-Diffs.
- CVE Modified2026-08-06 22:18 UTC· disclosure@vulncheck.com
- Reference: https://github.com/rahulreddykarne/CVE-2026-65321-pyathena
- Reference: https://rahulkarne.com/#/cve/CVE-2026-65321
- CVE Modified2026-08-03 17:16 UTC· disclosure@vulncheck.com
- Affected: PyAthena → PyAthena
- CVE Modified2026-08-03 17:16 UTC· 134c704f-9b21-4f2e-91b3-4a467353bcc0
- SSVC: {"id":"CVE-2026-65321","role":"CISA Coordinator","options":[{"exploitation":"none"},{"automatable":"yes"},{"technical…
- New CVE Received2026-08-02 15:16 UTC· disclosure@vulncheck.com
- Affected: PyAthena
- 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.
- CVSS V4.0: AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- CVSS V3.1: AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Quellen & Referenzen
- https://github.com/laughingman7743/PyAthenaproduct
- https://github.com/laughingman7743/PyAthena/security/advisories/GHSA-xwj5-g6cv-4r5cvendor-advisory
- https://github.com/pyathena-dev/PyAthena/commit/27901d12245ea722b3b4e211c60e2ade4e7c8efdpatch
- https://www.vulncheck.com/advisories/pyathena-sql-injection-via-defaultparameterformatter-delete-ctasthird-party-advisory
- https://rahulkarne.com/#/cve/CVE-2026-65321technical-description
- https://github.com/rahulreddykarne/CVE-2026-65321-pyathenarelated