Vulnerability DatabaseGHSA-8q4h-8crm-5cvc

GHSA-8q4h-8crm-5cvc
PHP vulnerability analysis and mitigation

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:

  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 for the responsible disclosure.


SourceNVD

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-8q4h-8crm-5cvcHIGH8.9
  • PHPPHP
  • studio-42/elfinder
NoYesApr 17, 2026
CVE-2026-41143HIGH8.8
  • PHPPHP
  • yeswiki/yeswiki
NoYesApr 18, 2026
GHSA-qrr6-mg7r-m243HIGH7.8
  • PHPPHP
  • phpunit/phpunit
NoYesApr 18, 2026
CVE-2026-40479MEDIUM5.4
  • PHPPHP
  • kimai/kimai
NoYesApr 17, 2026
CVE-2026-40486MEDIUM4.3
  • PHPPHP
  • kimai/kimai
NoYesApr 17, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management