CVE-2025-27817:
Apache Kafka Client SSRF and Arbitrary File Read Vulnerability
7.5
CVSS ScoreBasic Information
Technical Details
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
org.apache.kafka:kafka-clients | maven | >= 3.1.0, < 3.9.1 | 3.9.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability, CVE-2025-27817, allows for arbitrary file read and Server-Side Request Forgery (SSRF) in Apache Kafka Client versions 3.1.0 through 3.9.0. It stems from improper handling of the 'sasl.oauthbearer.token.endpoint.url' and 'sasl.oauthbearer.jwks.endpoint.url' configuration parameters. Attackers can provide malicious URLs (e.g., 'file:///etc/passwd' or internal service URLs) to these parameters. The Kafka client, when establishing a SASL/OAUTHBEARER connection, would then attempt to fetch content from these attacker-controlled URLs. This could lead to the contents of local files being read and potentially exposed (e.g., in error logs if the URL is malformed or the content is not as expected for a token/JWKS endpoint) or to requests being made to internal services, bypassing network controls. The functions responsible for parsing these configuration options and making the subsequent HTTP/HTTPS requests are the core of this vulnerability. The patch introduced in versions 3.9.1 and 4.0.0 mitigates this by adding a system property 'org.apache.kafka.sasl.oauthbearer.allowed.urls' to whitelist permissible URLs. Without the specific commit details, exact function names cannot be identified, but they would be located in the client-side SASL/OAUTHBEARER implementation, likely involving classes that handle URL connections for token and JWKS retrieval.