# CVE-2024-45772: Apache Lucene Replicator: Security Vulnerability in Lucene Replicator - Deserialization Issue

> Attackers can execute arbitrary code via deserialization in Apache Lucene Replicator if a network-accessible HTTP implementation is deployed.

- **Severity:** Medium 5.1 (`CVSS:3.1/AV:A/AC:H/PR:H/UI:N/S:C/C:L/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 30 Sep 2024
- **Updated:** 12 Dec 2024
- **Also known as:** GHSA-g643-xq6w-r67c

## What is CVE-2024-45772?

CVE-2024-45772 is a medium-severity unsafe deserialization vulnerability in Apache Lucene Replicator, published on 30 Sep 2024. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

Deserialization of Untrusted Data vulnerability in Apache Lucene Replicator.

This issue affects Apache Lucene's replicator module: from 4.4.0 before 9.12.0.
The deprecated org.apache.lucene.replicator.http package is affected.
The org.apache.lucene.replicator.nrt package is not affected.

Users are recommended to upgrade to version 9.12.0, which fixes the issue.

 The deserialization can only be triggered if users actively deploy an network-accessible implementation and a corresponding client using a HTTP library that uses the API (e.g., a custom servlet and HTTPClient). Java serialization filters (such as -Djdk.serialFilter='!*' on the commandline) can mitigate the issue on vulnerable versions without impacting functionality.

Weakness: CWE-502 (Deserialization of Untrusted Data)

## Which versions are affected by CVE-2024-45772?

2 open source packages ship an affected version, including org.apache.lucene:lucene-replicator. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.apache.lucene:lucene-replicator` | Maven | From 4.4.0 | 9.12.0 |
| `org.apache.lucene:lucene-replicator` | Maven | From 4.4.0 | 9.12.0 |

Products: Apache Lucene Replicator.

## How do I fix CVE-2024-45772?

Upgrade org.apache.lucene:lucene-replicator to 9.12.0 or later.

## Is CVE-2024-45772 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-45772 and fix it if it is affected.

What it is: CVE-2024-45772 is a medium-severity unsafe deserialization vulnerability in Apache Lucene Replicator, published on 30 Sep 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2024-45772 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.apache.lucene:lucene-replicator (Maven): affected from 4.4.0; fixed in 9.12.0
- org.apache.lucene:lucene-replicator (Maven): affected from 4.4.0; fixed in 9.12.0

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-2024-45772/ (Markdown: https://insights.sbomify.com/CVE-2024-45772/index.md)
```

## Sources

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

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