Skip to content
Memory corruption Advisory Advanced CVE-2025-50177

Microsoft Message Queuing (MSMQ) Remote Code Execution Vulnerability (CVE-2025-50177)

A use-after-free flaw in Windows Message Queuing could let an unauthenticated attacker run code on a server by sending a rapid sequence of crafted MSMQ packets over HTTP. Exploitation depends on winning a race condition, so it is not straightforward.

Azure Yang Follow

Originally disclosed on Microsoft

Critical 8.1 View original

Description

Use after free in Windows Message Queuing allows an unauthorized attacker to execute code over a network.

FAQ

How could an attacker exploit the vulnerability? To exploit this vulnerability, an attacker would need to send a series of specially crafted MSMQ packets in a rapid sequence over HTTP to a MSMQ server. This could result in remote code execution on the server side.

FAQ

According to the CVSS metric, the attack complexity is high (AC:H). What does that mean for this vulnerability? Successful exploitation of this vulnerability requires an attacker to win a race condition.

Windows Message Queuing

Windows Message Queuing

Microsoft

Microsoft

Customer Action Required

Yes

The original report as published on the Microsoft Security Response Center, by Azure Yang with Kunlun Lab. Images and videos are our own copies; raw HTML is shown as text. View it on Microsoft Security Response Center.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a use-after-free in the MSMQ service where memory is released while still referenced during rapid packet processing, creating a race window.

Impact

An attacker could achieve remote code execution on the server, but only if they win a race condition, so success is not guaranteed.

What the attacker needed

Network access to an MSMQ server over HTTP; no authentication needed; win a race condition

The fix

Microsoft marked customer action as required, so the fix is to apply the vendor's security update.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Message Queuing is a Windows service that lets programs pass messages to each other. A use-after-free bug means the program frees a piece of memory but keeps using it, so an attacker who times things right can make it run their own code. Here the attacker must send many specially made messages very quickly and win a timing race, which makes it hard to pull off.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by Azure Yang

View all

78 more disclosed reports, best first.

More from Microsoft

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.