CVE-2023-31417
Elasticsearch allows insertion of sensitive information into log files when using deprecated URIs
Description
Elasticsearch generally filters out sensitive information and credentials before logging to the audit log. It was found that this filtering was not applied when requests to Elasticsearch use certain deprecated URIs for APIs. The impact of this flaw is that sensitive information such as passwords and tokens might be printed in cleartext in Elasticsearch audit logs. Note that audit logging is disabled by default and needs to be explicitly enabled and even when audit logging is enabled, request bodies that could contain sensitive information are not printed to the audit log unless explicitly configured.
The _xpack/security APIs have been deprecated in Elasticsearch 7.x and were entirely removed in 8.0.0 and later. The only way for a client to use them in Elasticsearch 8.0.0 and later is to provide the Accept: application/json; compatible-with=7 header. Elasticsearch official clients do not use these deprecated APIs.
The list of affected, deprecated APIs, is the following:
POST /_xpack/security/user/{username}PUT /_xpack/security/user/{username}PUT /_xpack/security/user/{username}/_passwordPOST /_xpack/security/user/{username}/_passwordPUT /_xpack/security/user/_passwordPOST /_xpack/security/user/_passwordPOST /_xpack/security/oauth2/tokenDELETE /_xpack/security/oauth2/tokenPOST /_xpack/security/saml/authenticate
Affected Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.elasticsearch » elasticsearch | >= 7.0.0, < 7.17.13>= 8.0.0, < 8.9.2 | 7.17.13, 8.9.2 |
Blast radius
50% of the dependent artifacts (846) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 5,196 |
| 2 hops | 11,070 |
| 3 hops | 7,802 |
| 4 hops | 15,254 |
| 5 hops | 1,660 |
| 6 hops | 517 |
Most used dependents
- org.elasticsearch.client » elasticsearch-rest-high-level-client684 usages
- org.apache.camel.kafkaconnector » camel-kafka-connector616 usages
- org.apache.camel.springboot » camel-core-starter558 usages
- org.apache.camel.springboot » camel-spring-boot-starter478 usages
- org.elasticsearch.client » transport312 usages
- org.apache.camel.quarkus » camel-quarkus-maven-plugin302 usages
- org.springframework.boot » spring-boot-starter-data-elasticsearch193 usages
- org.apache.camel.quarkus » camel-quarkus-package-maven-plugin152 usages
- org.springframework.data » spring-data-elasticsearch126 usages
- org.apache.ranger » ranger-plugins-common98 usages
- org.elasticsearch.test » framework92 usages
- org.apache.camel » camel-catalog87 usages
- org.codelibs » elasticsearch-cluster-runner66 usages
- org.apache.ranger » ranger-plugins-audit66 usages
- org.eclipse.dirigible » dirigible-api49 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
References
| Advisory | NVD CVE-2023-31417 | nvd.nist.gov |
| Web | t/elasticsearch-8-9-2-and-7-17-13-security-update/342479 | discuss.elastic.co |
| Web | advisory/ntap-20231130-0006 | security.netapp.com |
| Web | community/security | elastic.co |
