CVE-2022-40199:
EC-CUBE Directory traversal vulnerability
2.7
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.62145%
CWE
Published
9/28/2022
Updated
4/25/2024
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:N/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
ec-cube/ec-cube | composer | >= 3.0.0, <= 3.0.18-p4 | |
ec-cube/ec-cube | composer | >= 4.0.0, <= 4.1.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability manifests in three key locations shown in the patch diffs: 1) FileController
's directory validation
lacked '..' checking before realpath()
, 2) PaymentController
's file handling accepted unsanitized paths, and 3) ProductType
's image validation
didn't detect traversal sequences. All were patched by adding explicit '..' checks via strpos()
, directly addressing the path traversal vulnerability. The functions handle user-controlled path inputs and were missing essential sanitization, matching both the CWE-22 description and the vendor's patch analysis.