# CVE-2025-54539: Apache ActiveMQ NMS AMQP Client: Deserialization of Untrusted Data

> Malicious AMQP servers can trigger arbitrary code execution on clients using the Apache ActiveMQ NMS AMQP Client library.

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 16 Oct 2025
- **Updated:** 26 Feb 2026
- **Also known as:** GHSA-4mjw-xr5x-prpc

## What is CVE-2025-54539?

CVE-2025-54539 is a critical unsafe deserialization vulnerability in Apache ActiveMQ NMS AMQP Client, published on 16 Oct 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

A Deserialization of Untrusted Data vulnerability exists in the Apache ActiveMQ NMS AMQP Client.

This issue affects all versions of Apache ActiveMQ NMS AMQP up to and including 2.3.0, when establishing connections to untrusted AMQP servers. Malicious servers could exploit unbounded deserialization logic present in the client to craft responses that may lead to arbitrary code execution on the client side.

Although version 2.1.0 introduced a mechanism to restrict deserialization via allow/deny lists, the protection was found to be bypassable under certain conditions.

In line with Microsoft’s deprecation of binary serialization in .NET 9, the project is evaluating the removal of .NET binary serialization support from the NMS API entirely in future releases.

Mitigation and Recommendations:
Users are strongly encouraged to upgrade to version 2.4.0 or later, which resolves the issue. Additionally, projects depending on NMS-AMQP should migrate away from .NET binary serialization as part of a long-term hardening strategy.

Weakness: CWE-502 (Deserialization of Untrusted Data)

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

2 open source packages ship an affected version, including Apache.NMS.AMQP. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `Apache.NMS.AMQP` | NuGet | All versions | 2.4.0 |
| `Apache.NMS.AMQP` | NuGet | All versions | 2.4.0 |

Products: Apache Activemq Nms Amqp.

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

Upgrade Apache.NMS.AMQP to 2.4.0 or later.

## Is CVE-2025-54539 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2025-54539 is a critical unsafe deserialization vulnerability in Apache ActiveMQ NMS AMQP Client, published on 16 Oct 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-54539 in the wild and no public exploit code.

Affected packages and fixed versions:
- Apache.NMS.AMQP (NuGet): affected all versions; fixed in 2.4.0
- Apache.NMS.AMQP (NuGet): affected all versions; fixed in 2.4.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-2025-54539/ (Markdown: https://insights.sbomify.com/CVE-2025-54539/index.md)
```

## Sources

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

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