CVE-2026-35194 Apache Flink: Remote code execution via SQL injection in code generation
Authenticated users can execute arbitrary code on TaskManagers by injecting malicious expressions into generated Java code via crafted SQL queries.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-35194?
CVE-2026-35194 is a high-severity code injection vulnerability in Apache Flink, published on 15 May 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Official 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.
Weakness: CWE-94
Which versions are affected by CVE-2026-35194?
25 open source packages ship an affected version, including org.apache.flink:flink-table-api-java, flink and org.apache.flink:flink-table-planner_2.12. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
org.apache.flink:flink-table-api-java Maven | From 1.15.0 | 1.20.4 |
org.apache.flink:flink-table-api-java Maven | From 1.15.0 | 1.20.4 |
org.apache.flink:flink-table-api-java Maven | From 2.0.0 | 2.0.2 |
org.apache.flink:flink-table-api-java Maven | From 2.0.0 | 2.0.2 |
org.apache.flink:flink-table-api-java Maven | From 2.1.0 | 2.1.2 |
org.apache.flink:flink-table-api-java Maven | From 2.1.0 | 2.1.2 |
19 more packages
org.apache.flink:flink-table-api-java Maven | From 2.2.0 | 2.2.1 |
org.apache.flink:flink-table-api-java Maven | From 2.2.0 | 2.2.1 |
flink Bitnami | From 1.15.0 | 1.20.4, 2.0.2, 2.1.1, 2.2.1 |
org.apache.flink:flink-table-planner_2.12 Maven | From 1.15.0 | 1.20.4 |
org.apache.flink:flink-table-planner_2.12 Maven | From 1.15.0 | 1.20.4 |
org.apache.flink:flink-table-planner_2.12 Maven | From 2.0.0 | 2.0.2 |
org.apache.flink:flink-table-planner_2.12 Maven | From 2.0.0 | 2.0.2 |
org.apache.flink:flink-table-planner_2.12 Maven | From 2.1.0 | 2.1.2 |
org.apache.flink:flink-table-planner_2.12 Maven | From 2.1.0 | 2.1.2 |
org.apache.flink:flink-table-planner_2.12 Maven | From 2.2.0 | 2.2.1 |
org.apache.flink:flink-table-planner_2.12 Maven | From 2.2.0 | 2.2.1 |
org.apache.flink:flink-table-runtime Maven | From 1.15.0 | 1.20.4 |
org.apache.flink:flink-table-runtime Maven | From 1.15.0 | 1.20.4 |
org.apache.flink:flink-table-runtime Maven | From 2.0.0 | 2.0.2 |
org.apache.flink:flink-table-runtime Maven | From 2.0.0 | 2.0.2 |
org.apache.flink:flink-table-runtime Maven | From 2.1.0 | 2.1.2 |
org.apache.flink:flink-table-runtime Maven | From 2.1.0 | 2.1.2 |
org.apache.flink:flink-table-runtime Maven | From 2.2.0 | 2.2.1 |
org.apache.flink:flink-table-runtime Maven | From 2.2.0 | 2.2.1 |
Products include Apache Flink.
How do I fix CVE-2026-35194?
Upgrade org.apache.flink:flink-table-api-java to a fixed version for your release line: 1.20.4, 2.0.2, 2.1.2 or 2.2.1.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2026-35194 being exploited?
There is no known exploitation of CVE-2026-35194 in the wild and no public exploit code.
Public exploit code: 1 proofs of concept on GitHub.
Other vulnerabilities in Apache Flink
Sources
Also known as BIT-flink-2026-35194, ECHO-fb26-ef43-981b, GHSA-2f54-v4hm-fx73, MINI-35w8-758x-rg8w, MINI-8pgq-2h5r-838m, MINI-gp88-p5fc-h9f3 and 1 more.