Vulnerabilities in pkg:maven/ru.yandex.clickhouse/clickhouse-jdbc-bridge

PACKAGE
Advisory Summary

GHSA-3w6p-8f82-gw8r is a HIGH (CVSS 8.1) using jmsappender vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Clickhouse jdbc bridge libraries in the Maven ecosystem. The issue involves using jmsappender in log4j configuration may lead to deserialization of untrusted data. Remediation is available by upgrading affected packages to version 2.0.7.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/ru.yandex.clickhouse/clickhouse-jdbc-bridge

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/ru.yandex.clickhouse/clickhouse-jdbc-bridge. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-3w6p-8f82-gw8r - HIGH Using JMSAppender in log4j configuration may lead to deserialization of untrusted data

GHSA-3w6p-8f82-gw8r at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-3w6p-8f82-gw8r
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product Clickhouse jdbc bridge
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:H/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
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 GHSA-3w6p-8f82-gw8r

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

ru.yandex.clickhouse:clickhouse-jdbc-bridge fixed: 2.0.7
<dependency>
    <groupId>ru.yandex.clickhouse</groupId>
    <artifactId>clickhouse-jdbc-bridge</artifactId>
    <version>2.0.7</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=ru.yandex.clickhouse

How to Check if You Are Affected

To determine whether your Java application is affected by GHSA-3w6p-8f82-gw8r, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=ru.yandex.clickhouse

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

Note: The mvn dependency:tree -Dincludes=ru.yandex.clickhouse 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-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Clickhouse jdbc bridge, 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

### Impact ClickHouse JDBC Bridge uses [slf4j-log4j12 1.7.32](https://repo1.maven.org/maven2/org/slf4j/slf4j-log4j12/1.7.32/), which depends on [log4j 1.2.17](https://repo1.maven.org/maven2/log4j/log4j/1.2.17/). It allows a remote attacker to execute code on the server, if you changed default log4j configuration by adding JMSAppender and an insecure JMS broker. ### Patches The patch version `2.0.7` removed log4j dependency by replacing `slf4j-log4j12` to `slf4j-jdk14`. Logging configuration is also changed from `log4j.properties` to `logging.properties`. ### Workarounds 1. Do NOT change log4j configuration to use JMSAppender along with insecure JMS broker 2. Alternatively, you can issue below command to remove `JMSAppender.class`: ```(bash) # install zip command if you don't have apt-get update && apt-get install -y zip # remove the class zip -d clickhouse-jdbc-bridge*.jar ru/yandex/clickhouse/jdbcbridge/internal/log4j/net/JMSAppender.class ``` ### References Please refer to [CVE-2021-4104](https://access.redhat.com/security/cve/CVE-2021-4104) to read more. ### For more information If you have any questions or comments about this advisory, please feel free to open an issue in the repository.

GHSA-3w6p-8f82-gw8r Affected Clickhouse jdbc bridge Versions

1 component(s)
Fixed Versions:
2.0.7
Product / Package Ecosystem Affected Versions Fixed Version
ru.yandex.clickhouse:clickhouse-jdbc-bridge
Maven
< 2.0.7
2.0.7

References

Frequently Asked Questions

What is GHSA-3w6p-8f82-gw8r?
GHSA-3w6p-8f82-gw8r is a security vulnerability in Clickhouse jdbc bridge involving Using JMSAppender in log4j configuration may lead to deserialization of untrusted data under CWE-502: Deserialization of Untrusted Data.
Which Clickhouse jdbc bridge versions are affected?
Affected versions include releases prior to 2.0.7 across affected packages: ru.yandex.clickhouse:clickhouse-jdbc-bridge.
What version fixes GHSA-3w6p-8f82-gw8r?
Upgrading to 2.0.7 (or the latest patched release for your respective branch) resolves the vulnerability.
Is clickhouse-jdbc-bridge affected?
Yes, ru.yandex.clickhouse:clickhouse-jdbc-bridge is affected in releases prior to 2.0.7. Upgrade your dependency to 2.0.7 or later.
What is the CVSS score of GHSA-3w6p-8f82-gw8r?
GHSA-3w6p-8f82-gw8r has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with GHSA-3w6p-8f82-gw8r?
GHSA-3w6p-8f82-gw8r is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check Maven dependencies for GHSA-3w6p-8f82-gw8r?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=ru.yandex.clickhouse'. 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-3w6p-8f82-gw8r",
  "modified" : "2021-12-17T20:34:04Z",
  "published" : "2021-12-17T20:42:38Z",
  "aliases" : [ ],
  "summary" : "Using JMSAppender in log4j configuration may lead to deserialization of untrusted data",
  "details" : "### Impact\n\nClickHouse JDBC Bridge uses [slf4j-log4j12 1.7.32](https://repo1.maven.org/maven2/org/slf4j/slf4j-log4j12/1.7.32/), which depends on [log4j 1.2.17](https://repo1.maven.org/maven2/log4j/log4j/1.2.17/). It allows a remote attacker to execute code on the server, if you changed default log4j configuration by adding JMSAppender and an insecure JMS broker.\n\n### Patches\n\nThe patch version `2.0.7` removed log4j dependency by replacing `slf4j-log4j12` to `slf4j-jdk14`. Logging configuration is also changed from `log4j.properties` to `logging.properties`.\n\n### Workarounds\n\n1. Do NOT change log4j configuration to use JMSAppender along with insecure JMS broker\n2. Alternatively, you can issue below command to remove `JMSAppender.class`:\n\n```(bash)\n# install zip command if you don't have\napt-get update && apt-get install -y zip\n# remove the class\nzip -d clickhouse-jdbc-bridge*.jar ru/yandex/clickhouse/jdbcbridge/internal/log4j/net/JMSAppender.class\n```\n\n### References\n\nPlease refer to [CVE-2021-4104](https://access.redhat.com/security/cve/CVE-2021-4104) to read more.\n\n### For more information\n\nIf you have any questions or comments about this advisory, please feel free to open an issue in the repository.\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "ru.yandex.clickhouse:clickhouse-jdbc-bridge"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.0.7"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/ClickHouse/clickhouse-jdbc-bridge/security/advisories/GHSA-3w6p-8f82-gw8r"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-4104"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/security/cve/CVE-2021-4104"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ClickHouse/clickhouse-jdbc-bridge"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-502" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-12-17T20:34:04Z",
    "nvd_published_at" : null
  }
}