Security: CVE-2026-125396 – Ghostscript – Upload2Shell
Security: CVE-2026-125396 - Ghostscript - Upload2Shell: a vulnerability was found in Ghostscript that can allow for remote command execution. Apply the vendor's update through its standard channel.
What this means under a SharedLicense license
Severity data in the advisory: CVSS 7.8, CWE-648.
Situation
A vulnerability was found in Ghostscript that can allow for remote command execution.
Impact
This vulnerability affects Ghostscript versions earlier than 10.08.0.
Call to Action
Ensure all WordPress installations are up to date. The vulnerability is patched in the versions below and higher.
- 6.8.8
- 6.9.7
- 7.0.4
Ensure Roundcube is on version 1.6.20 or higher. You can check your Roundcube version using the following command.
# rpm -q cpanel-roundcubemail
If the version is less than 1.6.20, update cPanel/WHM with the following command.
# /scripts/upcp
If cPanel/WHM or the WordPress installs can not be upgraded, you can also mitigate the vulnerability at the system level prior to your operating system publishing Ghostscript 10.08.0 or backporting patches, by restricting the use of Ghostscript in ImageMagick. This mitigation can be removed after Ghostscript has been updated to version 10.08.0 or higher.
Note: This may cause issues with Ghostscript image generation, including things like preview images, thumbnails, and image resizing in some applications such as Roundcube and WordPress.
-
Open the ImageMagick policy to restrict Ghostscript handling of images.
# nano /etc/ImageMagick-*/policy.xml
-
Under
<policymap>, add the following policy configuration.CONFIG_TEXT: <!– Begin mitigation for CVE-2026-125396 –>
<policy domain=»delegate» rights=»none» pattern=»gs» />
<policy domain=»coder» rights=»none» pattern=»PS» />
<policy domain=»coder» rights=»none» pattern=»PS2″ />
<policy domain=»coder» rights=»none» pattern=»PS3″ />
<policy domain=»coder» rights=»none» pattern=»EPS» />
<policy domain=»coder» rights=»none» pattern=»PDF» />
<policy domain=»coder» rights=»none» pattern=»XPS» />
<!– End mitigation for CVE-2026-125396 –> -
Restart Apache and PHP-FPM to ensure they are using the new policy.
# /scripts/restartsrv_apache
# /scripts/restartsrv_apache_php_fpm
Frequently Asked Questions
What is this advisory about?
What should I do?
References
Check your system for vulnerabilities
Select your product and operating system to see the exact fix commands that apply to you.
Check Your System