Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-65321: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in laughingman7743 PyAthena

0
Critical
VulnerabilityCVE-2026-65321cvecve-2026-65321
Published: 08/02/2026 (08/02/2026, 14:56:28 UTC)
Source: CVE Database V5
Vendor/Project: laughingman7743
Product: PyAthena

Description

PyAthena versions prior to 3.35.4 contain a critical SQL injection vulnerability due to improper handling of special characters in SQL commands. The issue arises from the DefaultParameterFormatter.format() method, which incorrectly escapes single quotes using backslashes instead of doubling them. Since Athena and Trino do not recognize backslashes as escape characters in string literals, this flaw allows attackers to prematurely terminate string literals and inject arbitrary SQL. This can lead to data exfiltration, execution of destructive SQL statements, and attacker-controlled creation of tables via CTAS statements.

CVSS v4.0

Score 9.3critical

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

Affected software

pyathena
pkg:pypi/pyathena
Affected versions
<3.35.4

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/02/2026, 15:32:52 UTC

Technical Analysis

CVE-2026-65321 is a critical SQL injection vulnerability in PyAthena before version 3.35.4. The vulnerability stems from improper quote-escaping in DefaultParameterFormatter.format(), which routes DELETE and CTAS statements to a 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 input containing a single quote followed by SQL syntax can prematurely terminate the string literal. This enables attackers to perform UNION SELECT queries for data exfiltration, execute destructive SQL commands, and control CTAS statement destinations and contents.

Potential Impact

An unauthenticated attacker can exploit this vulnerability to inject arbitrary SQL commands. This can lead to unauthorized data access and exfiltration, execution of destructive SQL statements that may alter or delete data, and creation of attacker-controlled tables. The vulnerability affects the confidentiality, integrity, and availability of data accessed via PyAthena.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, avoid using vulnerable versions of PyAthena in untrusted environments. Review and restrict the use of DELETE and CTAS statements where possible. Monitor vendor channels for updates and apply patches promptly once released.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
VulnCheck
Date Reserved
2026-07-21T20:57:44.880Z
Cvss Version
4.0
State
PUBLISHED
Remediation Level
null

Threat ID: 6a6f5fd5bf32cb7a34b6ff3a

Added to database: 08/02/2026, 15:18:45 UTC

Last enriched: 08/02/2026, 15:32:52 UTC

Last updated: 08/02/2026, 16:21:55 UTC

Views: 4

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses