CVE-2025-37731: X pack security Authentication Bypass Vulnerability

MODERATE
Advisory Identifier: GHSA-m9gh-789g-q5pv
CVSS 6.8
CWE-287 CWE-295
Published
Advisory Summary

CVE-2025-37731 is a MODERATE (CVSS 6.8) authentication bypass vulnerability (CWE-287: Improper Authentication) affecting X pack security libraries in the Maven ecosystem. The issue involves elasticsearch pki realm authentication bypass vulnerability allows user impersonation through crafted client certificates. Remediation is available by upgrading affected packages to version 8.19.8, 9.1.8, 9.2.2.

CVE-2025-37731 at a Glance

CVE Identifier CVE-2025-37731
GHSA Identifier GHSA-m9gh-789g-q5pv
Severity MODERATE
CVSS v3.1 Base Score 6.8
CWE Classification CWE-287: Improper Authentication
Affected Product X pack security
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 6.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2025-37731

To remediate this vulnerability, upgrade all affected X pack security dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.elasticsearch.plugin:x-pack-security fixed: 8.19.8
<dependency>
    <groupId>org.elasticsearch.plugin</groupId>
    <artifactId>x-pack-security</artifactId>
    <version>8.19.8</version>
</dependency>
org.elasticsearch.plugin:x-pack-security fixed: 9.1.8
<dependency>
    <groupId>org.elasticsearch.plugin</groupId>
    <artifactId>x-pack-security</artifactId>
    <version>9.1.8</version>
</dependency>
org.elasticsearch.plugin:x-pack-security fixed: 9.2.2
<dependency>
    <groupId>org.elasticsearch.plugin</groupId>
    <artifactId>x-pack-security</artifactId>
    <version>9.2.2</version>
</dependency>
org.elasticsearch.plugin:x-pack-core fixed: 8.19.8
<dependency>
    <groupId>org.elasticsearch.plugin</groupId>
    <artifactId>x-pack-core</artifactId>
    <version>8.19.8</version>
</dependency>
org.elasticsearch.plugin:x-pack-core fixed: 9.1.8
<dependency>
    <groupId>org.elasticsearch.plugin</groupId>
    <artifactId>x-pack-core</artifactId>
    <version>9.1.8</version>
</dependency>
org.elasticsearch.plugin:x-pack-core fixed: 9.2.2
<dependency>
    <groupId>org.elasticsearch.plugin</groupId>
    <artifactId>x-pack-core</artifactId>
    <version>9.2.2</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.elasticsearch.plugin

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2025-37731, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.elasticsearch.plugin

Analyze the terminal output to locate any version of X pack security in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 8.19.8), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.elasticsearch.plugin command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In X pack security, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Improper Authentication in Elasticsearch PKI realm can lead to user impersonation via specially crafted client certificates. A malicious actor would need to have such a crafted client certificate signed by a legitimate, trusted Certificate Authority.

CVE-2025-37731 Affected X pack security Versions

6 component(s)
Fixed Versions:
8.19.89.1.89.2.2
Product / Package Ecosystem Affected Versions Fixed Version
org.elasticsearch.plugin:x-pack-security
Maven
≥ 7.0.0-alpha1
< 8.19.8
8.19.8
org.elasticsearch.plugin:x-pack-security
Maven
≥ 9.0.0-beta1
< 9.1.8
9.1.8
org.elasticsearch.plugin:x-pack-security
Maven
≥ 9.2.0
< 9.2.2
9.2.2
org.elasticsearch.plugin:x-pack-core
Maven
≥ 7.0.0-alpha1
< 8.19.8
8.19.8
org.elasticsearch.plugin:x-pack-core
Maven
≥ 9.0.0-beta1
< 9.1.8
9.1.8
org.elasticsearch.plugin:x-pack-core
Maven
≥ 9.2.0
< 9.2.2
9.2.2

References

Frequently Asked Questions

What is CVE-2025-37731?
CVE-2025-37731 is a security vulnerability in X pack security involving Elasticsearch PKI Realm Authentication Bypass Vulnerability Allows User Impersonation Through Crafted Client Certificates under CWE-287: Improper Authentication.
Which X pack security versions are affected?
Affected versions include releases prior to 8.19.8, 9.1.8, 9.2.2 across affected packages: org.elasticsearch.plugin:x-pack-security, org.elasticsearch.plugin:x-pack-core.
What version fixes CVE-2025-37731?
Upgrading to 8.19.8, 9.1.8, 9.2.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is x-pack-security affected?
Yes, org.elasticsearch.plugin:x-pack-security is affected in releases prior to 8.19.8, 9.1.8, 9.2.2. Upgrade your dependency to 8.19.8, 9.1.8, 9.2.2 or later.
Is x-pack-core affected?
Yes, org.elasticsearch.plugin:x-pack-core is affected in releases prior to 8.19.8, 9.1.8, 9.2.2. Upgrade your dependency to 8.19.8, 9.1.8, 9.2.2 or later.
What is the CVSS score of CVE-2025-37731?
CVE-2025-37731 has a CVSS v3.1 base score of 6.8 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2025-37731?
CVE-2025-37731 is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check Maven dependencies for CVE-2025-37731?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.elasticsearch.plugin'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-m9gh-789g-q5pv",
  "modified" : "2026-09-25T17:36:03Z",
  "published" : "2025-12-15T12:30:27Z",
  "aliases" : [ "CVE-2025-37731" ],
  "summary" : "Elasticsearch PKI Realm Authentication Bypass Vulnerability Allows User Impersonation Through Crafted Client Certificates",
  "details" : "Improper Authentication in Elasticsearch PKI realm can lead to user impersonation via specially crafted client certificates. A malicious actor would need to have such a crafted client certificate signed by a legitimate, trusted Certificate Authority.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.elasticsearch.plugin:x-pack-security"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "7.0.0-alpha1"
      }, {
        "fixed" : "8.19.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.elasticsearch.plugin:x-pack-security"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "9.0.0-beta1"
      }, {
        "fixed" : "9.1.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.elasticsearch.plugin:x-pack-security"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "9.2.0"
      }, {
        "fixed" : "9.2.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.elasticsearch.plugin:x-pack-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "7.0.0-alpha1"
      }, {
        "fixed" : "8.19.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.elasticsearch.plugin:x-pack-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "9.0.0-beta1"
      }, {
        "fixed" : "9.1.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.elasticsearch.plugin:x-pack-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "9.2.0"
      }, {
        "fixed" : "9.2.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-37731"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/elastic/elasticsearch/commit/cd97b8566bf56e628070021300784cb9cee0286f"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/elastic/elasticsearch/commit/d8a408da79f214395845d99d241e832077045983"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/elastic/elasticsearch/commit/e519fe4c51a3c887675eb7daea2f914738847f23"
  }, {
    "type" : "WEB",
    "url" : "https://discuss.elastic.co/t/elasticsearch-8-19-8-9-1-8-and-9-2-2-security-update-esa-2025-27/384063"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/elastic/elasticsearch"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287", "CWE-295" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-12-16T15:52:23Z",
    "nvd_published_at" : "2025-12-15T11:15:39Z"
  }
}