CVE-2026-18412

The OpenCart v4.2.0.0 extension installer contains a directory traversal vulnerability

Published Aug 10, 2026 CVSS 3.1 · 9.1 Critical EPSS < 1% KEV · Not listed
Description
OpenCart extensions are uploaded as zip files with .ocmod.zip extensions. Upon installation, the OpenCart v4.2.0.0 extension installer extracts these zip files, but does not validate that the extracted paths stay inside the intended extraction directory. An attacker can craft a malicious extension containing file path traversal sequences, such as ../. With this vulnerability, an attacker can write files, such as a PHP web shell, into the webroot directory.

Analysis

AI-generated

Technical impact

The OpenCart v4.2.0.0 extension installer extracts uploaded ZIP package contents without ensuring that extraction paths stay within the intended directory. An attacker can embed traversal sequences, such as '..\', in a malicious extension file. When the installer processes the payload, it will create files outside the extension directory, including the webroot, allowing the attacker to place a PHP web shell and then execute arbitrary code on the server.

Affected Systems

OpenCart software, version 4.2.0.0. No other versions are explicitly listed as affected, so the issue applies only to this specific release.

Risk and Exploitability

The likely attack vector is uploading a crafted extension through the extension upload interface, which requires privileged or administrative access. The CVSS score is 9.1, indicating a high severity, while the EPSS score of less than 1% reflects a low probability of exploitation in the general population. The vulnerability allows writing executable files the webroot, which can lead to full site compromise. The CISA KEV catalog does not list this vulnerability, yet the potential impact is significant enough to warrant immediate attention.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade OpenCart to a version that includes the directory‑traversal fix.
  • If an upgrade cannot be performed quickly, restrict the extension upload capability to a small set of trusted administrators and disable it for all other users.
  • Implement server‑side path validation for any extension extraction process, ensuring no files are written outside the intended directory.
  • Configure the webroot and extension staging directories with restrictive permissions to prevent execution of newly written PHP files or other dangerous content.

Generated by OpenCVE AI on August 13, 2026 at 05:00 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-20
CWE-22
Type Values Removed Values Added
Weaknesses CWE-22
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 9.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Opencart
Opencart opencart
Vendors & Products Opencart
Opencart opencart
Type Values Removed Values Added
Weaknesses CWE-22
Type Values Removed Values Added
Description OpenCart extensions are uploaded as zip files with .ocmod.zip extensions. Upon installation, the OpenCart v4.2.0.0 extension installer extracts these zip files, but does not validate that the extracted paths stay inside the intended extraction directory. An attacker can craft a malicious extension containing file path traversal sequences, such as ../. With this vulnerability, an attacker can write files, such as a PHP web shell, into the webroot directory.
Title The OpenCart v4.2.0.0 extension installer contains a directory traversal vulnerability
References
Weaknesses
  • CWE-20

    Improper Input Validation

  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Sources

Status
PUBLISHED
Assigner
certcc
Published
Updated
Aug 12, 2026, 3:51 PM
Reserved
Jul 30, 2026, 5:19 PM
Status
Deferred
Published
Aug 10, 2026, 3:17 PM
Modified
Sep 8, 2026, 2:07 PM