CVE-2024-31141
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 · uneditedFiles 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 confidenceApache 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.
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>= 2.3.0, <= 3.5.2>= 3.6.0, <= 3.6.2= 3.7.0CVSS 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 checksWork through these to decide whether this CVE applies to you.
-
Check your Kafka versionRun '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
-
Identify ConfigProvider usage in connector configurationsSearch 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
-
Check which ConfigProvider implementations are in useLook 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
-
Verify if untrusted parties can submit connector configurationsReview 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
-
Check for allowlist restrictionsInspect 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
-
Check for JVM mitigation propertyExamine 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.
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 · scopedUpgrade 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.
kafka-clients >=3.8.0
- Upgrade kafka-clients library to version 3.8.0 or later
- 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
- 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
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation4.0 h
- Implementation8.0 h
- Testing6.0 h
- Review / QA2.0 h
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 locallyCheck 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 sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2024-31141 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
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.
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.
- 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