Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to Flink cluster
-
DeliverySubmit malicious SQL with code injection
-
ExploitFlink generates Java code with injected payload
-
ExecutionTaskManager compiles and executes injected code
-
ImpactAttacker gains code execution on cluster
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Successful exploitation requires authenticated access to Apache Flink with SQL query submission privileges. The attacker must be able to submit SQL queries containing either JSON functions (for Flink 1.15.0+) or LIKE expressions with ESCAPE clauses (for Flink 1.17.0+). No special configuration or deployment mode is required beyond standard Flink SQL functionality. Exploitation is limited to authenticated users with query privileges, preventing anonymous remote attacks. |
| Impact | The CVSS score of 8.1 (High) reflects network-based exploitation requiring low privileges with no user interaction, leading to high confidentiality and integrity impact. The attack vector requires authenticated access with query submission privileges, which limits the exposure compared to unauthenticated vulnerabilities. No public exploit identified at time of analysis, and the vulnerability is not listed in CISA KEV, suggesting no confirmed active exploitation. The requirement for authenticated access and specific SQL query patterns reduces the likelihood of opportunistic attacks, making this primarily a risk in environments where untrusted users have query access or where SQL queries incorporate external input. |
| Exploit ScenarioDerived | An authenticated attacker with SQL query submission privileges crafts a malicious SQL query containing specially formatted strings in JSON functions or LIKE ESCAPE clauses. When Flink's SQL engine generates Java code from this query, the malicious string breaks out of its intended context and injects arbitrary Java code, which then executes on TaskManager nodes with the privileges of the Flink process. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 15, 2026
Code injection in Apache Flink's SQL engine allows authenticated users to execute arbitrary code on TaskManagers through malicious SQL queries. The vulnerability affects JSON functions in versions 1.15.0+ and LIKE expressions with ESCAPE clauses in versions 1.17.0+, where user-controlled strings are interpolated into generated Java code without proper escaping. Apache has released patches in versions 1.20.4, 2.0.2, 2.1.2 and 2.2.1.
RemediationAI
Vendor-released patches are available in Apache Flink versions 1.20.4, 2.0.2, 2.1.2 and 2.2.1. Organizations should upgrade to the appropriate patched version based on their current deployment. As an immediate mitigation, restrict SQL query submission privileges to trusted users only and audit existing SQL queries for potentially malicious patterns in JSON functions and LIKE expressions with ESCAPE clauses. Consider implementing input validation for any externally-sourced data incorporated into SQL queries. Review the Apache security advisory at https://lists.apache.org/thread/qh52bw4hhvy7n2owd8b3bt51mz0lvj9x for complete remediation details.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 3 packages in maven
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Apache Flink is a distributed stream processing framework that includes a SQL engine which generates Java code dynamically from SQL queries. The vulnerability (CWE-94: Code Injection) occurs when processing SQL queries containing JSON functions or LIKE expressions with ESCAPE clauses. The SQL-to-Java code generation process fails to properly escape user-controlled strings when embedding them into generated Java source code, allowing attackers to break out of string literals and inject arbitrary Java expressions that execute within the TaskManager JVM.
Know when Apache Flink gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
Primary rating from Vendor (apache) · only source for this CVE.
CVSS VectorVendor: apache
Lifecycle Timeline
3DescriptionCVE.org
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.
Executive ViewAI
Apache Flink SQL engine contains a code injection vulnerability (CVSS 8.1) that allows authenticated users to execute arbitrary code on distributed task processing nodes through specially crafted SQL queries. Organizations running Flink 1.15.0 through 2.2.0 face immediate risk of data exfiltration, system compromise, and operational disruption if user-supplied SQL queries are not restricted to trusted sources.
Apply vendor patch. Until patching is feasible, restrict SQL query submission to trusted internal systems only; disable or sandbox user-facing SQL interfaces; implement network segmentation to limit TaskManager exposure; enforce authentication and SQL input validation to reject ESCAPE clauses and complex JSON function combinations from untrusted sources.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
EUVD-2026-30550
GHSA-2f54-v4hm-fx73
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB