SQL Injection Vulnerability in osCommerce 2.3.4.1 via Currency Parameter
A critical SQL injection vulnerability in osCommerce version 2.3.4.1 and earlier, assigning it CVE-2019-25497. With a CVSS v4 score of 8.8 (vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA: N), this high-severity flaw (CWE-89: Improper Neutralization of Special Elements used in an SQL Command) enables unauthenticated remote attackers to manipulate database queries via the vulnerable “currency” parameter in the shopping cart functionality.
osCommerce, an open-source PHP-based e-commerce solution popular since the early 2000s, continues to power thousands of online stores despite its age.
The platform’s official website (oscommerce.com) continues to support legacy versions, but this vulnerability underscores the ongoing risks posed by unpatched deployments. Affecting all versions <= 2.3.4.1, the flaw was publicly detailed on February 27, 2026, via ExploitDB (ExploitDB-46328).
Technical Breakdown
The vulnerability resides in shopping_cart.php, where user-supplied input from the currency GET parameter is directly concatenated into SQL queries without proper sanitization or parameterization. This classic blind SQL injection allows attackers to inject payloads that alter query logic, extract sensitive data, or escalate privileges.
A typical exploit begins with a Boolean-based payload that infers database contents bit by bit. For instance, an attacker sends a GET request like:
https://target.com/shopping_cart.php?currency=USD' AND (SELECT 1 FROM (SELECT COUNT(*),CONCAT(0x717a6b7071,(SELECT (ELT(1=1,(SELECT user())))),0x71767a6271,FLOOR(RAND(0)*2))x FROM information_schema.tables GROUP BY x)a)--
This leverages MySQL’s RAND() function to trigger errors, confirming true/false conditions. By chaining such requests, attackers enumerate database schemas, user tables, credentials, and customer data, including emails, orders, and payment details. Advanced payloads could dump entire tables using UNION SELECT or execute time-based blind injections with SLEEP().
Proof-of-concept code from ExploitDB-46328 demonstrates payload construction:
// Example boolean-based extraction
$payload = "USD' AND ASCII(SUBSTRING((SELECT database()),1,1))>64#";
$url = "https://target.com/shopping_cart.php?currency=" . urlencode($payload);
No authentication is required (PR: N), and exploitation is straightforward over the network (AV: N) with low complexity (AC:L). While integrity and availability impacts are low (VI:L, V N confidentiality is severely compromised (: H ), potentially exposing PCI-sensitive data.
Real-World Risks and Attack Scenarios
In a live deployment, attackers could:
- Data Exfiltration: Steal customer PII for phishing or identity theft.
- Privilege Escalation: If admin credentials are dumped, pivot to RCE via file uploads.
- Supply Chain Attacks: Compromise merchant backends hosting thousands of transactions.
osCommerce’s prevalence in small businesses amplifies the threat; Shodan scans reveal ~5,000 exposed instances running vulnerable versions as of late 2025. This echoes persistent issues in legacy PHP apps, where outdated MySQL connectors fail to enforce prepared statements.
Mitigation and Recommendations
Immediate actions include:
- Upgrade to osCommerce Phoenix (v1.0.8.0+), which refactors query handling with PDO.
- Apply WAF rules blocking SQL keywords (e.g., ModSecurity CRS).
- Sanitize inputs server-side: Use
mysqli_real_escape_string()or ideally PDO prepared statements. - Disable unused currency selectors and enable HTTPS-only carts.
Emiroglu credits his discovery to fuzzing SQLmapqlmap, urging admins to audit via VulnCheck’s CVE console. osCommerce maintainers have not yet issued patches for 2.x branches, emphasizing migration.
This incident underscores the perils of end-of-life software in e-commerce. Operators must prioritize patching or decommissioning.
Site: cybersecuritypath.com