# CVE-2024-51736: Command execution hijack on Windows with Process class in symfony/process

> Attackers can hijack command execution on Windows by placing a malicious cmd.exe in the working directory, affecting applications using the Symfony Process component.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 6 Nov 2024
- **Updated:** 21 Nov 2024
- **Also known as:** CLSA-2025-1761785573, CLSA-2025-1761785574, GHSA-qq5c-677p-737q

## What is CVE-2024-51736?

CVE-2024-51736 is a command injection vulnerability in Sensiolabs Symfony, published on 6 Nov 2024. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

Symphony process is a module for the Symphony PHP framework which executes commands in sub-processes. On Windows, when an executable file named `cmd.exe` is located in the current working directory it will be called by the `Process` class when preparing command arguments, leading to possible hijacking. This issue has been addressed in release versions 5.4.46, 6.4.14, and 7.1.7. Users are advised to upgrade. There are no known workarounds for this vulnerability.

Weakness: CWE-77 (Improper Neutralization of Special Elements used in a Command)

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

12 open source packages ship an affected version, including symfony/process and symfony/symfony. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `symfony/process` | Packagist | All versions | 5.4.46 |
| `symfony/process` | Packagist | All versions | 5.4.46 |
| `symfony/process` | Packagist | From 6.0.0 | 6.4.14 |
| `symfony/process` | Packagist | From 6.0.0 | 6.4.14 |
| `symfony/process` | Packagist | From 7.0.0 | 7.1.7 |
| `symfony/process` | Packagist | From 7.0.0 | 7.1.7 |
| `symfony/symfony` | Packagist | All versions | 5.4.46 |
| `symfony/symfony` | Packagist | All versions | 5.4.46 |
| `symfony/symfony` | Packagist | From 6.0.0 | 6.4.14 |
| `symfony/symfony` | Packagist | From 6.0.0 | 6.4.14 |
| `symfony/symfony` | Packagist | From 7.0.0 | 7.1.7 |
| `symfony/symfony` | Packagist | From 7.0.0 | 7.1.7 |

Products: Sensiolabs Symfony.

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

Upgrade symfony/process to a fixed version for your release line: 5.4.46, 6.4.14 or 7.1.7.

## Is CVE-2024-51736 being exploited?

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

## Other vulnerabilities in Sensiolabs Symfony

- [CVE-2019-11325](https://insights.sbomify.com/CVE-2019-11325/): Improper Input Validation in Symfony (critical 9.8)
- [CVE-2017-11365](https://insights.sbomify.com/CVE-2017-11365/): Symfony Incorrect Access Control (critical 9.8)
- [CVE-2019-10913](https://insights.sbomify.com/CVE-2019-10913/): Invalid HTTP method overrides allow possible XSS or other attacks in Symfony (critical 9.8)
- [CVE-2018-11407](https://insights.sbomify.com/CVE-2018-11407/): Symfony Authentication Bypass (critical 9.8)
- [CVE-2016-2403](https://insights.sbomify.com/CVE-2016-2403/): Symfony Authentication Bypass (critical 9.8)

## Fix prompt for AI coding agents

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

What it is: CVE-2024-51736 is a command injection vulnerability in Sensiolabs Symfony, published on 6 Nov 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-51736 in the wild and no public exploit code.

Affected packages and fixed versions:
- symfony/process (Packagist): affected all versions; fixed in 5.4.46
- symfony/process (Packagist): affected all versions; fixed in 5.4.46
- symfony/process (Packagist): affected from 6.0.0; fixed in 6.4.14
- symfony/process (Packagist): affected from 6.0.0; fixed in 6.4.14
- symfony/process (Packagist): affected from 7.0.0; fixed in 7.1.7
- symfony/process (Packagist): affected from 7.0.0; fixed in 7.1.7
- symfony/symfony (Packagist): affected all versions; fixed in 5.4.46
- symfony/symfony (Packagist): affected all versions; fixed in 5.4.46
- symfony/symfony (Packagist): affected from 6.0.0; fixed in 6.4.14
- symfony/symfony (Packagist): affected from 6.0.0; fixed in 6.4.14
- symfony/symfony (Packagist): affected from 7.0.0; fixed in 7.1.7
- symfony/symfony (Packagist): affected from 7.0.0; fixed in 7.1.7

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

## Sources

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

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