CVE-2026-41247: elFinder Command Injection Vulnerability
HIGHCVE-2026-41247 is a HIGH (CVSS 9.8) command injection vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting elFinder libraries in the Packagist ecosystem. The issue involves command injection in resize background color parameter when using imagemagick cli. Remediation is available by upgrading affected packages to version 2.1.67.
CVE-2026-41247 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2026-41247
To remediate this vulnerability, upgrade all affected elFinder dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade studio-42/elfinder to 2.1.67
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for studio-42/elfinder
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-41247, inspect your project dependencies for elFinder:
inspect dependencies for studio-42/elfinder
Analyze the terminal output to locate any version of elFinder in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.1.67), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In elFinder, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-41247 Affected elFinder Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
studio-42/elfinder
|
Packagist |
< 2.1.67
|
2.1.67
|
References
Frequently Asked Questions
What is CVE-2026-41247?
Which elFinder versions are affected?
What version fixes CVE-2026-41247?
Is studio-42/elfinder affected?
What is the CVSS score of CVE-2026-41247?
What CWE is associated with CVE-2026-41247?
How can I check Packagist dependencies for CVE-2026-41247?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8q4h-8crm-5cvc",
"modified" : "2026-05-06T02:35:09Z",
"published" : "2026-04-17T22:33:51Z",
"aliases" : [ "CVE-2026-41247" ],
"summary" : "elFinder: Command injection in resize background color parameter when using ImageMagick CLI",
"details" : "### Severity\n**High** \n`bg` can be injected into shell command construction, leading to possible RCE in affected configurations.\n\n### Summary\n\nelFinder contains a command injection vulnerability in the `resize` command.\n\nThe `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.\n\nThis issue affects configurations where:\n- the `resize` command is enabled,\n- image processing uses the ImageMagick CLI backend, and\n- the vulnerable code paths are reachable.\n\n\n### Impact\n\nAn attacker may execute arbitrary OS commands with the privileges of the web server process.\n\nImpact depends on server configuration, enabled commands, backend image library selection, and surrounding deployment controls.\n\n\n### Affected versions\n\nAffected: all versions before 2.1.66\nPatched: 2.1.67\n\n\n### Details\n\nThe vulnerable flow is:\n\n1. The `resize` command accepts the `bg` parameter from the request.\n2. The parameter is passed into volume resize handling.\n3. In ImageMagick CLI code paths, the value is interpolated into shell command strings.\n4. Because the value is not safely constrained and escaped, shell metacharacters may be injected.\n\nThe issue was addressed by:\n- validating `bg` against a strict allowlist of supported color formats, and\n- safely escaping the value before it is passed into CLI command construction.\n\n\n### Workarounds\n\nPossible mitigations for users who cannot upgrade immediately:\n\n- disable the `resize` command if not required,\n- avoid using the ImageMagick CLI backend for image processing,\n- restrict access to trusted users only.\n\nUpgrading to the patched release is strongly recommended.\n\n\n### Credits\n\nThanks to Lin, WeiChi and Drew Webber for the responsible disclosure.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "studio-42/elfinder"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.1.67"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Studio-42/elFinder/security/advisories/GHSA-8q4h-8crm-5cvc"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-41247"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Studio-42/elFinder"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-78" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-17T22:33:51Z",
"nvd_published_at" : "2026-04-23T19:17:29Z"
}
}