# CVE-2024-29185: FreeScout OS Command Injection vulnerability

> An attacker with the App_Key can execute arbitrary OS commands on the server via the php_path parameter, leading to full server compromise.

- **Severity:** Critical 9.1 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/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:** No
- **Published:** 22 Mar 2024
- **Updated:** 21 Aug 2024
- **Also known as:** GHSA-7p9x-ch4c-vqj9

## What is CVE-2024-29185?

CVE-2024-29185 is a critical command injection vulnerability in freescout-helpdesk freescout, published on 22 Mar 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

FreeScout is a self-hosted help desk and shared mailbox. Versions prior to 1.8.128 are vulnerable to OS Command Injection in the /public/tools.php source file. The value of the php_path parameter is being executed as an OS command by the shell_exec function, without validating it. This allows an adversary to execute malicious OS commands on the server. A practical demonstration of the successful command injection attack extracted the /etc/passwd file of the server. This represented the complete compromise of the server hosting the FreeScout application. This attack requires an attacker to know the `App_Key` of the application. This limitation makes the Attack Complexity to be High. If an attacker gets hold of the `App_Key`, the attacker can compromise the Complete server on which the application is deployed. Version 1.8.128 contains a patch for this issue.

Weakness: CWE-78 (Improper Neutralization of Special Elements used in an OS Command)

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

It affects 1 product.


Products: Freescout Freescout.

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

No fix has been published for CVE-2024-29185 yet. Limit exposure of the affected software until one is available.

## Is CVE-2024-29185 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-29185 exists.

## Other vulnerabilities in freescout-helpdesk freescout

- [CVE-2026-28289](https://insights.sbomify.com/CVE-2026-28289/): FreeScout 1.8.206 Patch Bypass for CVE-2026-27636 via Zero-Width Space Character Leads to Remote Code Execution (critical 10.0)
- [CVE-2026-27637](https://insights.sbomify.com/CVE-2026-27637/): FreeScout's Predictable Authentication Token Enables Account Takeover (critical 9.8)
- [CVE-2026-32754](https://insights.sbomify.com/CVE-2026-32754/): FreeScout: Stored XSS via Unescaped Email Template Rendering ({!! $thread->body !!}) (critical 9.3)
- [CVE-2026-40498](https://insights.sbomify.com/CVE-2026-40498/): FreeScout has Authentication Bypass and Information Disclosure in SystemController via /system/cron (high 8.9)
- [CVE-2026-40496](https://insights.sbomify.com/CVE-2026-40496/): FreeScout has Predictable Attachment Token that Allows Unauthenticated Private File Download via Brute Force (high 8.8)

## Fix prompt for AI coding agents

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

What it is: CVE-2024-29185 is a critical command injection vulnerability in freescout-helpdesk freescout, published on 22 Mar 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-29185 exists.

Affected product: freescout-helpdesk freescout. No package-level version data is available, so check the vendor advisory linked from the reference page.

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

## Sources

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

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