AploSec / Disclosures / CVE-2026-142206
PyPika through 0.51.1 SQL Injection via ClickHouse Search and ToFixedString Functions
CVE-2026-142206 · published 2026-12-02
In plain words: this type of bug lets someone change the queries sent to the database (SQL injection). No fixed release is listed yet.
Summary
CVE-2026-142206 affects PyPika (PyPI) <= 0.51.1: SQL Injection via ClickHouse Search and ToFixedString Functions (CWE-89). No fixed release is listed. CVSS 4.0 base score 8.7 (High), assigned by VulnCheck. Published 2026-12-02 by VulnCheck. Credit: Zachariah Mithani (AploSec).
PyPika through 0.51.1 contains an sql injection vulnerability that allows attackers to inject SQL through unescaped pattern arguments in ClickHouse search functions and ToFixedString. Attackers controlling Match, Like, NotLike, MultiSearchAny, MultiMatchAny patterns or ToFixedString values can close string literals to bypass tenant filters or read other tables.
Evidence
Reported to the maintainer. The public advisory and references below describe the evidence and preconditions; reporting status alone does not establish independent reproduction.
Remediation
No fixed release is listed in the advisory. Check the references for upstream status.
References
- VulnCheck advisoryhttps://www.vulncheck.com/advisories/pypika-through-0.51.1-sql-injection-via-clickhouse-search-and-tofixedstring-functions
- Vulnerable codehttps://github.com/kayak/pypika/blob/v0.51.1/pypika/clickhouse/search_string.py#L20-L33
- Vulnerable codehttps://github.com/kayak/pypika/blob/v0.51.1/pypika/clickhouse/search_string.py#L64-L78
- Vulnerable codehttps://github.com/kayak/pypika/blob/v0.51.1/pypika/clickhouse/type_conversion.py#L24-L30
- CVE recordhttps://www.cve.org/CVERecord?id=CVE-2026-142206
- Severity
- High 8.7CVSS 4.0, scored by VulnCheck in the CVE record
- Package
- PyPika
- Ecosystem
- PyPI
- Affected
- <= 0.51.1
- Fixed
- None
- Weakness
- CWE-89
- CNA
- VulnCheck
- Credit
- Zachariah Mithani (AploSec)finder