CVE-2024-31141
Java vulnerability analysis and mitigation

Overview

Apache Kafka Clients versions from 2.3.0 through 3.5.2, 3.6.2, and 3.7.0 are affected by a vulnerability (CVE-2024-31141) related to improper privilege management and file access control. The vulnerability exists in how Apache Kafka Clients handle configuration data through ConfigProvider plugins, specifically in FileConfigProvider, DirectoryConfigProvider, and EnvVarConfigProvider implementations (OSS Security, Security Online).

Technical details

The vulnerability stems from Apache Kafka Clients' configuration data handling mechanism, which includes ConfigProvider plugins for configuration manipulation. The implementation allows these providers to read from disk or environment variables. When Apache Kafka Clients configurations can be specified by untrusted parties, the ConfigProviders can be exploited to read arbitrary contents from the disk and environment variables. The vulnerability has been assigned a CVSS v3.1 Base Score of 6.5 (MEDIUM) with the vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N (OSS Security).

Impact

The primary impact of this vulnerability is the potential unauthorized access to sensitive information. In Apache Kafka Connect environments, attackers can escalate from REST API access to filesystem/environment access, which is particularly concerning in SaaS product environments. This could lead to the exposure of sensitive files and environment variables (Security Online).

Mitigation and workarounds

Users are recommended to upgrade kafka-clients to version 3.8.0 or higher and set the JVM system property 'org.apache.kafka.automatic.config.providers=none'. For Kafka Connect users with specific ConfigProvider implementations, it is recommended to implement 'allowlist.pattern' and 'allowed.paths' to restrict access. However, users of Kafka Broker, Kafka MirrorMaker 2.0, Kafka Streams, and Kafka command-line tools should not set the system property (OSS Security).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

“Best User Experience I have ever seen, provides full visibility to cloud workloads.”
David EstlickCISO
“Wiz provides a single pane of glass to see what is going on in our cloud environments.”
Adam FletcherChief Security Officer
“We know that if Wiz identifies something as critical, it actually is.”
Greg PoniatowskiHead of Threat and Vulnerability Management