HIGH 7.1

CVE-2026-48997: e107 CMS Command Injection via ImageMagick Resize Destination Path

e107 is a content management system widely used for building websites and managing content. A vulnerability in versions 2.3.5 and earlier allows authenticated users to inject shell commands during the image resizing process. When news articles with attachments are uploaded, the system uses ImageMagick to resize images. The vulnerability exists because the destination filename for the resized image is constructed from the news article title without proper escaping. An attacker can craft a malicious title containing shell metacharacters (like backticks or variable expansion syntax) that will be executed by the underlying shell, potentially giving them control over the server. This only affects installations using specific ImageMagick settings and requires an authenticated account with sufficient permissions.

Source data · NVD / CISA · public domain

CVSS
3.1 · 7.1 HIGH · CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:H
Weaknesses (CWE)
CWE-78
Affected products
0 configuration(s)
Published / Modified
2026-06-17 / 2026-06-23

NVD description (verbatim)

e107 is a content management system (CMS). Versions 2.3.5 and earlier contain a command injection vulnerability in the ImageMagick resize destination path. In resize_image(), the source path is escaped with escapeshellarg(), but the destination path is inserted inside raw double quotes in the convert command; in the submit-news upload flow, that destination filename includes the first six characters of user-controlled news title input. Because the title filter removes literal spaces but not tab characters, and shell expansions such as $(...) and backticks can survive into the quoted destination argument, /bin/sh -c may evaluate attacker-controlled input. Exploitation is possible only when all of the following non-default settings are enabled: resize_method=ImageMagick, subnews_attach=1, upload_enabled=1, subnews_resize is numeric between 30 and 5000, and the attacker is a non-admin in classes permitted by both subnews_class and upload_class. This issue has been fixed in version 2.3.6.

3 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vulnerability resides in the resize_image() function within e107's image processing workflow. While the source path is properly escaped using escapeshellarg(), the destination path is constructed by inserting user-controlled input directly into double-quoted arguments of a shell convert command invocation. In the news submission flow, the destination filename incorporates the first six characters of the news title parameter. The input validation removes literal space characters but does not strip or escape tab characters or shell expansion sequences such as $(...) and backticks. When these survive into the quoted destination argument, /bin/sh -c will evaluate them as code. Exploitation requires: resize_method set to 'ImageMagick', subnews_attach enabled, upload_enabled active, subnews_resize set to a numeric value between 30 and 5000 pixels, and the attacker possessing a user account in a class permitted by both subnews_class and upload_class permissions. Admin accounts are not affected.

Business impact

Successful exploitation could allow an attacker to execute arbitrary commands with the privileges of the web server process, potentially leading to data theft, unauthorized modification of content, installation of malware, or lateral movement within the network. Given the prevalence of e107 in small and medium-sized business websites, a widespread deployment could result in coordinated defacement or data loss. The impact is heightened because compromised servers may serve as pivot points for supply-chain attacks or further infrastructure compromise.

Affected systems

e107 CMS version 2.3.5 and all earlier versions are affected. Exploitation requires a non-administrative user account and specific server configuration: ImageMagick must be the configured image resize method (not the default GD library), the news module must permit file attachments (subnews_attach enabled), uploads must be globally enabled (upload_enabled active), the subnews_resize dimension setting must be a numeric value between 30 and 5000 pixels, and the attacker must be in a user class authorized by both subnews_class and upload_class permissions. Systems using the default GD-based image resizing, those without news attachments enabled, or those restricting upload permissions to admin-only are not vulnerable.

Exploitability

While exploitation requires authentication and several non-default configuration flags to be enabled simultaneously, the barrier to entry is moderate rather than high. Any valid user account (even with limited permissions) can attempt exploitation if their class membership intersects the configured subnews_class and upload_class restrictions. The attack vector is straightforward: inject shell metacharacters into the news title field during article submission. The complexity derives from the conjunction of prerequisite settings, which may be less common in default installations but are often enabled on sites requiring robust image handling and community content submission. Organizations running multi-user e107 installations with contributor workflows face elevated risk.

Remediation

