Skip to content

Elasticsearch allows insertion of sensitive information into log files when using deprecated URIs

Moderate severity GitHub Reviewed Published Oct 26, 2023 to the GitHub Advisory Database • Updated Dec 1, 2023

Package

maven org.elasticsearch:elasticsearch (Maven)

Affected versions

>= 7.0.0, < 7.17.13
>= 8.0.0, < 8.9.2

Patched versions

7.17.13
8.9.2

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}/_password
POST /_xpack/security/user/{username}/_password
PUT /_xpack/security/user/_password
POST /_xpack/security/user/_password
POST /_xpack/security/oauth2/token
DELETE /_xpack/security/oauth2/token
POST /_xpack/security/saml/authenticate

References

Published by the National Vulnerability Database Oct 26, 2023
Published to the GitHub Advisory Database Oct 26, 2023
Reviewed Oct 30, 2023
Last updated Dec 1, 2023

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
High
Privileges required
High
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:N/A:N

EPSS score

0.045%
(17th percentile)

Weaknesses

CVE ID

CVE-2023-31417

GHSA ID

GHSA-99pc-69q9-jxf2

Source code

No known source code
Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.