# CVE-2026-65321 — laughingman7743 PyAthena

> As of 2026-08-03, CVE-2026-65321 is a CRITICAL-severity vulnerability in laughingman7743 PyAthena, CVSS v3.1 9.8, EPSS 0.4% (35.8th percentile). No Threadlinqs-tracked threat campaign has been attributed to CVE-2026-65321 as of 2026-08-03; the identifier is re-checked against the Threadlinqs threat corpus on every daily ingest.

**Last updated:** 2026-08-03

## What is CVE-2026-65321?

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.

The record classifies CVE-2026-65321 under weakness class [CWE-89](https://cwe.mitre.org/data/definitions/89.html). Its CVSS v3 base vector states that the flaw is reachable remotely over the network, needs no prior authentication, needs no user interaction, and has high impact on confidentiality, integrity, availability. 1 affected-product entry is recorded, across 1 vendor, listed below. The identifier was first published 47 days ago.

## Severity and exploitation probability

- **CVSS v3.1 base score:** 9.8 — CRITICAL (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **CVSS v4.0 base score:** 9.3 (`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`)
- **EPSS (FIRST):** 0.4% probability of exploitation in the next 30 days, higher than 35.8% of all scored CVEs
- **CISA KEV:** Not listed in the CISA Known Exploited Vulnerabilities catalog
- **Threadlinqs priority:** 8.3/10 — a Threadlinqs composite of the CVSS base score, the EPSS percentile and public exploit availability
- **Published:** 2026-08-02, last modified 2026-08-03

## Is CVE-2026-65321 being exploited?

Weaponised exploit code for CVE-2026-65321 is publicly available. 1 public proof-of-concept repository is tracked for this identifier. It currently carries a trending score of 47 in the Threadlinqs vulnerability feed.

- [rahulreddykarne/CVE-2026-65321-pyathena](https://github.com/rahulreddykarne/CVE-2026-65321-pyathena) (github)

## Affected products and versions

- **laughingman7743**: PyAthena

## How to fix CVE-2026-65321

No vendor patch reference has been recorded for CVE-2026-65321 in the tracked sources. Follow the references below for a fix, and treat the products listed above as exposed until the vendor states otherwise.

## Threat activity tracking CVE-2026-65321

No threat campaign in the Threadlinqs corpus currently references CVE-2026-65321, in its CVE list or as an indicator. The linkage is recomputed from the live corpus on every daily ingest, so this section fills in as soon as a tracked campaign cites the identifier.

## Sources

Enriched from CVE.org, NVD, FIRST EPSS, public proof-of-concept repositories. Last verified by Threadlinqs on 2026-08-03. This product uses the NVD API but is not endorsed or certified by the NVD.

**Vendor advisory and patch**

- [github.com — vendor advisory](https://github.com/laughingman7743/PyAthena/security/advisories/GHSA-xwj5-g6cv-4r5c)
- [github.com — patch](https://github.com/pyathena-dev/PyAthena/commit/27901d12245ea722b3b4e211c60e2ade4e7c8efd)

**Third-party advisory**

- [vulncheck.com — third party advisory](https://www.vulncheck.com/advisories/pyathena-sql-injection-via-defaultparameterformatter-delete-ctas)

**Issue tracking and product pages**

- [github.com — product](https://github.com/laughingman7743/PyAthena)

Canonical: https://intel.threadlinqs.com/cve/CVE-2026-65321
Full detection coverage and IOCs for threats exploiting CVE-2026-65321 via the Threadlinqs MCP server (Purple tier): https://intel.threadlinqs.com/mcp
