CVE-2026-35194 — Vulnerability in...
HIGH
Apache Flink: Remote code execution via SQL injection in code generation
Published May 15, 2026Updated May 22, 2026Source: osv
Summary
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.
Advisory Timeline
- First published May 15, 2026 (150 days ago).
- Last revised May 22, 2026 — 7 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
Maven
Update org.apache.flink:flink-table-planner_2.12 to 1.20.4 or later<!-- Update pom.xml dependency version to 1.20.4 for org.apache.flink:flink-table-planner_2.12 -->
Maven
Update org.apache.flink:flink-table-api-java to 2.2.1 or later<!-- Update pom.xml dependency version to 2.2.1 for org.apache.flink:flink-table-api-java -->
Maven
Update org.apache.flink:flink-table-runtime to 2.0.2 or later<!-- Update pom.xml dependency version to 2.0.2 for org.apache.flink:flink-table-runtime -->
Maven
Update org.apache.flink:flink-table-planner_2.12 to 2.1.2 or later<!-- Update pom.xml dependency version to 2.1.2 for org.apache.flink:flink-table-planner_2.12 -->
Maven
Update org.apache.flink:flink-table-planner_2.12 to 2.0.2 or later<!-- Update pom.xml dependency version to 2.0.2 for org.apache.flink:flink-table-planner_2.12 -->
Maven
Update org.apache.flink:flink-table-runtime to 1.20.4 or later<!-- Update pom.xml dependency version to 1.20.4 for org.apache.flink:flink-table-runtime -->
Maven
Update org.apache.flink:flink-table-planner_2.12 to 2.2.1 or later<!-- Update pom.xml dependency version to 2.2.1 for org.apache.flink:flink-table-planner_2.12 -->
Maven
Update org.apache.flink:flink-table-runtime to 2.2.1 or later<!-- Update pom.xml dependency version to 2.2.1 for org.apache.flink:flink-table-runtime -->
Maven
Update org.apache.flink:flink-table-api-java to 2.0.2 or later<!-- Update pom.xml dependency version to 2.0.2 for org.apache.flink:flink-table-api-java -->
Maven
Update org.apache.flink:flink-table-runtime to 2.1.2 or later<!-- Update pom.xml dependency version to 2.1.2 for org.apache.flink:flink-table-runtime -->
Maven
Update org.apache.flink:flink-table-api-java to 1.20.4 or later<!-- Update pom.xml dependency version to 1.20.4 for org.apache.flink:flink-table-api-java -->
Maven
Update org.apache.flink:flink-table-api-java to 2.1.2 or later<!-- Update pom.xml dependency version to 2.1.2 for org.apache.flink:flink-table-api-java -->
After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.
Affected Packages (12)
Affects 1 ecosystem: maven (3).
| Package | Ecosystem | Affected | Fixed In |
|---|---|---|---|
| org.apache.flink:flink-table-planner_2.12 | maven | 1.15.0, 1.15.1, 1.15.2, 1.15.3 (+18 more) | 1.20.4 |
| org.apache.flink:flink-table-api-java | maven | 2.2.0 | 2.2.1 |
| org.apache.flink:flink-table-runtime | maven | 2.0-preview1, 2.0.0, 2.0.1 | 2.0.2 |
| org.apache.flink:flink-table-planner_2.12 | maven | 2.1.0, 2.1.1 | 2.1.2 |
| org.apache.flink:flink-table-planner_2.12 | maven | 2.0-preview1, 2.0.0, 2.0.1 | 2.0.2 |
| org.apache.flink:flink-table-runtime | maven | 1.15.0, 1.15.1, 1.15.2, 1.15.3 (+18 more) | 1.20.4 |
| org.apache.flink:flink-table-planner_2.12 | maven | 2.2.0 | 2.2.1 |
| org.apache.flink:flink-table-runtime | maven | 2.2.0 | 2.2.1 |
| org.apache.flink:flink-table-api-java | maven | 2.0-preview1, 2.0.0, 2.0.1 | 2.0.2 |
| org.apache.flink:flink-table-runtime | maven | 2.1.0, 2.1.1 | 2.1.2 |
| org.apache.flink:flink-table-api-java | maven | 1.15.0, 1.15.1, 1.15.2, 1.15.3 (+18 more) | 1.20.4 |
| org.apache.flink:flink-table-api-java | maven | 2.1.0, 2.1.1 | 2.1.2 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-94Code InjectionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 8.1 score means for each attack dimension.
Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
References
- https://nvd.nist.gov/vuln/detail/CVE-2026-35194ADVISORY
- https://github.com/apache/flink/commit/64007b131d689158af90ca1c1b71b018129a85c5WEB
- https://github.com/apache/flink/commit/8db22cf8fbc4c785f6ffd41c2fd3e8b64a9688cdWEB
- https://github.com/apache/flinkPACKAGE
- https://lists.apache.org/thread/qh52bw4hhvy7n2owd8b3bt51mz0lvj9xWEB
- https://www.openwall.com/lists/oss-security/2026/05/15/20WEB
Frequently Asked Questions
- What is CVE-2026-35194?
- Apache Flink: Remote code execution via SQL injection in code generation This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.1/10).
- How do I check if my project is affected by CVE-2026-35194?
- CVE-2026-35194 affects org.apache.flink:flink-table-planner_2.12, org.apache.flink:flink-table-api-java and org.apache.flink:flink-table-runtime. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-35194 and 200,000+ other known vulnerabilities.
Severity & Exploitability
CVSS Score
8.1
High exploitability or significant impact. Prioritize remediation within days.
Also Known As
GHSA-2f54-v4hm-fx73
BIT-flink-2026-35194
Related CVEs
- CVE-2026-61570HIGH
MPXJ: XXE Vulnerability in MerlinReader
- CVE-2026-107725HIGH
Hazelcast has an authorization bypass in IMap Predicates API
Check if you're affected
Scan your dependencies to see if this vulnerability affects your projects.
Scan Your Dependencies