Apache Flink: Remote code execution via SQL injection in code generation
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- The rating the maker of the software gives it. Shown when it differs from the CVSS level.What do these mean? →
- Critical (apache)
- Fix
- Fixed in 1.20.4,2.0.2,2.1.2,2.2.1, 1.20.4, 2.0.2, 2.1.2, 2.2.1
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- 1 proof of concept on GitHub
- Exploitation: none
- Automatable: no
- Technical impact: total
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.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: total
- Record last updated
Affected versions
- Apache Software Foundation Apache Flink
From 1.15.0 · fixed in 1.20.4,2.0.2,2.1.2,2.2.1
- org.apache.flink:flink-table-planner_2.12Maven
From 1.15.0 · fixed in 1.20.4
- org.apache.flink:flink-table-planner_2.12Maven
From 2.0.0 · fixed in 2.0.2
- org.apache.flink:flink-table-planner_2.12Maven
From 2.1.0 · fixed in 2.1.2
- org.apache.flink:flink-table-planner_2.12Maven
From 2.2.0 · fixed in 2.2.1
- org.apache.flink:flink-table-api-javaMaven
From 1.15.0 · fixed in 1.20.4
- org.apache.flink:flink-table-api-javaMaven
From 2.0.0 · fixed in 2.0.2
- org.apache.flink:flink-table-api-javaMaven
From 2.1.0 · fixed in 2.1.2
- org.apache.flink:flink-table-api-javaMaven
From 2.2.0 · fixed in 2.2.1
- org.apache.flink:flink-table-runtimeMaven
From 1.15.0 · fixed in 1.20.4
- org.apache.flink:flink-table-runtimeMaven
From 2.0.0 · fixed in 2.0.2
- org.apache.flink:flink-table-runtimeMaven
From 2.1.0 · fixed in 2.1.2
- org.apache.flink:flink-table-runtimeMaven
From 2.2.0 · fixed in 2.2.1