KafkaApplication · Apache

CVE-2024-31141

MEDIUM · 6.5 CVSS v3.1 Published 2024-11-19
Fix available
A fix is available. Upgrade to after 3.6.2 or later.
See remediation →
71/100
Remediation priority · Elevated
Remotely reachable Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

Apache Kafka Clients' ConfigProvider plugins (FileConfigProvider, DirectoryConfigProvider, EnvVarConfigProvider) can read arbitrary files and environment variables when configurations can be specified by untrusted parties. This allows privilege escalation in Kafka Connect from REST API access to filesystem/environment access, exposing sensitive data.

MitigationUpgrade kafka-clients to version >=3.8.0 and set JVM system property 'org.apache.kafka.automatic.config.providers=none'. For Kafka Connect, also configure 'allowlist.pattern' and 'allowed.paths' to restrict ConfigProvider operations.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
KafkaApplication
Affected:>= 2.3.0, <= 3.5.2>= 3.6.0, <= 3.6.2= 3.7.0

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Check your Kafka version
    Run 'kafka-topics.sh --version' or 'kafka_2.13-version.sh --version' to get the installed Kafka version. Alternatively, check the kafka-clients JAR file version in your classpath or build.gradle/maven dependency.
    Affected if The installed version is >= 2.3.0 and <= 3.5.2, OR >= 3.6.0 and <= 3.6.2, OR exactly 3.7.0
  2. Identify ConfigProvider usage in connector configurations
    Search all connector configuration files (typically in config/connect-*.properties or stored in the distributed worker config) for occurrences of 'config.provider' or 'config.providers' keywords.
    Affected if Any connector configuration references ConfigProvider classes, making the system potentially vulnerable if untrusted input can reach these configurations
  3. Check which ConfigProvider implementations are in use
    Look for the presence of 'FileConfigProvider', 'DirectoryConfigProvider', or 'EnvVarConfigProvider' class names in connector configs, worker properties, or deployed connector definitions.
    Affected if Any of these three ConfigProvider implementations (FileConfigProvider, DirectoryConfigProvider, EnvVarConfigProvider) are configured and the Kafka version is in the affected range
  4. Verify if untrusted parties can submit connector configurations
    Review Kafka Connect REST API access controls. Determine whether users other than administrators can create or modify connector configurations via the /connectors endpoint.
    Affected if Users with access to the Kafka Connect REST API (excluding adminstrators) can submit or modify connector configurations containing ConfigProvider references
  5. Check for allowlist restrictions
    Inspect worker configuration files for properties 'allowlist.pattern' or 'allowed.paths' within any ConfigProvider configuration blocks.
    Affected if No 'allowlist.pattern' or 'allowed.paths' restrictions are configured AND FileConfigProvider or DirectoryConfigProvider is in use, meaning arbitrary file access is possible
  6. Check for JVM mitigation property
    Examine JVM startup scripts or environment variables for the system property '-Dorg.apache.kafka.automatic.config.providers=none'.
    Affected if This JVM property is NOT set AND ConfigProvider plugins are in use with the affected Kafka version

You are affected if running a Kafka version in the affected range AND using FileConfigProvider, DirectoryConfigProvider, or EnvVarConfigProvider in connector configurations that can be modified by untrusted parties, without allowlist restrictions or the mitigation JVM property.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to a release after 3.6.2
Interim mitigation

Upgrade kafka-clients to version >=3.8.0 and set JVM system property 'org.apache.kafka.automatic.config.providers=none'. For Kafka Connect, also configure 'allowlist.pattern' and 'allowed.paths' to restrict ConfigProvider operations.

Recommended fix High confidence

kafka-clients >=3.8.0

  1. Upgrade kafka-clients library to version 3.8.0 or later
  2. For untrusted environments (e.g., Kafka Connect exposed to untrusted REST API users), set the JVM system property "org.apache.kafka.automatic.config.providers=none" to disable automatic ConfigProvider loading
  3. For Kafka Connect deployments using FileConfigProvider, DirectoryConfigProvider, or EnvVarConfigProvider, configure "allowlist.pattern" and "allowed.paths" properties to restrict filesystem and environment variable access to appropriate bounds
Caveat Setting "org.apache.kafka.automatic.config.providers=none" will break applications that rely on automatic ConfigProvider injection in untrusted environments; only set this property if your deployment model involves untrusted users specifying Kafka configuration

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Kafka Scoped from the published advisory
  • Consultation4.0 h
  • Implementation8.0 h
  • Testing6.0 h
  • Review / QA2.0 h
20.0 hours of engineering $3,500
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $5,600.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2024-31141 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2024-31141 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data