Ecommerce-CodeIgniter-Bootstrap
CVE-2024-31823
CRITICAL
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Named sink is unlink() path traversal reachable over HTTP in an admin controller, so AV:N/AC:L with PR:L for likely back-office auth; impact is file deletion (I:H/A:H), no read so C:N.
Primary rating from Vendor (mitre).
CVSS VectorVendor: mitre
Lifecycle Timeline
6DescriptionCVE.org
An issue in Ecommerce-CodeIgniter-Bootstrap commit v. d22b54e8915f167a135046ceb857caaf8479c4da allows a remote attacker to execute arbitrary code via the removeSecondaryImage method of the Publish.php component.
AnalysisAI
Remote attackers can abuse the removeSecondaryImage endpoint in kirilkirkov's Ecommerce-CodeIgniter-Bootstrap (snapshot dated 2024-01-02, commit d22b54e) to manipulate the server filesystem through unsanitized POST parameters. NVD classifies this as CWE-94 code injection with a 9.8 CVSS score, but the referenced fix commit shows the removeSecondaryImage method actually passing attacker-controlled folder/image values straight into unlink(), which is an arbitrary file-deletion / path-traversal weakness rather than direct code execution. Publicly available exploit code exists (LioTree gist and write-up) and EPSS is moderate at 1.64% (74th percentile); there is no CISA KEV listing.
Technical ContextAI
The product is a PHP e-commerce storefront built on the CodeIgniter MVC framework with a Bootstrap admin UI, distributed as an open-source GitHub project (CPE cpe:2.3:a:ecommerce-codeigniter-bootstrap_project:ecommerce-codeigniter-bootstrap:2024-01-02). The advisory assigns CWE-94 (Improper Control of Generation of Code / Code Injection). The vulnerable code in application/modules/admin/controllers/ecommerce/Publish.php built a filesystem path by directly concatenating $_POST['folder'] and $_POST['image'] into an attachments/shop_images path and calling unlink() with no canonicalization - a classic path-traversal primitive (CWE-22 in practice). Notably, the SAME patch commit also hardens Languages.php (saveLanguageFiles), where user-supplied php_keys/js_keys were written verbatim into included PHP/JS language files and only later guarded with addslashes()/ctype_alnum; that Languages.php path is the code that genuinely matches the CWE-94 code-injection label, suggesting the CVE may conflate two distinct fixes shipped in one commit.
RemediationAI
Upstream fix available (commit d22b54e8915f167a135046ceb857caaf8479c4da); released patched version not independently confirmed - apply that commit from https://github.com/kirilkirkov/Ecommerce-CodeIgniter-Bootstrap/commit/d22b54e8915f167a135046ceb857caaf8479c4da or pull the latest main branch, since the project ships from Git rather than tagged releases. The patch canonicalizes the deletion path with realpath() and verifies the resolved folder stays within the attachments/shop_images base directory before calling unlink(); it also hardens the Languages.php language-file writer and Orders_model SQL. If you cannot patch immediately: restrict access to the /admin/publish endpoints (enforce and verify admin authentication and, if possible, IP-allowlist the back office), and add a WAF/reverse-proxy rule rejecting removeSecondaryImage POST bodies whose folder or image parameters contain path-traversal sequences (../, encoded variants, absolute paths, or DIRECTORY_SEPARATOR) - note this can break legitimate image removal if folder names legitimately contain such characters. Run the PHP process as a low-privilege user with write access confined to the attachments tree so a traversal cannot delete application or system files.
In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it
sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not
(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear
The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by
ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C
Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au
Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c
Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows
The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1
Same weakness CWE-94 – Code Injection
View allShare
External POC / Exploit Code
Leaving vuln.today