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

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.

Check my composer.lock

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 (223 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, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: Packagist (1).

PackageFixed 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-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. 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

CVSS Score
9.8

Maximum impact if exploited, often with little effort or access required.

EPSS Score (30-day exploit probability)
2.76%
EPSS percentile: 87

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

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-103035
    HIGH

    TeamPass folder re-parenting authorization bypass

  • 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-110782
    HIGH

    SAML2: Incomplete fix of CVE-2026-49283: unsigned embedded Response bypasses HTTP-Artifact signature verification (no embedded-Issuer binding)

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my composer.lock