Vulnerabilities in pkg:maven/org.apache.flink/flink-table-runtime

PACKAGE
Advisory Identifier: GHSA-2f54-v4hm-fx73
Advisory Summary

CVE-2026-35194 is a HIGH (CVSS 8.1) remote code execution vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Apache Flink libraries in the Maven ecosystem. The issue involves remote code execution via sql injection in code generation. Remediation is available by upgrading affected packages to version 1.20.4, 2.0.2, 2.1.2, 2.2.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.apache.flink/flink-table-runtime

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.apache.flink/flink-table-runtime. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-2f54-v4hm-fx73 CVE-2026-35194 HIGH Apache Flink: Remote code execution via SQL injection in code generation

CVE-2026-35194 at a Glance

CVE Identifier CVE-2026-35194
GHSA Identifier GHSA-2f54-v4hm-fx73
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Apache Flink
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 8.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2026-35194

To remediate this vulnerability, upgrade all affected Apache Flink dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.apache.flink:flink-table-planner_2.12 fixed: 1.20.4
<dependency>
    <groupId>org.apache.flink</groupId>
    <artifactId>flink-table-planner_2.12</artifactId>
    <version>1.20.4</version>
</dependency>
org.apache.flink:flink-table-planner_2.12 fixed: 2.0.2
<dependency>
    <groupId>org.apache.flink</groupId>
    <artifactId>flink-table-planner_2.12</artifactId>
    <version>2.0.2</version>
</dependency>
org.apache.flink:flink-table-planner_2.12 fixed: 2.1.2
<dependency>
    <groupId>org.apache.flink</groupId>
    <artifactId>flink-table-planner_2.12</artifactId>
    <version>2.1.2</version>
</dependency>
org.apache.flink:flink-table-planner_2.12 fixed: 2.2.1
<dependency>
    <groupId>org.apache.flink</groupId>
    <artifactId>flink-table-planner_2.12</artifactId>
    <version>2.2.1</version>
</dependency>
org.apache.flink:flink-table-api-java fixed: 1.20.4
<dependency>
    <groupId>org.apache.flink</groupId>
    <artifactId>flink-table-api-java</artifactId>
    <version>1.20.4</version>
</dependency>
org.apache.flink:flink-table-api-java fixed: 2.0.2
<dependency>
    <groupId>org.apache.flink</groupId>
    <artifactId>flink-table-api-java</artifactId>
    <version>2.0.2</version>
</dependency>
org.apache.flink:flink-table-api-java fixed: 2.1.2
<dependency>
    <groupId>org.apache.flink</groupId>
    <artifactId>flink-table-api-java</artifactId>
    <version>2.1.2</version>
</dependency>
org.apache.flink:flink-table-api-java fixed: 2.2.1
<dependency>
    <groupId>org.apache.flink</groupId>
    <artifactId>flink-table-api-java</artifactId>
    <version>2.2.1</version>
</dependency>
org.apache.flink:flink-table-runtime fixed: 1.20.4
<dependency>
    <groupId>org.apache.flink</groupId>
    <artifactId>flink-table-runtime</artifactId>
    <version>1.20.4</version>
</dependency>
org.apache.flink:flink-table-runtime fixed: 2.0.2
<dependency>
    <groupId>org.apache.flink</groupId>
    <artifactId>flink-table-runtime</artifactId>
    <version>2.0.2</version>
</dependency>
org.apache.flink:flink-table-runtime fixed: 2.1.2
<dependency>
    <groupId>org.apache.flink</groupId>
    <artifactId>flink-table-runtime</artifactId>
    <version>2.1.2</version>
</dependency>
org.apache.flink:flink-table-runtime fixed: 2.2.1
<dependency>
    <groupId>org.apache.flink</groupId>
    <artifactId>flink-table-runtime</artifactId>
    <version>2.2.1</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.apache.flink

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2026-35194, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.apache.flink

Analyze the terminal output to locate any version of Apache Flink in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.20.4), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.apache.flink command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Apache Flink, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

CVE-2026-35194 Affected Apache Flink Versions

