CVE-2026-41247 — elFinder: Command injection in studio-42/elfinder
elFinder: Command injection in resize background color parameter when using ImageMagick CLI
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (2.76%). Schedule for your next planned update.
Does your project use an affected studio-42/elfinder version?
Paste your composer.lock to check it for CVE-2026-41247 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Severity
High
bg can be injected into shell command construction, leading to possible RCE in affected configurations.
Summary
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 issue affects configurations where:
- the
resizecommand is enabled, - image processing uses the ImageMagick CLI backend, and
- the vulnerable code paths are reachable.
Impact
An attacker may execute arbitrary OS commands with the privileges of the web server process.
Impact depends on server configuration, enabled commands, backend image library selection, and surrounding deployment controls.
Affected versions
Affected: all versions before 2.1.66 Patched: 2.1.67
Details
The vulnerable flow is:
- The
resizecommand accepts thebgparameter from the request. - The parameter is passed into volume resize handling.
- In ImageMagick CLI code paths, the value is interpolated into shell command strings.
- Because the value is not safely constrained and escaped, shell metacharacters may be injected.
The issue was addressed by:
- validating
bgagainst a strict allowlist of supported color formats, and - safely escaping the value before it is passed into CLI command construction.
Workarounds
Possible mitigations for users who cannot upgrade immediately:
- disable the
resizecommand if not required, - avoid using the ImageMagick CLI backend for image processing,
- restrict access to trusted users only.
Upgrading to the patched release is strongly recommended.
Credits
Thanks to Lin, WeiChi and Drew Webber for the responsible disclosure.
Advisory Timeline
- First published April 17, 2026 (223 days ago).
- Last revised May 6, 2026 — 18 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
composer require "studio-42/elfinder:^2.1.67"
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: Packagist (1).
| Package | Fixed In |
|---|---|
| studio-42/elfinder Packagist · Affected: 2.0.3, 2.0.4, 2.0.5, 2.0.6 (+70 more) | 2.1.67 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-78OS Command InjectionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
References
Frequently Asked Questions
- What is CVE-2026-41247?
- elFinder: Command injection in resize background color parameter when using ImageMagick CLI. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 9.8/10).
- How do I check if my project is affected by CVE-2026-41247?
- CVE-2026-41247 affects studio-42/elfinder. It has a 2.8% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-41247 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
This places it in the top quartile of EPSS-scored vulnerabilities — 87% of tracked vulnerabilities score at or below it, so it is more likely to be exploited than most of the tracked corpus.
Also Known As
Related CVEs
- CVE-2019-9194CRITICAL
elFinder command injection vulnerability in the PHP connector
- CVE-2024-38909HIGH
Studio 42 elFinder vulnerable to Incorrect Access Control
- CVE-2026-103035HIGH
TeamPass folder re-parenting authorization bypass
- CVE-2026-81889HIGH
elFinder: SSRF protection bypass via DNS rebinding in the `fsock_get_contents()` fallback
- CVE-2026-44521HIGH
elFinder MySQL has a SQL Injection in its Volume Driver (elFinderVolumeMySQL)
- CVE-2026-81891HIGH
elFinder: ZIP extraction bypasses uploadDeny MIME filter allowing PHP file upload (RCE)
- CVE-2026-110782HIGH
SAML2: Incomplete fix of CVE-2026-49283: unsigned embedded Response bypasses HTTP-Artifact signature verification (no embedded-Issuer binding)