CVE-2023-50298 Overview
CVE-2023-50298 is a sensitive information exposure vulnerability in Apache Solr that allows attackers to extract ZooKeeper credentials and ACLs through the Streaming Expressions feature. The vulnerability exists in the /streaming handler, which permits users to specify arbitrary zkHost parameters when extracting data from Solr Clouds.
When a SolrCloud instance is configured to use ZooKeeper credentials and ACLs for security, these authentication materials are automatically transmitted to whatever ZooKeeper host address is specified in streaming expression requests. An attacker can exploit this behavior by setting up a malicious server that mimics ZooKeeper, capturing the credentials when Solr attempts to connect.
Critical Impact
Attackers can steal ZooKeeper credentials and ACLs by tricking Apache Solr into connecting to a malicious mock ZooKeeper server, potentially compromising the entire SolrCloud infrastructure.
Affected Products
- Apache Solr versions 6.0.0 through 8.11.2
- Apache Solr versions 9.0.0 through 9.4.0
- SolrCloud deployments using ZooKeeper authentication
Discovery Timeline
- 2024-02-09 - CVE-2023-50298 published to NVD
- 2025-02-13 - Last updated in NVD database
Technical Details for CVE-2023-50298
Vulnerability Analysis
This vulnerability stems from improper handling of ZooKeeper credentials within Apache Solr's Streaming Expressions feature. Streaming Expressions provide a powerful way to query and transform data across Solr instances, including the ability to connect to external SolrCloud deployments via the zkHost parameter.
The security flaw occurs because Solr does not validate whether the specified zkHost address belongs to the same trusted cluster before forwarding authentication credentials. When a SolrCloud deployment is secured with ZooKeeper credentials and ACLs, these sensitive authentication materials are transmitted to any ZooKeeper endpoint specified in the streaming expression—including attacker-controlled servers.
The vulnerability is particularly dangerous because the /streaming handler only requires read permissions to access, making it available to a broader range of authenticated users than expected for an operation that can leak infrastructure credentials.
Root Cause
The root cause is the lack of origin validation for ZooKeeper connections initiated through Streaming Expressions. Apache Solr versions prior to 8.11.3 and 9.4.1 transmit ZooKeeper credentials to any zkHost specified in streaming expression requests without verifying that the target server matches the original SolrCloud's ZooKeeper ensemble address.
This represents a violation of the principle of least privilege, where credentials scoped to the legitimate ZooKeeper cluster are inadvertently shared with arbitrary external servers. The CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor) and CWE-922 (Insecure Storage of Sensitive Information) classifications accurately describe this credential leakage pattern.
Attack Vector
An attacker exploiting this vulnerability would follow this attack pattern:
- Set up a malicious server that implements the ZooKeeper protocol handshake and accepts incoming connections
- Craft a streaming expression request targeting the vulnerable Solr instance's /streaming endpoint
- Include the malicious server's address in the zkHost parameter of the request
- When Solr processes the request, it attempts to connect to the specified ZooKeeper host using its configured credentials
- The attacker's mock server captures the ZooKeeper credentials and ACLs transmitted during the connection attempt
- The attacker can then use these stolen credentials to access the legitimate ZooKeeper cluster, potentially gaining control over SolrCloud configuration and data
The attack requires only read permissions on the Streaming Expressions handler, making it accessible to lower-privileged users who should not have access to infrastructure credentials.
Detection Methods for CVE-2023-50298
Indicators of Compromise
- Unusual streaming expression requests containing external or unknown zkHost parameter values
- Network connections from Solr servers to unexpected ZooKeeper endpoints or non-standard ports
- Access logs showing /streaming handler requests with zkHost parameters pointing to external IP addresses
- Failed ZooKeeper authentication attempts following credential theft and misuse
Detection Strategies
- Monitor and alert on streaming expression requests containing zkHost parameters that don't match your authorized ZooKeeper ensemble addresses
- Implement network segmentation monitoring to detect Solr nodes attempting outbound connections to unauthorized ZooKeeper hosts
- Review web server access logs for /streaming endpoint requests with suspicious query parameters
- Deploy application-layer firewalls to inspect and block streaming expressions with untrusted zkHost values
Monitoring Recommendations
- Enable detailed access logging on Solr's /streaming handler to capture all request parameters
- Configure network monitoring to track ZooKeeper protocol traffic (default port 2181) from Solr instances
- Set up alerts for any ZooKeeper connection attempts to IP addresses outside your trusted infrastructure
- Regularly audit user permissions to ensure only necessary accounts have access to streaming expressions
How to Mitigate CVE-2023-50298
Immediate Actions Required
- Upgrade Apache Solr to version 8.11.3 or 9.4.1 immediately to patch this vulnerability
- Review all accounts with read permissions on the /streaming handler and remove unnecessary access
- Implement network-level restrictions to prevent Solr from connecting to arbitrary ZooKeeper hosts
- Rotate ZooKeeper credentials if there is any suspicion of prior exploitation
Patch Information
Apache has released fixed versions that address this vulnerability by implementing server address validation. Starting with versions 8.11.3 and 9.4.1, Solr only transmits ZooKeeper credentials to zkHost values that share the same server address as the original SolrCloud's ZooKeeper ensemble (regardless of the chroot path).
Users running Apache Solr versions 6.0.0 through 8.11.2 should upgrade to 8.11.3, while users on the 9.x branch (versions 9.0.0 through 9.4.0) should upgrade to 9.4.1. For detailed information, see the Apache Solr Security Advisory.
Workarounds
- Implement firewall rules to block outbound ZooKeeper connections from Solr nodes to any hosts other than the legitimate ZooKeeper ensemble
- Disable or restrict access to the /streaming handler if streaming expressions are not required in your deployment
- Use a reverse proxy or web application firewall to filter streaming expression requests containing zkHost parameters
- Consider implementing network segmentation to isolate SolrCloud infrastructure from potential attacker-controlled endpoints
# Example: Restrict outbound connections from Solr to only authorized ZooKeeper hosts
# Add iptables rules to allow only legitimate ZooKeeper ensemble connections
iptables -A OUTPUT -p tcp -d <authorized_zk_host_1> --dport 2181 -j ACCEPT
iptables -A OUTPUT -p tcp -d <authorized_zk_host_2> --dport 2181 -j ACCEPT
iptables -A OUTPUT -p tcp -d <authorized_zk_host_3> --dport 2181 -j ACCEPT
iptables -A OUTPUT -p tcp --dport 2181 -j DROP
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