12 component(s)
Fixed Versions:
1.20.42.0.22.1.22.2.1
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.flink:flink-table-planner_2.12
Maven
≥ 1.15.0
< 1.20.4
1.20.4
org.apache.flink:flink-table-planner_2.12
Maven
≥ 2.0.0
< 2.0.2
2.0.2
org.apache.flink:flink-table-planner_2.12
Maven
≥ 2.1.0
< 2.1.2
2.1.2
org.apache.flink:flink-table-planner_2.12
Maven
≥ 2.2.0
< 2.2.1
2.2.1
org.apache.flink:flink-table-api-java
Maven
≥ 1.15.0
< 1.20.4
1.20.4
org.apache.flink:flink-table-api-java
Maven
≥ 2.0.0
< 2.0.2
2.0.2
org.apache.flink:flink-table-api-java
Maven
≥ 2.1.0
< 2.1.2
2.1.2
org.apache.flink:flink-table-api-java
Maven
≥ 2.2.0
< 2.2.1
2.2.1
org.apache.flink:flink-table-runtime
Maven
≥ 1.15.0
< 1.20.4
1.20.4
org.apache.flink:flink-table-runtime
Maven
≥ 2.0.0
< 2.0.2
2.0.2
org.apache.flink:flink-table-runtime
Maven
≥ 2.1.0
< 2.1.2
2.1.2
org.apache.flink:flink-table-runtime
Maven
≥ 2.2.0
< 2.2.1
2.2.1

References

Frequently Asked Questions

What is CVE-2026-35194?
CVE-2026-35194 is a security vulnerability in Apache Flink involving Remote code execution via SQL injection in code generation under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Apache Flink versions are affected?
Affected versions include releases prior to 1.20.4, 2.0.2, 2.1.2, 2.2.1 across affected packages: org.apache.flink:flink-table-planner_2.12, org.apache.flink:flink-table-api-java, org.apache.flink:flink-table-runtime.
What version fixes CVE-2026-35194?
Upgrading to 1.20.4, 2.0.2, 2.1.2, 2.2.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is flink-table-planner_2.12 affected?
Yes, org.apache.flink:flink-table-planner_2.12 is affected in releases prior to 1.20.4, 2.0.2, 2.1.2, 2.2.1. Upgrade your dependency to 1.20.4, 2.0.2, 2.1.2, 2.2.1 or later.
Is flink-table-api-java affected?
Yes, org.apache.flink:flink-table-api-java is affected in releases prior to 1.20.4, 2.0.2, 2.1.2, 2.2.1. Upgrade your dependency to 1.20.4, 2.0.2, 2.1.2, 2.2.1 or later.
What is the CVSS score of CVE-2026-35194?
CVE-2026-35194 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2026-35194?
CVE-2026-35194 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check Maven dependencies for CVE-2026-35194?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.flink'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-2f54-v4hm-fx73",
  "modified" : "2026-05-22T15:49:47Z",
  "published" : "2026-05-15T18:30:34Z",
  "aliases" : [ "CVE-2026-35194" ],
  "summary" : "Apache Flink: Remote code execution via SQL injection in code generation",
  "details" : "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.\n\nUsers are recommended to upgrade to either version 1.20.4, 2.0.2, 2.1.2 or 2.2.1, which fixes this issue.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.flink:flink-table-planner_2.12"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.15.0"
      }, {
        "fixed" : "1.20.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.flink:flink-table-planner_2.12"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.0.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.flink:flink-table-planner_2.12"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.1.0"
      }, {
        "fixed" : "2.1.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.flink:flink-table-planner_2.12"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.2.0"
      }, {
        "fixed" : "2.2.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.flink:flink-table-api-java"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.15.0"
      }, {
        "fixed" : "1.20.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.flink:flink-table-api-java"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.0.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.flink:flink-table-api-java"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.1.0"
      }, {
        "fixed" : "2.1.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.flink:flink-table-api-java"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.2.0"
      }, {
        "fixed" : "2.2.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.flink:flink-table-runtime"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.15.0"
      }, {
        "fixed" : "1.20.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.flink:flink-table-runtime"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.0.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.flink:flink-table-runtime"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.1.0"
      }, {
        "fixed" : "2.1.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.flink:flink-table-runtime"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.2.0"
      }, {
        "fixed" : "2.2.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-35194"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/flink/commit/64007b131d689158af90ca1c1b71b018129a85c5"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/flink/commit/8db22cf8fbc4c785f6ffd41c2fd3e8b64a9688cd"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/flink"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/qh52bw4hhvy7n2owd8b3bt51mz0lvj9x"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2026/05/15/20"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-22T15:49:47Z",
    "nvd_published_at" : "2026-05-15T16:16:14Z"
  }
}