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 <FIXED_VERSION>
Patched: <FIXED_VERSION>
Details
The vulnerable flow is:
- The
resize command accepts the bg parameter 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
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 for the responsible disclosure.
References
Severity
High
bgcan be injected into shell command construction, leading to possible RCE in affected configurations.Summary
elFinder contains a command injection vulnerability in the
resizecommand.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 theresizecommand with a craftedbgvalue may achieve arbitrary command execution as the web server process user.This issue affects configurations where:
resizecommand is enabled,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 <FIXED_VERSION>
Patched: <FIXED_VERSION>
Details
The vulnerable flow is:
resizecommand accepts thebgparameter from the request.The issue was addressed by:
bgagainst a strict allowlist of supported color formats, andWorkarounds
Possible mitigations for users who cannot upgrade immediately:
resizecommand if not required,Upgrading to the patched release is strongly recommended.
Credits
Thanks to Lin, WeiChi for the responsible disclosure.
References