Loading...
Skip to main content

CVE-2026-41247 — elFinder: Command injection in studio-42/elfinder...

HIGH

elFinder: Command injection in resize background color parameter when using ImageMagick CLI

Published April 17, 2026Updated May 6, 2026Source: osv

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 `resize` command 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: 1. The `resize` command accepts the `bg` parameter from the request. 2. The parameter is passed into volume resize handling. 3. In ImageMagick CLI code paths, the value is interpolated into shell command strings. 4. Because the value is not safely constrained and escaped, shell metacharacters may be injected. The issue was addressed by: - validating `bg` against 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 `resize` command 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 (177 days ago).
  • Last revised May 6, 2026 — 18 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Composer
Update studio-42/elfinder to 2.1.67 or later
composer require "studio-42/elfinder:^2.1.67"

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: packagist (1).

PackageEcosystemAffectedFixed In
studio-42/elfinder
packagist
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-78
    OS Command InjectionMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

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. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-41247 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.8

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-8q4h-8crm-5cvc

Related CVEs

  • CVE-2019-9194
    CRITICAL

    elFinder command injection vulnerability in the PHP connector

  • CVE-2024-38909
    HIGH

    Studio 42 elFinder vulnerable to Incorrect Access Control

  • CVE-2026-81889
    HIGH

    elFinder: SSRF protection bypass via DNS rebinding in the `fsock_get_contents()` fallback

  • CVE-2026-44521
    HIGH

    elFinder MySQL has a SQL Injection in its Volume Driver (elFinderVolumeMySQL)

  • CVE-2026-81891
    HIGH

    elFinder: ZIP extraction bypasses uploadDeny MIME filter allowing PHP file upload (RCE)

  • CVE-2026-65954
    HIGH

    PHPCSUtils: Remote code execution via eval() in AbstractArrayDeclarationSniff::getActualArrayKey()

  • CVE-2026-61825
    HIGH

    code16/sharp has a stored XSS via data-html-content Sanitizer Bypass

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies