Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-48997

CVE-2026-48997: e107 CMS RCE Vulnerability

CVE-2026-48997 is a command injection RCE vulnerability in e107 CMS affecting versions 2.3.5 and earlier. Attackers can execute arbitrary commands through ImageMagick resize operations. This article covers technical details, affected versions, exploitation requirements, and mitigation strategies.

Published:

CVE-2026-48997 Overview

CVE-2026-48997 is a command injection vulnerability [CWE-78] in the e107 content management system (CMS), affecting versions 2.3.5 and earlier. The flaw resides in the resize_image() function, which improperly handles the destination path passed to the ImageMagick convert command. The submit-news upload flow incorporates the first six characters of a user-controlled news title into that destination filename. Because the title filter strips literal spaces but not tab characters, attackers can inject shell metacharacters such as $(...) or backticks into the quoted argument. The shell (/bin/sh -c) then evaluates the attacker-controlled input. The issue is fixed in version 2.3.6.

Critical Impact

Authenticated non-admin users in permitted classes can achieve arbitrary command execution on the underlying server when specific non-default configuration options are enabled.

Affected Products

  • e107 CMS versions 2.3.5 and earlier
  • Installations with resize_method=ImageMagick, subnews_attach=1, and upload_enabled=1
  • Configurations where subnews_resize is numeric between 30 and 5000

Discovery Timeline

  • 2026-06-17 - CVE-2026-48997 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2026-48997

Vulnerability Analysis

The vulnerability stems from inconsistent shell argument quoting inside the resize_image() routine. The source path is correctly sanitized with PHP's escapeshellarg(), but the destination path is concatenated directly inside raw double quotes within the convert command string. Double-quoted shell arguments still permit command substitution via $(...) and backticks, so escaping is insufficient when the destination contains attacker-controlled bytes.

In the submit-news upload flow, the destination filename is derived from the first six characters of the news title. The input filter removes literal space characters but does not strip tab characters or shell metacharacters. An attacker who controls those six characters can inject a command substitution sequence that the shell evaluates when convert is invoked.

Root Cause

The root cause is improper neutralization of special elements used in an OS command [CWE-78]. The destination argument is not passed through escapeshellarg(), and the title sanitizer omits tab characters and shell expansion syntax from its blocklist. Trust placed in static double quotes is misplaced because the shell still performs variable and command expansion inside them.

Attack Vector

Exploitation requires an authenticated user assigned to classes permitted by both subnews_class and upload_class. The attacker submits a news post containing a crafted title whose first six characters include a command substitution sequence and a tab character to evade the space filter. The attacker also attaches an image that triggers the ImageMagick resize path. When resize_image() builds the convert command, the injected sequence is evaluated by /bin/sh -c, executing arbitrary commands under the web server user context.

The vulnerability requires the following non-default settings: resize_method=ImageMagick, subnews_attach=1, upload_enabled=1, and a numeric subnews_resize value between 30 and 5000. See the GitHub Security Advisory GHSA-3j33-c9v4-4p42 for additional detail.

Detection Methods for CVE-2026-48997

Indicators of Compromise

  • News submissions where the title begins with shell metacharacters such as $(, backticks, or embedded tab characters
  • Unexpected child processes spawned by the PHP-FPM or web server process, particularly shells launched from convert
  • Outbound network connections originating from the web server immediately after a submit-news upload event

Detection Strategies

  • Inspect web server access logs for POST requests to the submit-news endpoint followed by anomalous process activity
  • Hunt for /bin/sh -c invocations whose arguments include convert together with command substitution syntax in the destination path
  • Review e107 database tables for news titles containing non-printable characters or shell expansion patterns in their first six bytes

Monitoring Recommendations

  • Enable process-level auditing on the web server to capture execve calls referencing convert and child shells
  • Forward web application and process telemetry to a central data lake to correlate submit-news activity with process spawns
  • Alert on any authenticated low-privilege e107 user account that triggers an ImageMagick resize followed by command execution

How to Mitigate CVE-2026-48997

Immediate Actions Required

  • Upgrade e107 to version 2.3.6 or later, as published in the GitHub Release v2.3.6
  • Audit user class memberships to identify accounts assigned to both subnews_class and upload_class
  • Review recent submit-news posts for titles containing shell metacharacters or tab characters

Patch Information

The maintainers fixed the issue in e107 version 2.3.6. The patch properly quotes the destination path passed to the ImageMagick convert command and tightens the title input filter. Refer to the GitHub Security Advisory GHSA-3j33-c9v4-4p42 for upstream remediation details.

Workarounds

  • Set resize_method to a value other than ImageMagick until the patched version is deployed
  • Disable subnews_attach or upload_enabled to block the vulnerable upload path
  • Restrict subnews_class and upload_class membership to trusted administrators only
  • Place subnews_resize outside the exploitable numeric range of 30 to 5000

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.