Apache Software Foundation Apache Kafka Client
Apache Kafka Client: Arbitrary file read and SSRF vulnerability
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.
Affected versions and mitigation
From the CVE record, GitHub Security Advisories and the vendor's references.Affected
- >= 3.1.0, <= 3.9.0
- >= 3.1.0, < 3.9.1
Fixed in 3.9.1
from GitHub Security Advisory GHSA-vgq5-3255-v292
Mitigation
Upgrade org.apache.kafka:kafka-clients to 3.9.1 or later.
References
- Vendor advisory kafka.apache.org/cve-list
Timeline
Days relative to CVE publicationFirst public PoC 24 days after publication; not in CISA KEV. First PoC: iSee857/CVE-2025-27817 (created 4 Jul 2025, found by us: backfilled).
PoC repositories
Found on GitHub.2 PoCs · 1 pending
PoCs 2
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| iSee857/CVE-2025-27817 | 4 Jul 2025 +24 d | 5 | PoC |
| oriolrius/kafka-keycloak-oauth | 13 Oct 2025 +125 d | 5 | PoC |
Pending 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| kk12-30/CVE-2025-27817 | unknown | 0 | Pending · repository unavailable (HTTP 404) |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.
Other public exploits
Exploit-DB, Metasploit and nuclei count as public PoCs. Exploit-tagged references from the CVE record and NVD are links only. None of these are analysed by us.| Source | Title | Published | Found by us |
|---|---|---|---|
| nuclei template | nuclei template: Apache Kafka Client - Arbitrary File Read | 23 Jan 2026 | 14 Nov 2026 |
PoC characteristics
What to hunt for in your logs · from 2 PoC reposDELETE /connectors/{var}
- Content-Type
application/json- Ports
- 8080, 8083
- Seen in
- 1 repo: iSee857/CVE-2025-27817
- Evidence
- iSee857/CVE-2025-27817/kafka-CVE-2025-27817-ReadAnyFile(SSRF).py:129
GET /admin/realms/{var}/clients
- Key headers
Authorization: Bearer {var}- Ports
- 8080
- Seen in
- 1 repo: oriolrius/kafka-keycloak-oauth
- Evidence
- oriolrius/kafka-keycloak-oauth/scripts/fix-audience.sh:24
GET /connectors/{var}/status
- Content-Type
application/json- Ports
- 8080, 8083
- Seen in
- 1 repo: iSee857/CVE-2025-27817
- Evidence
- iSee857/CVE-2025-27817/kafka-CVE-2025-27817-ReadAnyFile(SSRF).py:103
GET /health/ready
- Ports
- 8080
- Seen in
- 1 repo: oriolrius/kafka-keycloak-oauth
- Evidence
- oriolrius/kafka-keycloak-oauth/README.md:52
GET /realms/kafka-realm/protocol/openid-connect/certs
- Ports
- 8080
- Seen in
- 1 repo: oriolrius/kafka-keycloak-oauth
- Evidence
- oriolrius/kafka-keycloak-oauth/README.md:312
POST /admin/realms/{var}/clients/{var}/protocol-mappers/models
- Key headers
Authorization: Bearer {var}- Content-Type
application/json- Ports
- 8080
- Seen in
- 1 repo: oriolrius/kafka-keycloak-oauth
- Evidence
- oriolrius/kafka-keycloak-oauth/scripts/fix-audience.sh:32
POST /connectors
- Body markers
"name":"malicious-connector""config"inapplication/json- Ports
- 8080, 8083
- Seen in
- 1 repo: iSee857/CVE-2025-27817
- Evidence
- iSee857/CVE-2025-27817/kafka-CVE-2025-27817-ReadAnyFile(SSRF).py:58
POST /connectors/{var}/restart
- Content-Type
application/json- Ports
- 8080, 8083
- Seen in
- 1 repo: iSee857/CVE-2025-27817
- Evidence
- iSee857/CVE-2025-27817/kafka-CVE-2025-27817-ReadAnyFile(SSRF).py:83
POST /realms/kafka-realm/protocol/openid-connect/token
- Body markers
grant_type=client_credentialsclient_id=kafka-producerclient_secret=client_id=kafka-consumerclient_secret=sLB9s2LSp56hqtXqz73Jpw6TYa3xjoecscope=profile emailclient_secret=JcR4yefw4xJ8es02jIWtdzTHVb98PFU0inapplication/x-www-form-urlencoded- Ports
- 8080
- Seen in
- 1 repo: oriolrius/kafka-keycloak-oauth
- Evidence
- oriolrius/kafka-keycloak-oauth/README.md:252 oriolrius/kafka-keycloak-oauth/tests/test_consumer.py:29 oriolrius/kafka-keycloak-oauth/tests/test_producer.py:33 oriolrius/kafka-keycloak-oauth/tests/test_producer.py:192
POST /realms/master/protocol/openid-connect/token
- Body markers
client_id=admin-cliusername=adminpassword=admin123grant_type=passwordinapplication/x-www-form-urlencoded- Ports
- 8080
- Seen in
- 1 repo: oriolrius/kafka-keycloak-oauth
- Evidence
- oriolrius/kafka-keycloak-oauth/scripts/fix-audience.sh:10
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/connectors/[^/?#]*(?:[?#].*)?$
(?i)^/admin/realms/[^/?#]*/clients(?:[?#].*)?$
(?i)^/connectors/[^/?#]*/status(?:[?#].*)?$
(?i)^/health/ready(?:[?#].*)?$
(?i)^/realms/kafka-realm/protocol/openid-connect/certs(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET [8080,8083] (msg:"GG PoC-Monitor CVE-2025-27817 Apache Software Foundation Apache Kafka Client exploit attempt"; flow:established,to_server; http.method; content:"DELETE"; http.uri; content:"/connectors/"; reference:url,poc.griffinguard.io/cve/CVE-2025-27817; classtype:web-application-attack; sid:9533751; rev:1;)
alert http any any -> $HOME_NET [8080] (msg:"GG PoC-Monitor CVE-2025-27817 Apache Software Foundation Apache Kafka Client exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/admin/realms/"; http.uri; content:"/clients"; http.header; content:"Authorization: Bearer "; nocase; reference:url,poc.griffinguard.io/cve/CVE-2025-27817; classtype:web-application-attack; sid:9567477; rev:1;)
alert http any any -> $HOME_NET [8080,8083] (msg:"GG PoC-Monitor CVE-2025-27817 Apache Software Foundation Apache Kafka Client exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/connectors/"; http.uri; content:"/status"; reference:url,poc.griffinguard.io/cve/CVE-2025-27817; classtype:web-application-attack; sid:9728549; rev:1;)
alert http any any -> $HOME_NET [8080] (msg:"GG PoC-Monitor CVE-2025-27817 Apache Software Foundation Apache Kafka Client exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/health/ready"; reference:url,poc.griffinguard.io/cve/CVE-2025-27817; classtype:web-application-attack; sid:9819362; rev:1;)
alert http any any -> $HOME_NET [8080] (msg:"GG PoC-Monitor CVE-2025-27817 Apache Software Foundation Apache Kafka Client exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/realms/kafka-realm/protocol/openid-connect/certs"; reference:url,poc.griffinguard.io/cve/CVE-2025-27817; classtype:web-application-attack; sid:9009535; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: Apache Software Foundation Apache Kafka Client exploit attempt (CVE-2025-27817)
id: gg-pocmon-cve-2025-27817-9533751
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-27817. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-27817
logsource:
category: webserver
detection:
selection:
cs-method: DELETE
cs-uri-stem|contains|all:
- '/connectors/'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2025.27817
title: Apache Software Foundation Apache Kafka Client exploit attempt (CVE-2025-27817)
id: gg-pocmon-cve-2025-27817-9567477
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-27817. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-27817
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/admin/realms/'
- '/clients'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2025.27817
title: Apache Software Foundation Apache Kafka Client exploit attempt (CVE-2025-27817)
id: gg-pocmon-cve-2025-27817-9728549
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-27817. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-27817
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/connectors/'
- '/status'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2025.27817
title: Apache Software Foundation Apache Kafka Client exploit attempt (CVE-2025-27817)
id: gg-pocmon-cve-2025-27817-9819362
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-27817. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-27817
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/health/ready'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2025.27817
title: Apache Software Foundation Apache Kafka Client exploit attempt (CVE-2025-27817)
id: gg-pocmon-cve-2025-27817-9009535
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-27817. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-27817
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/realms/kafka-realm/protocol/openid-connect/certs'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2025.27817