CVE-2026-35194
Apache Flink: Remote code execution via SQL injection in code generation
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 Maven artifacts (3)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.apache.flink » flink-table-api-java | >= 1.15.0, < 1.20.4>= 2.0.0, < 2.0.2>= 2.1.0, < 2.1.2>= 2.2.0, < 2.2.1 | 1.20.4, 2.0.2, 2.1.2, 2.2.1 |
| org.apache.flink » flink-table-planner_2.12 | >= 1.15.0, < 1.20.4>= 2.0.0, < 2.0.2>= 2.1.0, < 2.1.2>= 2.2.0, < 2.2.1 | 1.20.4, 2.0.2, 2.1.2, 2.2.1 |
| org.apache.flink » flink-table-runtime | >= 1.15.0, < 1.20.4>= 2.0.0, < 2.0.2>= 2.1.0, < 2.1.2>= 2.2.0, < 2.2.1 | 1.20.4, 2.0.2, 2.1.2, 2.2.1 |
Blast radius
100% of the dependent artifacts (112) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 1,652 |
| 2 hops | 1,521 |
| 3 hops | 382 |
| 4 hops | 46 |
| 5 hops | 8 |
Most used dependents
- org.apache.flink » flink-table-api-java-bridge636 usages
- org.apache.flink » flink-test-utils540 usages
- org.apache.flink » flink-table-planner471 usages
- org.apache.flink » flink-table-runtime283 usages
- org.apache.flink » flink-connector-test-utils134 usages
- org.apache.flink » flink-table-planner-loader94 usages
- org.apache.flink » flink-table-api-scala-bridge67 usages
- org.apache.flink » flink-table-test-utils35 usages
- org.apache.flink » flink-table-api-scala30 usages
- org.apache.flink » flink-sql-gateway20 usages
- org.apache.flink » flink-connector-test-util19 usages
- org.apache.flink » flink-sql-client18 usages
- org.apache.flink » flink-sql-gateway-api13 usages
- com.ververica » flink-connector-test-util12 usages
- org.apache.doris » flink-doris-connector-base10 usages
Computed from the dependency graph of build 20261201.0702 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
References
| Advisory | NVD CVE-2026-35194 | nvd.nist.gov |
| Package | apache/flink | github.com |
| Web | apache/flink commit 64007b1 | github.com |
| Web | apache/flink commit 8db22cf | github.com |
| Web | thread/qh52bw4hhvy7n2owd8b3bt51mz0lvj9x | lists.apache.org |
| Web | lists/oss-security/2026/05/15/20 | openwall.com |
