CVE-2025-25018

8.7 HIGH

📋 TL;DR

This vulnerability in Kibana allows attackers to inject malicious scripts into web pages through improper input neutralization, leading to stored cross-site scripting (XSS). When exploited, it enables attackers to execute arbitrary JavaScript in victims' browsers, potentially stealing session cookies or performing actions on behalf of authenticated users. All Kibana instances within the affected version range are vulnerable.

💻 Affected Systems

Products:
  • Kibana
Versions: Versions before 8.18.8, 8.19.5, 9.0.8, and 9.1.5
Operating Systems: All operating systems running Kibana
Default Config Vulnerable: ⚠️ Yes
Notes: All Kibana deployments within the affected version range are vulnerable regardless of configuration. The vulnerability exists in web page generation components.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could steal administrator session cookies, gain full control of Kibana, access sensitive Elasticsearch data, pivot to internal systems, and maintain persistent access through backdoors.

🟠

Likely Case

Attackers inject malicious scripts to steal user session cookies, hijack authenticated sessions, and perform unauthorized actions within Kibana such as modifying dashboards or accessing restricted data.

🟢

If Mitigated

With proper input validation and output encoding controls, the attack surface is reduced, but the vulnerability still exists in the underlying code and could be exploited through other vectors.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires the attacker to have some level of access to inject malicious content, but the technical complexity of the XSS payload itself is relatively low.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 8.18.8, 8.19.5, 9.0.8, or 9.1.5

Vendor Advisory: https://discuss.elastic.co/t/kibana-8-18-8-8-19-5-9-0-8-9-1-5-security-update-esa-2025-17/382451

Restart Required: Yes

Instructions:

1. Backup your Kibana configuration and data. 2. Download the patched version from Elastic's official repository. 3. Stop the Kibana service. 4. Install the updated version. 5. Restart the Kibana service. 6. Verify the version is updated and functionality is working.

🔧 Temporary Workarounds

Content Security Policy (CSP)

all

Implement a strict Content Security Policy to restrict script execution from untrusted sources

Add 'Content-Security-Policy' header to Kibana configuration with appropriate directives

Input Validation Filter

all

Deploy a web application firewall or reverse proxy with XSS filtering rules

Configure WAF rules to filter suspicious script patterns in user input

🧯 If You Can't Patch

  • Isolate Kibana instances from internet access and restrict to trusted internal networks only
  • Implement strict access controls and monitor for suspicious user input patterns

🔍 How to Verify

Check if Vulnerable:

Check Kibana version via web interface or API endpoint. If version is below 8.18.8, 8.19.5, 9.0.8, or 9.1.5, the system is vulnerable.

Check Version:

curl -X GET 'http://localhost:5601/api/status' | grep version

Verify Fix Applied:

After patching, verify the version shows 8.18.8, 8.19.5, 9.0.8, or 9.1.5 or higher. Test functionality to ensure no regression.

📡 Detection & Monitoring

Log Indicators:

  • Unusual user input patterns containing script tags or JavaScript code
  • Multiple failed input validation attempts
  • Suspicious user agent strings

Network Indicators:

  • HTTP requests containing malicious script payloads
  • Unusual outbound connections from Kibana instances

SIEM Query:

source="kibana.log" AND ("<script>" OR "javascript:" OR "onerror=" OR "onload=")

🔗 References

📤 Share & Export