CVE-2025-27817
massArbitrary File Read and SSRF in Apache Kafka Client SASL/OAUTHBEARER Config
Apache Kafka Clients contain an unrestricted URL handling flaw (SSRF, CWE-918) in the SASL/OAUTHBEARER settings 'sasl.oauthbearer.token.endpoint.url' and 'sasl.oauthbearer.jwks.endpoint.url', which also permits arbitrary file reads whose contents can surface in error logs. It is triggered when an application allows an untrusted party to supply Kafka client configuration: the attacker points these URL settings at local files or internal endpoints to read disk contents and environment variables, or makes requests to unintended internal locations. The attacker gains unauthorized disclosure of sensitive files, credentials, and access to internal network endpoints; in Kafka Connect this enables escalation from REST API access to filesystem, environment, and URL access, a notable risk for multi-tenant SaaS environments. Any deployment running affected Kafka client versions where configuration can be attacker-influenced is exposed, with Kafka Connect users a priority audience; fixes introduce the '-Dorg.apache.kafka.sasl.oauthbearer.allowed.urls' system property in 3.9.1 (still allows all URLs by default for backward compatibility) and in 4.0.0 (empty allowlist by default). No public PoC, CISA KEV listing, or confirmed in-the-wild exploitation is known, but the 65.9% EPSS score (99th percentile) indicates an elevated probability of near-term exploitation.
What to do: Upgrade Kafka clients to 4.0.0 or later and explicitly set -Dorg.apache.kafka.sasl.oauthbearer.allowed.urls to the broker/identity-provider endpoints you use; if upgrading to 3.9.1 instead, set the same property, since it still allows all URLs by default. Audit whether any untrusted party (tenants, connector submitters, REST API users) can supply Kafka client configuration, and restrict access to the Kafka Connect REST API (default port 8083).
| Apache Kafka Clients (SASL/OAUTHBEARER) | All versions prior to 3.9.1 (3.x line) and prior to 4.0.0 (4.x line) |
| Apache Kafka Connect | Uses bundled affected Kafka client versions (prior to 3.9.1/4.0.0); exploitable when untrusted users can set connector/client configs via the REST API |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
A possible arbitrary file read and SSRF vulnerability has been identified in Apache Kafka Client. Apache Kafka Clients accept configuration data for setting the SASL/OAUTHBEARER connection with the brokers, including "sasl.oauthbearer.token.endpoint.url" and "sasl.oauthbearer.jwks.endpoint.url". Apache Kafka allows clients to read an arbitrary file and return the content in the error log, or sending requests to an unintended location. In applications where Apache Kafka Clients configurations can be specified by an untrusted party, attackers may use the "sasl.oauthbearer.token.endpoint.url" and "sasl.oauthbearer.jwks.endpoint.url" configuratin to read arbitrary contents of the disk and environment variables or make requests to an unintended location. In particular, this flaw may be used in Apache Kafka Connect to escalate from REST API access to filesystem/environment/URL access, which may be undesirable in certain environments, including SaaS products. Since Apache Kafka 3.9.1/4.0.0, we have added a system property ("-Dorg.apache.kafka.sasl.oauthbearer.allowed.urls") to set the allowed urls in SASL JAAS configuration. In 3.9.1, it accepts all urls by default for backward compatibility. However in 4.0.0 and newer, the default value is empty list and users have to set the allowed urls explicitly.
- Vendors
- apache
- Products
- kafka
- Weakness
- CWE-918
- Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
In the news0 stories
No ingested article mentions this CVE yet.