Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsUpgrade studio-42/elfinder to version 2.1.67 or higher.
studio-42/elfinder is an open-source file manager for web, written in JavaScript using jQuery UI.
Affected versions of this package are vulnerable to Command Injection via the resize process when the bg parameter is supplied by a user and is not properly sanitized before being incorporated into shell command strings in the ImageMagick CLI backend. An attacker can execute arbitrary operating system commands as the web server process user by injecting shell metacharacters into the bg parameter. This is only exploitable if the resize command is enabled, image processing uses the ImageMagick CLI backend, and the vulnerable code paths are reachable.
This vulnerability can be mitigated by disabling the resize command, avoiding the use of the ImageMagick CLI backend, or restricting access to trusted users only.