# CVE-2025-58782: Apache Jackrabbit Core, Apache Jackrabbit JCR Commons: JNDI injection risk with JndiRepositoryFactory

> Attackers can achieve arbitrary code execution via JNDI injection if JCR lookup from untrusted users is enabled, requiring an upgrade to disable this feature by default.

- **Severity:** Medium 6.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 8 Sep 2025
- **Updated:** 4 Nov 2025
- **Also known as:** DEBIAN-CVE-2025-58782, GHSA-cxvc-g8f2-4gmm, UBUNTU-CVE-2025-58782

## What is CVE-2025-58782?

CVE-2025-58782 is a medium-severity unsafe deserialization vulnerability in Apache Jackrabbit Core, published on 8 Sep 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Deserialization of Untrusted Data vulnerability in Apache Jackrabbit Core and Apache Jackrabbit JCR Commons.

This issue affects Apache Jackrabbit Core: from 1.0.0 through 2.22.1; Apache Jackrabbit JCR Commons: from 1.0.0 through 2.22.1.

Deployments that accept JNDI URIs for JCR lookup from untrusted users allows them to inject malicious JNDI references, potentially leading to arbitrary code execution through deserialization of untrusted data.
Users are recommended to upgrade to version 2.22.2. JCR lookup through JNDI has been disabled by default in 2.22.2. Users of this feature need to enable it explicitly and are adviced to review their use of JNDI URI for JCR lookup.

Weakness: CWE-502 (Deserialization of Untrusted Data)

## Which versions are affected by CVE-2025-58782?

4 open source packages ship an affected version, including org.apache.jackrabbit:jackrabbit-core and org.apache.jackrabbit:jackrabbit-jcr-commons. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.apache.jackrabbit:jackrabbit-core` | Maven | From 1.0.0 | 2.22.2 |
| `org.apache.jackrabbit:jackrabbit-core` | Maven | From 1.0.0 | 2.22.2 |
| `org.apache.jackrabbit:jackrabbit-jcr-commons` | Maven | From 1.0.0 | 2.22.2 |
| `org.apache.jackrabbit:jackrabbit-jcr-commons` | Maven | From 1.0.0 | 2.22.2 |

Products: Apache Jackrabbit.

## How do I fix CVE-2025-58782?

Upgrade org.apache.jackrabbit:jackrabbit-core to 2.22.2 or later.

## Is CVE-2025-58782 being exploited?

There is no known exploitation of CVE-2025-58782 in the wild and no public exploit code.

## Other vulnerabilities in Apache Jackrabbit Core

- [CVE-2023-37895](https://insights.sbomify.com/CVE-2023-37895/): Apache Jackrabbit RMI access can lead to RCE (critical 9.8)
- [CVE-2026-92414](https://insights.sbomify.com/CVE-2026-92414/): Apache Jackrabbit: Pre-auth hijack of cached sessions via derivable WebDAV lock tokens (critical 9.3)
- [CVE-2025-53689](https://insights.sbomify.com/CVE-2025-53689/): Apache Jackrabbit: XXE vulnerability in jackrabbit-spi-commons (high 8.8)
- [CVE-2016-6801](https://insights.sbomify.com/CVE-2016-6801/): Apache Jackrabbit Authentication Hijacking Vulnerability (high 8.8)
- [CVE-2026-92415](https://insights.sbomify.com/CVE-2026-92415/): Apache Jackrabbit: DavEx client runs Class.forName + (String)-constructor on server-controlled error bodies (medium 6.9)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-58782 and fix it if it is affected.

What it is: CVE-2025-58782 is a medium-severity unsafe deserialization vulnerability in Apache Jackrabbit Core, published on 8 Sep 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-58782 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.apache.jackrabbit:jackrabbit-core (Maven): affected from 1.0.0; fixed in 2.22.2
- org.apache.jackrabbit:jackrabbit-core (Maven): affected from 1.0.0; fixed in 2.22.2
- org.apache.jackrabbit:jackrabbit-jcr-commons (Maven): affected from 1.0.0; fixed in 2.22.2
- org.apache.jackrabbit:jackrabbit-jcr-commons (Maven): affected from 1.0.0; fixed in 2.22.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-58782/ (Markdown: https://insights.sbomify.com/CVE-2025-58782/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-58782
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-58782
- OSV: https://osv.dev/vulnerability/CVE-2025-58782

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-58782/
Summaries are generated and may contain mistakes; the official description above is the record.
