Vulnerabilities in pkg:maven/org.apache.shardingsphere/shardingsphere-proxy

PACKAGE
Advisory Identifier: GHSA-wmxm-6wxc-3xqf
Advisory Summary

CVE-2022-45347 is a CRITICAL (CVSS 9.8) apache shardingsphere-proxy incomplete cleanup vulnerability vulnerability (CWE-459: Incomplete Cleanup) affecting Shardingsphere proxy libraries in the Maven ecosystem. The issue involves apache shardingsphere-proxy incomplete cleanup vulnerability. Remediation is available by upgrading affected packages to version 5.3.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.apache.shardingsphere/shardingsphere-proxy

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-wmxm-6wxc-3xqf CVE-2022-45347 CRITICAL Apache ShardingSphere-Proxy Incomplete Cleanup vulnerability

CVE-2022-45347 at a Glance

CVE Identifier CVE-2022-45347
GHSA Identifier GHSA-wmxm-6wxc-3xqf
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-459: Incomplete Cleanup
Affected Product Shardingsphere proxy
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.8

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

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

How to Fix CVE-2022-45347

To remediate this vulnerability, upgrade all affected Shardingsphere proxy 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.shardingsphere:shardingsphere-proxy fixed: 5.3.0
<dependency>
    <groupId>org.apache.shardingsphere</groupId>
    <artifactId>shardingsphere-proxy</artifactId>
    <version>5.3.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.shardingsphere

How to Check if You Are Affected

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

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

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

Note: The mvn dependency:tree -Dincludes=org.apache.shardingsphere 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-459: Incomplete Cleanup, where the product does not properly "clean up" and remove temporary or supporting resources after they have been used. In Shardingsphere proxy, 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 ShardingSphere-Proxy prior to 5.3.0 when using MySQL as database backend didn't cleanup the database session completely after client authentication failed, which allowed an attacker to execute normal commands by constructing a special MySQL client. This vulnerability has been fixed in Apache ShardingSphere 5.3.0.

CVE-2022-45347 Affected Shardingsphere proxy Versions

1 component(s)
Fixed Versions:
5.3.0
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.shardingsphere:shardingsphere-proxy
Maven
< 5.3.0
5.3.0

References

Frequently Asked Questions

What is CVE-2022-45347?
CVE-2022-45347 is a security vulnerability in Shardingsphere proxy involving Apache ShardingSphere-Proxy Incomplete Cleanup vulnerability under CWE-459: Incomplete Cleanup.
Which Shardingsphere proxy versions are affected?
Affected versions include releases prior to 5.3.0 across affected packages: org.apache.shardingsphere:shardingsphere-proxy.
What version fixes CVE-2022-45347?
Upgrading to 5.3.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is shardingsphere-proxy affected?
Yes, org.apache.shardingsphere:shardingsphere-proxy is affected in releases prior to 5.3.0. Upgrade your dependency to 5.3.0 or later.
What is the CVSS score of CVE-2022-45347?
CVE-2022-45347 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2022-45347?
CVE-2022-45347 is classified under CWE-459: Incomplete Cleanup (The product does not properly "clean up" and remove temporary or supporting resources after they have been used.).
How can I check Maven dependencies for CVE-2022-45347?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.shardingsphere'. 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-wmxm-6wxc-3xqf",
  "modified" : "2023-01-02T16:32:06Z",
  "published" : "2022-12-22T12:30:16Z",
  "aliases" : [ "CVE-2022-45347" ],
  "summary" : "Apache ShardingSphere-Proxy Incomplete Cleanup vulnerability",
  "details" : "Apache ShardingSphere-Proxy prior to 5.3.0 when using MySQL as database backend didn't cleanup the database session completely after client authentication failed, which allowed an attacker to execute normal commands by constructing a special MySQL client. This vulnerability has been fixed in Apache ShardingSphere 5.3.0.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.shardingsphere:shardingsphere-proxy"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.3.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-45347"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pjfanning/shardingsphere"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/l5rz7j4rg10o7ywtgknh2f5hxnv6yw3l"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-459" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-12-22T20:02:29Z",
    "nvd_published_at" : "2022-12-22T11:15:00Z"
  }
}