Upgrade to e107 version 2.3.6 or later, which addresses the destination path escaping issue. If immediate patching is not feasible, disable one or more of the prerequisite settings: set resize_method to the default GD library instead of ImageMagick, disable subnews_attach to prevent file uploads with news submissions, set upload_enabled to false, or restrict subnews_class and upload_class permissions to administrators only. Additionally, implement strict input validation or filtering on the news title field to reject shell metacharacters and tab characters at the application level.

Patch guidance

e107 version 2.3.6 or later contains the fix. Administrators should verify their current version via the admin panel or by checking the version constant in e107_config.php. Test the upgrade in a staging environment first, particularly if the site uses custom plugins or themes that may interact with image processing. No configuration changes are required after patching; the fix applies automatically.

Detection guidance

Monitor web server logs and application logs for unusual image processing activity, particularly convert command invocations with unexpected characters or patterns in filenames. Intrusion detection systems can alert on payloads containing backticks, $(...), or other shell metacharacters in HTTP parameters, especially those submitted to news submission endpoints. Search uploaded images or temporary directories for files with suspicious names containing shell syntax. Review authentication logs for new low-privilege accounts created around the time of a potential breach, as attackers typically establish persistence through dedicated accounts.

Why prioritize this

This vulnerability merits prompt attention because it enables unauthenticated code execution on affected systems via a relatively accessible attack surface (user-submitted content). Although exploitation depends on multiple non-default settings, the aggregate prevalence of e107 and the likelihood that some installations enable community-contributed content and robust image processing creates meaningful risk. The CVSS 3.1 score of 7.1 (HIGH) reflects high impact on confidentiality and integrity, moderate access complexity, and the requirement for local authentication. Organizations running community-driven e107 sites should prioritize patching.

Risk score, explained

The CVSS 3.1 score of 7.1 reflects: Network attack vector (AV:N), allowing remote exploitation; High access complexity (AC:H) due to the requirement for multiple non-default configuration flags to be present simultaneously; Low privilege requirement (PR:L) because any authenticated user in the correct classes can attempt the attack; No user interaction needed (UI:N); and significant impact: Low confidentiality (C:L), High integrity (I:H), and High availability (A:H) if the attacker leverages code execution to modify content or disable services. The score does not fall to CRITICAL because the AC:H factor substantially constrains the real-world attack surface, and exploitation is limited to installations that have explicitly enabled ImageMagick resizing and community uploads.

Frequently asked questions

Our e107 site uses ImageMagick for resizing but news attachments are disabled. Are we vulnerable?

No. The vulnerability specifically affects the news submission upload flow. If subnews_attach is disabled, the vulnerable code path is not reached. However, verify your configuration in the admin panel to confirm attachments are truly disabled, and consider upgrading anyway if you plan to enable them in the future.

Do we need to roll back recent uploads or check for backdoors?

If your installation was vulnerable and exposed to untrusted users, assume potential compromise. Check web server logs and process histories around the time of any detected anomalies for evidence of command execution. If you discover suspicious activity, perform a full security audit, review file integrity, and consider restoring from a known-clean backup. Patching alone does not remove any attacker-installed backdoors.

Can this vulnerability be exploited by unauthenticated users?

No, exploitation requires a valid user account. However, if your e107 site permits user registration (which many community sites do), an attacker can register a free account and attempt exploitation. If you allow public registration, consider rate-limiting registration or requiring email verification to slow account creation.

We use GD for image resizing instead of ImageMagick. Should we patch?

This specific vulnerability does not affect GD-based image processing. However, patching is still recommended to stay current on security best practices and to prepare for any future configuration changes. Additionally, other vulnerabilities may be present in e107 versions prior to 2.3.6.

This analysis is based on the CVE description and publicly available information as of the publication date. SEC.co does not provide legal advice, warranty, or guarantee of security outcomes. Administrators must verify patch availability and compatibility with their specific e107 version and customizations before deployment. Testing in a non-production environment is strongly recommended. No exploit code or weaponized proof-of-concept is provided or endorsed. Organizations are responsible for assessing their own risk and implementing appropriate controls. Source: NVD (public-domain), retrieved 2026-07-27. Analysis generated by SEC.co (claude-haiku-4-5).