{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-65321","id":"CVE-2026-65321","title":"PyAthena SQL Injection via DefaultParameterFormatter DELETE/CTAS","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 char","descriptionLong":"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.","published":"2026-08-02T14:56:28.910Z","updated":"2026-10-28T02:30:21.656798864Z","reserved":"2026-07-21T20:57:44.880Z","status":"Deferred","rejected":false,"assigner":"VulnCheck","metric":{"version":"4.0","score":9.3,"vector":"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","rating":"critical","source":"VulnCheck"},"metrics":[{"version":"4.0","score":9.3,"vector":"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","rating":"critical","source":"VulnCheck"},{"version":"4.0","score":9.3,"vector":"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/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","rating":"critical","source":"vulncheck.com"},{"version":"4.0","score":null,"vector":"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","rating":"unrated","source":"OSV"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"VulnCheck"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"vulncheck.com"}],"rating":"critical","products":["laughingman7743 PyAthena"],"affectedProducts":[{"vendor":"laughingman7743","product":"PyAthena","defaultStatus":"affected","versions":[{"status":"affected","version":"0","lessThanOrEqual":"3.35.3","versionType":"semver"},{"status":"unaffected","version":"3.35.4","versionType":"semver"}],"platforms":[]}],"packages":[],"cwes":["CWE-89"],"aliases":["GHSA-xwj5-g6cv-4r5c"],"references":[{"url":"https://github.com/laughingman7743/PyAthena","tags":["product","package"]},{"url":"https://github.com/laughingman7743/PyAthena/security/advisories/GHSA-xwj5-g6cv-4r5c","tags":["vendor-advisory","advisory"]},{"url":"https://github.com/pyathena-dev/PyAthena/commit/27901d12245ea722b3b4e211c60e2ade4e7c8efd","tags":["patch","fix"]},{"url":"https://www.vulncheck.com/advisories/pyathena-sql-injection-via-defaultparameterformatter-delete-ctas","tags":["third-party-advisory","advisory"]},{"url":"https://rahulkarne.com/#/cve/CVE-2026-65321","tags":["technical-description","article"]},{"url":"https://github.com/rahulreddykarne/CVE-2026-65321-pyathena","tags":["related","package"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/65xxx/CVE-2026-65321.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-65321","tags":["advisory"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total"},"epss":0.00767,"epssPercentile":0.56243,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-65321","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-65321","ok":true,"note":"Deferred"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-65321","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-65321","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}