CVE-2026-35194
JSON

8.1high

Apache Flink: Remote code execution via SQL injection in code generation

Severity
8.1high CVSS:3.1 by CISA-ADP
Exploit likelihood
0.38% (higher than 34% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
apache
Also known as
GHSA-2f54-v4hm-fx73BIT-FLINK-2026-35194

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

Product or packageVersionsReported by
Apache Software Foundation Apache Flinkfrom 1.15.0 before 1.20.4,2.0.2,2.1.2,2.2.1CVE List
org.apache.flink:flink-table-planner_2.12 (Maven)from 1.15.0 before 1.20.4, from 2.0.0 before 2.0.2, from 2.1.0 before 2.1.2, from 2.2.0 before 2.2.1GitHub Advisory Database
org.apache.flink:flink-table-api-java (Maven)from 1.15.0 before 1.20.4, from 2.0.0 before 2.0.2, from 2.1.0 before 2.1.2, from 2.2.0 before 2.2.1GitHub Advisory Database
org.apache.flink:flink-table-runtime (Maven)from 1.15.0 before 1.20.4, from 2.0.0 before 2.0.2, from 2.1.0 before 2.1.2, from 2.2.0 before 2.2.1GitHub Advisory Database
apache flinkfrom 1.15.0 before 1.20.4, from 2.0.0 before 2.0.2, from 2.1.0 before 2.1.2, 2.2.0NVD
flink (Bitnami)from 1.15.0 before 1.20.4, from 2.0.0 before 2.0.2, from 2.1.0 before 2.1.1, from 2.2.0 before 2.2.1Bitnami Vulnerability Database

All scores

CISA-ADP8.1high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
GitHub8.1high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
Bitnami Vulnerability Databasehigh rating

Classification

CWE-94

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

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.

NVD (es)

Inyección de código en la generación de código SQL en Apache Flink 1.15.0 hasta 1.20.x y 2.0.0 hasta 2.x permite a usuarios autenticados con privilegios de envío de consultas ejecutar código arbitrario en los TaskManagers a través de consultas SQL maliciosamente elaboradas. La vulnerabilidad afecta a las funciones JSON (1.15.0+) y a las expresiones LIKE con cláusulas ESCAPE (1.17.0+). Las cadenas controladas por el usuario se interpolan en el código Java generado sin el escape adecuado, permitiendo a los atacantes salir de los literales de cadena e inyectar expresiones arbitrarias. Se recomienda a los usuarios actualizar a la versión 1.20.4, 2.0.2, 2.1.2 o 2.2.1, que corrige este problema.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-35194 changed 2026-05-15CVE Terms of Use
GitHub Advisory DatabaseGHSA-2f54-v4hm-fx73 changed 2026-05-22CC-BY-4.0
NVDCVE-2026-35194 changed 2026-10-26Public domain
Bitnami Vulnerability DatabaseBIT-FLINK-2026-35194 changed 2026-09-08Apache-2.0