8.1high
Apache Flink: Remote code execution via SQL injection in code generation
- Severity
- 8.1high CVSS:3.1 by CISA-ADP
- Exploit likelihood
- 0.38% (higher than 34% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- apache
- Also known as
- GHSA-2f54-v4hm-fx73BIT-FLINK-2026-35194
Description
Code injection in SQL code generation in Apache Flink 1.15.0 through 1.20.x and 2.0.0 through 2.x allows authenticated users with query submission privileges to execute arbitrary code on TaskManagers via maliciously crafted SQL queries. The vulnerability affects JSON functions (1.15.0+) and LIKE expressions with ESCAPE clauses (1.17.0+). User-controlled strings are interpolated into generated Java code without proper escaping, allowing attackers to break out of string literals and inject arbitrary expressions. Users are recommended to upgrade to either version 1.20.4, 2.0.2, 2.1.2 or 2.2.1, which fixes this issue.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Apache Software Foundation Apache Flink | from 1.15.0 before 1.20.4,2.0.2,2.1.2,2.2.1 | CVE List |
| org.apache.flink:flink-table-planner_2.12 (Maven) | from 1.15.0 before 1.20.4, from 2.0.0 before 2.0.2, from 2.1.0 before 2.1.2, from 2.2.0 before 2.2.1 | GitHub Advisory Database |
| org.apache.flink:flink-table-api-java (Maven) | from 1.15.0 before 1.20.4, from 2.0.0 before 2.0.2, from 2.1.0 before 2.1.2, from 2.2.0 before 2.2.1 | GitHub Advisory Database |
| org.apache.flink:flink-table-runtime (Maven) | from 1.15.0 before 1.20.4, from 2.0.0 before 2.0.2, from 2.1.0 before 2.1.2, from 2.2.0 before 2.2.1 | GitHub Advisory Database |
| apache flink | from 1.15.0 before 1.20.4, from 2.0.0 before 2.0.2, from 2.1.0 before 2.1.2, 2.2.0 | NVD |
| flink (Bitnami) | from 1.15.0 before 1.20.4, from 2.0.0 before 2.0.2, from 2.1.0 before 2.1.1, from 2.2.0 before 2.2.1 | Bitnami Vulnerability Database |
All scores
| CISA-ADP | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N |
| GitHub | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N |
| Bitnami Vulnerability Database | high rating |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
Code injection in SQL code generation in Apache Flink 1.15.0 through 1.20.x and 2.0.0 through 2.x allows authenticated users with query submission privileges to execute arbitrary code on TaskManagers via maliciously crafted SQL queries. The vulnerability affects JSON functions (1.15.0+) and LIKE expressions with ESCAPE clauses (1.17.0+). User-controlled strings are interpolated into generated Java code without proper escaping, allowing attackers to break out of string literals and inject arbitrary expressions. Users are recommended to upgrade to either version 1.20.4, 2.0.2, 2.1.2 or 2.2.1, which fixes this issue.
NVD (es)
Inyección de código en la generación de código SQL en Apache Flink 1.15.0 hasta 1.20.x y 2.0.0 hasta 2.x permite a usuarios autenticados con privilegios de envío de consultas ejecutar código arbitrario en los TaskManagers a través de consultas SQL maliciosamente elaboradas. La vulnerabilidad afecta a las funciones JSON (1.15.0+) y a las expresiones LIKE con cláusulas ESCAPE (1.17.0+). Las cadenas controladas por el usuario se interpolan en el código Java generado sin el escape adecuado, permitiendo a los atacantes salir de los literales de cadena e inyectar expresiones arbitrarias. Se recomienda a los usuarios actualizar a la versión 1.20.4, 2.0.2, 2.1.2 o 2.2.1, que corrige este problema.
References
| https://lists.apache.org/thread/qh52bw4hhvy7n2owd8b3bt51mz0lvj9x | advisory, mailing-list, vendor-advisory, web | |
| http://www.openwall.com/lists/oss-security/2026/05/15/20 | advisory, mailing-list, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-35194 | advisory, web | |
| https://github.com/apache/flink/commit/64007b131d689158af90ca1c1b71b018129a85c5 | web | |
| https://github.com/apache/flink/commit/8db22cf8fbc4c785f6ffd41c2fd3e8b64a9688cd | web | |
| https://github.com/apache/flink | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-35194 changed 2026-05-15 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-2f54-v4hm-fx73 changed 2026-05-22 | CC-BY-4.0 |
| NVD | CVE-2026-35194 changed 2026-10-26 | Public domain |
| Bitnami Vulnerability Database | BIT-FLINK-2026-35194 changed 2026-09-08 | Apache-2.0 |