SQL Injection Affecting pyathena package, versions [,3.35.4)


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.98% (60th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about SQL Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-PYATHENA-19270043
  • published26 Aug 2026
  • disclosed2 Aug 2026
  • creditRahul Karne

Introduced: 2 Aug 2026

NewCVE-2026-65321  (opens in a new tab)
CWE-89  (opens in a new tab)

How to fix?

Upgrade PyAthena to version 3.35.4 or higher.

Overview

PyAthena is a Python DB API 2.0 (PEP 249) client for Amazon Athena

Affected versions of this package are vulnerable to SQL Injection through its escaper selection for DELETE and CREATE TABLE ... AS SELECT statements. An attacker can break out of a parameterized string literal and inject arbitrary SQL by supplying a value containing a single quote in a DELETE or CTAS query. The vulnerable code routes those statements to the Hive-style backslash escaper, but Athena/Trino parses backslashes as ordinary characters inside string literals, so the injected quote terminates the literal and lets the attacker-controlled SQL run. This can expose or modify data in the target query context and, depending on the caller’s privileges, execute destructive statements against Athena-backed tables.

CVSS Base Scores

version 4.0
version 3.1