# CVE-2026-41247: elFinder: Command injection in resize background color parameter when using ImageMagick CLI

> Attackers can execute arbitrary commands via crafted background color parameters in elFinder when using the ImageMagick CLI backend.

- **Severity:** High 8.9 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 23 Apr 2026
- **Updated:** 25 Apr 2026
- **Also known as:** GHSA-8q4h-8crm-5cvc

## What is CVE-2026-41247?

CVE-2026-41247 is a high-severity command injection vulnerability in Studio-42 elFinder, published on 23 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

elFinder is an open-source file manager for web, written in JavaScript using jQuery UI. Prior to 2.1.67, elFinder contains a command injection vulnerability in the resize command. The bg (background color) parameter is accepted from user input and passed through image resize/rotate processing. In configurations that use the ImageMagick CLI backend, this value is incorporated into shell command strings without sufficient escaping. An attacker able to invoke the resize command with a crafted bg value may achieve arbitrary command execution as the web server process user. This vulnerability is fixed in 2.1.67.

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

## Which versions are affected by CVE-2026-41247?

2 open source packages ship an affected version, including studio-42/elfinder. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `studio-42/elfinder` | Packagist | All versions | 2.1.67 |
| `studio-42/elfinder` | Packagist | All versions | 2.1.67 |

Products: Std42 Elfinder.

## How do I fix CVE-2026-41247?

Upgrade studio-42/elfinder to 2.1.67 or later.

## Is CVE-2026-41247 being exploited?

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

## Other vulnerabilities in Studio-42 elFinder

- [CVE-2023-52044](https://insights.sbomify.com/CVE-2023-52044/): File upload in n/a (critical 9.8)
- [CVE-2024-38909](https://insights.sbomify.com/CVE-2024-38909/): Studio 42 elFinder vulnerable to Incorrect Access Control (critical 9.8)
- [CVE-2022-27115](https://insights.sbomify.com/CVE-2022-27115/): RCE in Studio-42 elFinder on Windows before 2.1.61 (critical 9.8)
- [CVE-2021-43421](https://insights.sbomify.com/CVE-2021-43421/): elFinder Unrestricted File Upload vulnerability (critical 9.8)
- [CVE-2021-32682](https://insights.sbomify.com/CVE-2021-32682/): Multiple vulnerabilities leading to RCE (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-41247 and fix it if it is affected.

What it is: CVE-2026-41247 is a high-severity command injection vulnerability in Studio-42 elFinder, published on 23 Apr 2026. 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-2026-41247 in the wild and no public exploit code.

Affected packages and fixed versions:
- studio-42/elfinder (Packagist): affected all versions; fixed in 2.1.67
- studio-42/elfinder (Packagist): affected all versions; fixed in 2.1.67

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

## Sources

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

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