CVE-2026-35194: CWE-94 Improper Control of Generation of Code ('Code Injection') in Apache Software Foundation Apache Flink
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.
AI Analysis
Technical Summary
This vulnerability (CVE-2026-35194) in Apache Flink involves improper control of code generation (CWE-94) during SQL code generation. Authenticated users who can submit queries can craft SQL statements that inject arbitrary Java code executed on TaskManagers. The flaw is due to user input being interpolated into generated Java code without proper escaping, allowing attackers to break out of string literals and inject malicious expressions. Affected versions include 1.15.0 through 1.20.x and 2.0.0 through 2.x, with specific impact on JSON functions (from 1.15.0) and LIKE expressions with ESCAPE clauses (from 1.17.0).
Potential Impact
Successful exploitation allows authenticated users with query submission privileges to execute arbitrary code on Apache Flink TaskManagers. This can lead to unauthorized code execution within the Flink environment, potentially compromising the integrity and availability of the system processing data streams.
Mitigation Recommendations
Users should upgrade Apache Flink to one of the fixed versions: 1.20.4, 2.0.2, 2.1.2, or 2.2.1. These versions contain the official fixes for this vulnerability. No other mitigation or temporary workaround is indicated in the provided data. Patch status is confirmed by the vendor advisory recommending these upgrades.
CVE-2026-35194: CWE-94 Improper Control of Generation of Code ('Code Injection') in Apache Software Foundation Apache Flink
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.
CVSS v3.1
Score 8.1high
Affected software
pkg:maven/org.apache.flink/flinkRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
This vulnerability (CVE-2026-35194) in Apache Flink involves improper control of code generation (CWE-94) during SQL code generation. Authenticated users who can submit queries can craft SQL statements that inject arbitrary Java code executed on TaskManagers. The flaw is due to user input being interpolated into generated Java code without proper escaping, allowing attackers to break out of string literals and inject malicious expressions. Affected versions include 1.15.0 through 1.20.x and 2.0.0 through 2.x, with specific impact on JSON functions (from 1.15.0) and LIKE expressions with ESCAPE clauses (from 1.17.0).
Potential Impact
Successful exploitation allows authenticated users with query submission privileges to execute arbitrary code on Apache Flink TaskManagers. This can lead to unauthorized code execution within the Flink environment, potentially compromising the integrity and availability of the system processing data streams.
Mitigation Recommendations
Users should upgrade Apache Flink to one of the fixed versions: 1.20.4, 2.0.2, 2.1.2, or 2.2.1. These versions contain the official fixes for this vulnerability. No other mitigation or temporary workaround is indicated in the provided data. Patch status is confirmed by the vendor advisory recommending these upgrades.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- apache
- Date Reserved
- 2026-04-01T18:39:08.929Z
- Cvss Version
- null
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a074490ec166c07b0660923
Added to database: 05/15/2026, 16:06:40 UTC
Last enriched: 05/15/2026, 16:21:51 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 243
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.