PoC Monitor
← All CVEs
CVE-2025-27817published 10 Jun 2025 07:55 UTCData: JSON · API

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.

First public PoC 24 daysafter publication · 4 Jul 2025
Public PoCs32 on GitHub · 1 Exploit-DB, Metasploit or nuclei
CVSS7.5high · scored by CISA ADP · CWE-918
CISA KEV Not listednot known exploited

Affected versions and mitigation

From the CVE record, GitHub Security Advisories and the vendor's references.

Affected

Apache Software Foundation Apache Kafka Client
  • >= 3.1.0, <= 3.9.0
org.apache.kafka:kafka-clients (Maven)
  • >= 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

Timeline

Days relative to CVE publication
t=0+7+14+21CVE published10 Jun 2025 · t = 0First public PoC4 Jul 2025 · t+24d

First 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
RepositoryCreatedStarsAssessment
iSee857/CVE-2025-27817 4 Jul 2025 +24 d 5 PoC
oriolrius/kafka-keycloak-oauth 13 Oct 2025 +125 d 5 PoC
Pending 1
RepositoryCreatedStarsAssessment
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.
SourceTitlePublishedFound by us
nuclei templatenuclei template: Apache Kafka Client - Arbitrary File Read23 Jan 202614 Nov 2026

PoC characteristics

What to hunt for in your logs · from 2 PoC repos

DELETE /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" in 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: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_credentials client_id=kafka-producer client_secret= client_id=kafka-consumer client_secret=sLB9s2LSp56hqtXqz73Jpw6TYa3xjoec scope=profile email client_secret=JcR4yefw4xJ8es02jIWtdzTHVb98PFU0 in application/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-cli username=admin password=admin123 grant_type=password in application/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.

DELETE /connectors/{var}
(?i)^/connectors/[^/?#]*(?:[?#].*)?$
GET /admin/realms/{var}/clients
(?i)^/admin/realms/[^/?#]*/clients(?:[?#].*)?$
GET /connectors/{var}/status
(?i)^/connectors/[^/?#]*/status(?:[?#].*)?$
GET /health/ready
(?i)^/health/ready(?:[?#].*)?$
GET /realms/kafka-realm/protocol/openid-connect/certs
(?i)^/realms/kafka-realm/protocol/openid-connect/certs(?:[?#].*)?$

Suricata

Template generated from PoC characteristics. Review before deploying.

DELETE /connectors/{var}
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;)
GET /admin/realms/{var}/clients
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;)
GET /connectors/{var}/status
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;)
GET /health/ready
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;)
GET /realms/kafka-realm/protocol/openid-connect/certs
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.

DELETE /connectors/{var}
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
GET /admin/realms/{var}/clients
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
GET /connectors/{var}/status
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
GET /health/ready
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
GET /realms/kafka-realm/protocol/openid-connect/certs
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