CVE-2025-27817 Apache Kafka Client: Arbitrary file read and SSRF vulnerability
Attackers with control over Kafka client configurations can read arbitrary files or trigger SSRF via SASL OAuthBearer endpoints, impacting applications allowing untrusted config input.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-27817?
CVE-2025-27817 is a high-severity server-side request forgery vulnerability in Apache Kafka Client, published on 10 Jun 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Weakness: CWE-918
Which versions are affected by CVE-2025-27817?
3 open source packages ship an affected version, including org.apache.kafka:kafka-clients and kafka. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
org.apache.kafka:kafka-clients Maven | From 3.1.0 | 3.9.1 |
org.apache.kafka:kafka-clients Maven | From 3.1.0 | 3.9.1 |
kafka Bitnami | From 3.1.0 | 3.9.1 |
Products include Apache Kafka.
How do I fix CVE-2025-27817?
Upgrade org.apache.kafka:kafka-clients to 3.9.1 or later.
Upgrade, and send outbound requests through an allow-list that blocks internal addresses. More about Server-side request forgery.
Is CVE-2025-27817 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-27817 exists.
Public exploit code: 1 Nuclei template and 2 proofs of concept on GitHub.
Other vulnerabilities in Apache Kafka Client
- CVE-2026-33557 Apache Kafka: Missing JWT token validation in OAUTHBEARER authentication
- CVE-2025-27818 Apache Kafka: Possible RCE attack via SASL JAAS LdapLoginModule configuration
- CVE-2018-17196 Improper Input Validation in Apache Kafka
- CVE-2026-35554 Apache Kafka Clients: Kafka Producer Message Corruption and Misrouting via Buffer Pool Race Condition
- CVE-2025-27819 Apache Kafka: Possible RCE/Denial of service attack via SASL JAAS JndiLoginModule configuration
Sources
Also known as BIT-kafka-2025-27817, CLEANSTART-2026-BG00340, CLEANSTART-2026-DH52252, CLSA-2026-1789425652, ECHO-dd90-8305-7f06, GHSA-vgq5-3255-v292 and 10 more.