Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2026-41247

elFinder: Command injection in resize background color parameter when using ImageMagick CLI
Back to all
CVE

CVE-2026-41247

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

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.

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
8.9
-
4.0
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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
C
H
U
0
-
C
H
U
-

Related Resources

No items found.

References

https://github.com/Studio-42/elFinder/security/advisories/GHSA-8q4h-8crm-5cvc, https://nvd.nist.gov/vuln/detail/CVE-2026-41247, https://github.com/Studio-42/elFinder

Severity

9.8

CVSS Score
0
10

Basic Information

Ecosystem
Base CVSS
9.8
EPSS Probability
0.00163%
EPSS Percentile
0.36726%
Introduced Version
0
Fix Available
2.1.67

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading