# CVE-2024-31141: Apache Kafka Clients: Privilege escalation to filesystem read-access via automatic ConfigProvider

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 6.5
- **CVSS:** 6.5 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: None; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 1.75% (percentile 78, 2026-11-26)
- **CWE:** CWE-552, CWE-269
- **Aliases:** GHSA-2x2g-32r7-p4x8
- **Published:** 2024-11-19T08:40:50.695Z
- **Modified:** 2026-09-10T03:50:20.287Z

## Who should check

- Projects that depend on Maven package org.apache.kafka:kafka-clients (\>= 2.3.0, \< 3.7.1)
- Anyone running Apache Software Foundation Apache Kafka Clients \>= 2.3.0, \<= 3.5.2; \>= 3.6.0, \<= 3.6.2; 3.7.0

## Description

Files or Directories Accessible to External Parties, Improper Privilege Management vulnerability in Apache Kafka Clients.

Apache Kafka Clients accept configuration data for customizing behavior, and includes ConfigProvider plugins in order to manipulate these configurations. Apache Kafka also provides FileConfigProvider, DirectoryConfigProvider, and EnvVarConfigProvider implementations which include the ability to read from disk or environment variables.
In applications where Apache Kafka Clients configurations can be specified by an untrusted party, attackers may use these ConfigProviders to read arbitrary contents of the disk and environment variables.

In particular, this flaw may be used in Apache Kafka Connect to escalate from REST API access to filesystem/environment access, which may be undesirable in certain environments, including SaaS products.
This issue affects Apache Kafka Clients: from 2.3.0 through 3.5.2, 3.6.2, 3.7.0.


Users with affected applications are recommended to upgrade kafka-clients to version \>=3.8.0, and set the JVM system property "org.apache.kafka.automatic.config.providers=none".
Users of Kafka Connect with one of the listed ConfigProvider implementations specified in their worker config are also recommended to add appropriate "allowlist.pattern" and "allowed.paths" to restrict their operation to appropriate bounds.


For users of Kafka Clients or Kafka Connect in environments that trust users with disk and environment variable access, it is not recommended to set the system property.
For users of the Kafka Broker, Kafka MirrorMaker 2.0, Kafka Streams, and Kafka command-line tools, it is not recommended to set the system property.

## Affected and fixed versions

- Maven `org.apache.kafka:kafka-clients`: affected \>= 2.3.0, \< 3.7.1; fixed 3.7.1 (osv)
- Apache Software Foundation Apache Kafka Clients: \>= 2.3.0, \<= 3.5.2; \>= 3.6.0, \<= 3.6.2; 3.7.0 (cvelist)

## Mitigation

- Upgrade org.apache.kafka:kafka-clients to 3.7.1 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-31141. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-31141.md
Affected: org.apache.kafka:kafka-clients >= 2.3.0, < 3.7.1
Fixed in: 3.7.1

Steps:
1. Search this machine and project for org.apache.kafka:kafka-clients (Maven), Apache Software Foundation Apache Kafka Clients: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-31141 being exploited?

There is no confirmed exploitation: CVE-2024-31141 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.75% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-31141?

Medium: CVSS 6.5 (v3.1, scored by CNA). Remote, login needed.

### Which versions are affected by CVE-2024-31141?

org.apache.kafka:kafka-clients \>= 2.3.0, \< 3.7.1.

### Is there a fix for CVE-2024-31141?

Yes. Fixed in 3.7.1. Upgrade org.apache.kafka:kafka-clients to 3.7.1 or later.

### How do I check if I'm affected by CVE-2024-31141?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://lists.apache.org/thread/9whdzfr0zwdhr364604w5ssnzmg4v2lv>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2024-31141>
- other: <http://www.openwall.com/lists/oss-security/2024/11/18/5>
- other: <https://security.netapp.com/advisory/ntap-20250131-0001/>
- other: <https://github.com/apache/kafka>
- other: <https://security.netapp.com/advisory/ntap-20250131-0001>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-31141>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-2x2g-32r7-p4x8> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2024-31141> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-31141>
