Vulnerabilities in pkg:maven/org.apache.flink/flink-connector-mysql-cdc

PACKAGE
Advisory Identifier: GHSA-wqm3-w3p6-xjgm
Advisory Summary

CVE-2025-62228 is a MODERATE sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Flink cdc pipeline connectors libraries in the Maven ecosystem. The issue involves apache flink cdc is vulnerable to sql injection through maliciously crafted identifiers. Remediation is available by upgrading affected packages to version 3.5.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.apache.flink/flink-connector-mysql-cdc

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-wqm3-w3p6-xjgm CVE-2025-62228 MODERATE Apache Flink CDC is vulnerable to SQL Injection through maliciously crafted identifiers

CVE-2025-62228 at a Glance

CVE Identifier CVE-2025-62228
GHSA Identifier GHSA-wqm3-w3p6-xjgm
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected Product Flink cdc pipeline connectors
Package Ecosystem Maven
Published Date
Last Updated

How to Fix CVE-2025-62228

To remediate this vulnerability, upgrade all affected Flink cdc pipeline connectors 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-cdc-pipeline-connectors fixed: 3.5.0
<dependency>
    <groupId>org.apache.flink</groupId>
    <artifactId>flink-cdc-pipeline-connectors</artifactId>
    <version>3.5.0</version>
</dependency>
org.apache.flink:flink-connector-oracle-cdc fixed: 3.5.0
<dependency>
    <groupId>org.apache.flink</groupId>
    <artifactId>flink-connector-oracle-cdc</artifactId>
    <version>3.5.0</version>
</dependency>
org.apache.flink:flink-connector-db2-cdc fixed: 3.5.0
<dependency>
    <groupId>org.apache.flink</groupId>
    <artifactId>flink-connector-db2-cdc</artifactId>
    <version>3.5.0</version>
</dependency>
org.apache.flink:flink-connector-sqlserver-cdc fixed: 3.5.0
<dependency>
    <groupId>org.apache.flink</groupId>
    <artifactId>flink-connector-sqlserver-cdc</artifactId>
    <version>3.5.0</version>
</dependency>
org.apache.flink:flink-connector-mysql-cdc fixed: 3.5.0
<dependency>
    <groupId>org.apache.flink</groupId>
    <artifactId>flink-connector-mysql-cdc</artifactId>
    <version>3.5.0</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-2025-62228, 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 Flink cdc pipeline connectors in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.5.0), 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-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In Flink cdc pipeline connectors, 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

Apache Flink CDC version 3.0.0 to before 3.5.0 are vulnerable to a SQL injection via maliciously crafted identifiers eg. crafted database name or crafted table name. Even through only the logged-in database user can trigger the attack, users are recommended to update Flink CDC version to 3.5.0 which address this issue.

CVE-2025-62228 Affected Flink cdc pipeline connectors Versions

5 component(s)
Fixed Versions:
3.5.0
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.flink:flink-cdc-pipeline-connectors
Maven
≥ 3.0.0
< 3.5.0
3.5.0
org.apache.flink:flink-connector-oracle-cdc
Maven
≥ 3.0.0
< 3.5.0
3.5.0
org.apache.flink:flink-connector-db2-cdc
Maven
≥ 3.0.0
< 3.5.0
3.5.0
org.apache.flink:flink-connector-sqlserver-cdc
Maven
≥ 3.0.0
< 3.5.0
3.5.0
org.apache.flink:flink-connector-mysql-cdc
Maven
≥ 3.0.0
< 3.5.0
3.5.0

References

Frequently Asked Questions

What is CVE-2025-62228?
CVE-2025-62228 is a security vulnerability in Flink cdc pipeline connectors involving Apache Flink CDC is vulnerable to SQL Injection through maliciously crafted identifiers under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Which Flink cdc pipeline connectors versions are affected?
Affected versions include releases prior to 3.5.0 across affected packages: org.apache.flink:flink-cdc-pipeline-connectors, org.apache.flink:flink-connector-oracle-cdc, org.apache.flink:flink-connector-db2-cdc, org.apache.flink:flink-connector-sqlserver-cdc, org.apache.flink:flink-connector-mysql-cdc.
What version fixes CVE-2025-62228?
Upgrading to 3.5.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is flink-cdc-pipeline-connectors affected?
Yes, org.apache.flink:flink-cdc-pipeline-connectors is affected in releases prior to 3.5.0. Upgrade your dependency to 3.5.0 or later.
Is flink-connector-oracle-cdc affected?
Yes, org.apache.flink:flink-connector-oracle-cdc is affected in releases prior to 3.5.0. Upgrade your dependency to 3.5.0 or later.
What CWE is associated with CVE-2025-62228?
CVE-2025-62228 is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') (The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.).
How can I check Maven dependencies for CVE-2025-62228?
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-wqm3-w3p6-xjgm",
  "modified" : "2025-11-05T20:48:11Z",
  "published" : "2025-10-09T15:31:03Z",
  "aliases" : [ "CVE-2025-62228" ],
  "summary" : "Apache Flink CDC is vulnerable to SQL Injection through maliciously crafted identifiers",
  "details" : "Apache Flink CDC version 3.0.0 to before 3.5.0 are vulnerable to a SQL injection via maliciously crafted identifiers eg. crafted database name or crafted table name. Even through only the logged-in database user can trigger the attack, users are recommended to update Flink CDC version to 3.5.0 which address this issue.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:L/VI:L/VA:L/SC:L/SI:L/SA:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.flink:flink-cdc-pipeline-connectors"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.5.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.flink:flink-connector-oracle-cdc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.5.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.flink:flink-connector-db2-cdc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.5.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.flink:flink-connector-sqlserver-cdc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.5.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.flink:flink-connector-mysql-cdc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.5.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-62228"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/flink-cdc/pull/4123"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/flink-cdc/commit/d5766187a9a4b191820e10238d4594ae665cdb89"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/flink-cdc"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/3dn0hc1wbc5sj0jbgdg33gtnwlw7qrl3"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2025/10/09/2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-89" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-10-09T20:53:40Z",
    "nvd_published_at" : "2025-10-09T14:15:55Z"
  }
}