CVE-2025-58457: Apache ZooKeeper Insufficient Permission Check Vulnerability

MODERATE
Advisory Identifier: GHSA-2hmj-97jw-28jh
CVSS 4.3
CWE-280
Published
Advisory Summary

CVE-2025-58457 is a MODERATE (CVSS 4.3) insufficient permission check vulnerability (CWE-280: Improper Handling of Insufficient Permissions or Privileges) affecting Apache ZooKeeper libraries in the Maven ecosystem. The issue involves insufficient permission check in adminserver snapshot/restore commands. Remediation is available by upgrading affected packages to version 3.9.4.

CVE-2025-58457 at a Glance

CVE Identifier CVE-2025-58457
GHSA Identifier GHSA-2hmj-97jw-28jh
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-280: Improper Handling of Insufficient Permissions or Privileges
Affected Product Apache ZooKeeper
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 4.3

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

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

How to Fix CVE-2025-58457

To remediate this vulnerability, upgrade all affected Apache ZooKeeper 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.apache.zookeeper:zookeeper fixed: 3.9.4
<dependency>
    <groupId>org.apache.zookeeper</groupId>
    <artifactId>zookeeper</artifactId>
    <version>3.9.4</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.apache.zookeeper

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=org.apache.zookeeper

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

Note: The mvn dependency:tree -Dincludes=org.apache.zookeeper 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-280: Improper Handling of Insufficient Permissions or Privileges, where the product does not handle or incorrectly handles when it has insufficient privileges to access resources or functionality as specified by their permissions. this may cause it to follow unexpected code paths that may leave the product in an invalid state. In Apache ZooKeeper, 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 permission checks in the AdminServer allow an authenticated client with insufficient privileges to invoke the `snapshot` and `restore` commands. The intended requirement is authentication and authorization on the root path (`/`) with **ALL** permission for these operations; however, affected versions permit invocation without that level of authorization. The primary risk is disclosure of cluster state via snapshots to a lesser-privileged client. * **Affected:** `org.apache.zookeeper:zookeeper` 3.9.0 through 3.9.3. * **Fixed:** 3.9.4 (ZOOKEEPER-4964 “check permissions individually during admin server auth”). * **Mitigations:** * Disable both commands (`admin.snapshot.enabled`, `admin.restore.enabled`). * Disable AdminServer (`admin.enableServer`). * Ensure the root ACL is not open; note that ZooKeeper ACLs are not recursive. * Upgrade to 3.9.4.

CVE-2025-58457 Affected Apache ZooKeeper Versions

1 component(s)
Fixed Versions:
3.9.4
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.zookeeper:zookeeper
Maven
≥ 3.9.0
< 3.9.4
3.9.4

References

Frequently Asked Questions

What is CVE-2025-58457?
CVE-2025-58457 is a security vulnerability in Apache ZooKeeper involving Insufficient Permission Check in AdminServer Snapshot/Restore Commands under CWE-280: Improper Handling of Insufficient Permissions or Privileges.
Which Apache ZooKeeper versions are affected?
Affected versions include releases prior to 3.9.4 across affected packages: org.apache.zookeeper:zookeeper.
What version fixes CVE-2025-58457?
Upgrading to 3.9.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is zookeeper affected?
Yes, org.apache.zookeeper:zookeeper is affected in releases prior to 3.9.4. Upgrade your dependency to 3.9.4 or later.
What is the CVSS score of CVE-2025-58457?
CVE-2025-58457 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2025-58457?
CVE-2025-58457 is classified under CWE-280: Improper Handling of Insufficient Permissions or Privileges (The product does not handle or incorrectly handles when it has insufficient privileges to access resources or functionality as specified by their permissions. This may cause it to follow unexpected code paths that may leave the product in an invalid state.).
How can I check Maven dependencies for CVE-2025-58457?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.zookeeper'. 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-2hmj-97jw-28jh",
  "modified" : "2025-11-05T20:46:28Z",
  "published" : "2025-09-24T12:30:20Z",
  "aliases" : [ "CVE-2025-58457" ],
  "summary" : "Apache ZooKeeper: Insufficient Permission Check in AdminServer Snapshot/Restore Commands",
  "details" : "Improper permission checks in the AdminServer allow an authenticated client with insufficient privileges to invoke the `snapshot` and `restore` commands. The intended requirement is authentication and authorization on the root path (`/`) with **ALL** permission for these operations; however, affected versions permit invocation without that level of authorization. The primary risk is disclosure of cluster state via snapshots to a lesser-privileged client.\n\n*   **Affected:** `org.apache.zookeeper:zookeeper` 3.9.0 through 3.9.3.\n*   **Fixed:** 3.9.4 (ZOOKEEPER-4964 “check permissions individually during admin server auth”).\n*   **Mitigations:**\n    *   Disable both commands (`admin.snapshot.enabled`, `admin.restore.enabled`).\n    *   Disable AdminServer (`admin.enableServer`).\n    *   Ensure the root ACL is not open; note that ZooKeeper ACLs are not recursive.\n    *   Upgrade to 3.9.4.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.zookeeper:zookeeper"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.9.0"
      }, {
        "fixed" : "3.9.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-58457"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/zookeeper"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/r5yol0kkhx2fzw22pxk1ozwm3oc6yxrx"
  }, {
    "type" : "WEB",
    "url" : "https://zookeeper.apache.org/doc/current/zookeeperSnapshotAndRestore.html"
  }, {
    "type" : "WEB",
    "url" : "https://zookeeper.apache.org/doc/r3.9.4/releasenotes.html"
  }, {
    "type" : "WEB",
    "url" : "https://zookeeper.apache.org/security.html#CVE-2025-58457"
  }, {
    "type" : "WEB",
    "url" : "http://github.com/apache/zookeeper/commit/71e173fcbcc9deb784081cf867bd045df3c32635"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2025/09/24/10"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-280" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-09-24T19:00:08Z",
    "nvd_published_at" : "2025-09-24T10:15:28Z"
  }
}