Skip to content

Using JMSAppender in log4j configuration may lead to deserialization of untrusted data

High severity GitHub Reviewed Published Dec 17, 2021 in ClickHouse/clickhouse-jdbc-bridge • Updated Jan 9, 2023

Package

maven ru.yandex.clickhouse:clickhouse-jdbc-bridge (Maven)

Affected versions

< 2.0.7

Patched versions

2.0.7

Description

Impact

ClickHouse JDBC Bridge uses slf4j-log4j12 1.7.32, which depends on 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:
# 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 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.

References

Reviewed Dec 17, 2021
Published to the GitHub Advisory Database Dec 17, 2021
Last updated Jan 9, 2023

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Weaknesses

CVE ID

No known CVE

GHSA ID

GHSA-3w6p-8f82-gw8r
Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.