The vulnerability lies in the default behavior of several plugins within OpenSearch Data Prepper, which was to disable SSL/TLS certificate validation when no specific certificate was provided in the configuration. This created an insecure-by-default setup, making connections to OpenSearch clusters and other external services vulnerable to Man-in-the-Middle (MITM) attacks. An attacker could intercept and tamper with data in transit.
The analysis of the provided patches shows a consistent pattern of fixing this issue. The core of the vulnerability was in methods responsible for creating SSL contexts and trust managers, such as attachSSLContext and createTrustManagers in the OpenSearch sink and source plugins, and initiateSSL in the GeoIP plugin.
Previously, these methods would instantiate and configure a 'trust-all' manager if a certificate path was absent. The patches rectify this by introducing a mandatory insecure boolean flag. The insecure 'trust-all' behavior is now only activated if this flag is explicitly set to true in the configuration. If the flag is false or absent, the plugins now default to standard, secure TLS validation.
The identified vulnerable functions are the ones that previously implemented this insecure default. During exploitation, a profiler would show these functions being called as part of the connection setup process to OpenSearch or while the GeoIP plugin attempts to download its database.
org.opensearch.dataprepper.plugins.sink.opensearch.ConnectionConfiguration.attachSSLContextdata-prepper-plugins/opensearch/src/main/java/org/opensearch/dataprepper/plugins/sink/opensearch/ConnectionConfiguration.java
org.opensearch.dataprepper.plugins.sink.opensearch.ConnectionConfiguration.createTrustManagersdata-prepper-plugins/opensearch/src/main/java/org/opensearch/dataprepper/plugins/sink/opensearch/ConnectionConfiguration.java
org.opensearch.dataprepper.plugins.source.opensearch.worker.client.OpenSearchClientFactory.createTrustManagersdata-prepper-plugins/opensearch/src/main/java/org/opensearch/dataprepper/plugins/source/opensearch/worker/client/OpenSearchClientFactory.java
org.opensearch.dataprepper.plugins.geoip.extension.databasedownload.DBSource.initiateSSLdata-prepper-plugins/geoip-processor/src/main/java/org/opensearch/dataprepper/plugins/geoip/extension/databasedownload/DBSource.java
org.opensearch.dataprepper.plugins.geoip.extension.databasedownload.HttpDBDownloadService.initiateDownloaddata-prepper-plugins/geoip-processor/src/main/java/org/opensearch/dataprepper/plugins/geoip/extension/databasedownload/HttpDBDownloadService.java
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| org.opensearch.dataprepper.plugins:opensearch | maven | < 2.12.2 | 2.12.2 |
Ongoing coverage of React2Shell