Vulnerability record · CVE-2025-27817 · published 10 June 2025
CVE-2025-27817: Apache Kafka Client arbitrary file read and SSRF via SASL/OAUTHBEARER URLs
Apache · Kafka
Apache Kafka Clients accept SASL/OAUTHBEARER configuration values such as sasl.oauthbearer.token.endpoint.url and sasl.oauthbearer.jwks.endpoint.url, and use them without restricting the target. When an untrusted party can set client configuration, these values can point at local files or arbitrary URLs, causing file contents or environment variables to be returned in error logs or requests to be sent to unintended locations. This matters because Kafka Connect can turn REST API access into filesystem, environment and URL access, which is risky in shared and SaaS environments.
Description
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.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Automated analysis
high priorityCVSS 7.5 with network reachability, no privileges or interaction, high confidentiality impact, and very high EPSS despite no KEV listing.
What it is
Apache Kafka Clients accept SASL/OAUTHBEARER configuration values such as sasl.oauthbearer.token.endpoint.url and sasl.oauthbearer.jwks.endpoint.url, and use them without restricting the target. When an untrusted party can set client configuration, these values can point at local files or arbitrary URLs, causing file contents or environment variables to be returned in error logs or requests to be sent to unintended locations. This matters because Kafka Connect can turn REST API access into filesystem, environment and URL access, which is risky in shared and SaaS environments.
Impact
An attacker gains read access to arbitrary files and environment variables on the host, and can make the Kafka client issue requests to attacker-chosen or internal locations. In Kafka Connect this can escalate from REST API access to filesystem and environment disclosure.
Attack surface
Reached over the network through Kafka client configuration, including Kafka Connect's REST API, with no authentication or user interaction required per the CVSS vector (AV:N/AC:L/PR:N/UI:N). Exploitation requires that an untrusted party can influence the SASL/OAUTHBEARER endpoint URL settings.
Exploitation
Not listed in CISA KEV, but EPSS is high at 0.688 (99.3rd percentile), indicating elevated likelihood of attempted exploitation. References are vendor advisory and mailing list only, with no public exploit or in-the-wild tag.
What to do
- Upgrade to Apache Kafka 3.9.1 or 4.0.0 and newer; on 4.0.0+ the allowed URL list defaults to empty and must be set explicitly.
- Set the system property -Dorg.apache.kafka.sasl.oauthbearer.allowed.urls to the exact trusted OAuth/JWKS endpoints in use.
- Do not allow untrusted parties to supply Kafka client SASL/OAUTHBEARER configuration, especially via Kafka Connect REST API.
- Restrict Kafka Connect REST API access to trusted networks and authenticated administrators.
- Review existing client and connector configurations for unexpected sasl.oauthbearer.token.endpoint.url or sasl.oauthbearer.jwks.endpoint.url values.
Detection
- Search Kafka client and Connect logs for error entries containing file contents or environment variable values returned from OAuth/JWKS endpoint resolution.
- Monitor outbound network connections from Kafka clients and Connect workers to unexpected hosts, including internal metadata or loopback addresses.
- Audit Kafka Connect REST API calls that create or modify connector configurations containing sasl.oauthbearer.* URL settings.
- Alert on configuration changes that set sasl.oauthbearer.token.endpoint.url or sasl.oauthbearer.jwks.endpoint.url to file:// or non-approved hosts.
This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.
Affected products
1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.
References
| Link | Tags |
|---|---|
| https://kafka.apache.org/cve-list | Vendor Advisory |
| http://www.openwall.com/lists/oss-security/2025/06/09/1 | Mailing ListThird Party Advisory |
Track CVE-2025-27817 inside VULONE
Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.
Related vulnerabilities
Same products first, then exploited flaws of the same weakness class.
Source: NIST National Vulnerability Database (record CVE-2025-27817), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.