Skip to main content
Vulnerability Database/CVE-2026-109396

CVE-2026-109396: Thelia CSV Formula Injection Vulnerability

CVE-2026-109396 is a CSV formula injection flaw in Thelia that allows unauthenticated attackers to inject spreadsheet formulas through registration, checkout, or newsletter fields. This post explains its impact, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-109396 Overview

CVE-2026-109396 is a CSV formula injection vulnerability [CWE-1236] in the Thelia e-commerce platform. Versions before 3.1.2 and 3.2.x before 3.2.1 are affected. Unauthenticated visitors can submit crafted values in registration, checkout, or newsletter fields. When an administrator later exports data, the CSVSerializer component writes these values verbatim into CSV files. Opening the export in a spreadsheet application causes the embedded formula to execute in the administrator's context.

Critical Impact

Attacker-supplied strings beginning with =, +, -, or @ execute as spreadsheet formulas on the administrator's workstation when CSV exports are opened, potentially triggering data exfiltration or command execution through DDE and similar features.

Affected Products

  • Thelia versions before 3.1.2
  • Thelia 3.2.x versions before 3.2.1
  • The CSVSerializer component in core/lib/Thelia/Core/Serializer/Serializer/CSVSerializer.php

Discovery Timeline

  • 2026-10-12 - CVE-2026-109396 published to NVD
  • 2026-10-13 - Last updated in NVD database

Technical Details for CVE-2026-109396

Vulnerability Analysis

Thelia accepts user-supplied input through public endpoints such as customer registration, checkout address forms, and newsletter signup. These values are stored and later surfaced through administrative CSV exports. The CSVSerializer class writes each field directly without neutralizing strings that spreadsheet applications interpret as formulas.

When an administrator opens the exported CSV in Microsoft Excel, LibreOffice Calc, or Google Sheets, a cell beginning with =, +, -, or @ is parsed as a formula. The formula executes with the privileges of the administrator's workstation. Attackers can abuse functions like HYPERLINK, WEBSERVICE, or legacy Dynamic Data Exchange (DDE) handlers to exfiltrate data or invoke local commands.

Root Cause

The root cause is missing output neutralization in the CSV serializer. Thelia treated CSV as a passive text format and did not sanitize cell values against spreadsheet formula triggers. Any entry point that stores free-form text and later feeds the exporter inherits the flaw.

Attack Vector

Exploitation requires no authentication. An attacker submits crafted values, for example an address line of =HYPERLINK("http://attacker/x","click") or a phone number starting with +. The payload remains dormant until an administrator triggers an export and opens the resulting file. User interaction on the victim side is required, which is reflected in the low CVSS 4.0 base score.

php
 namespace Thelia\Core\Serializer\Serializer;

 use Thelia\Core\Serializer\AbstractSerializer;
+use Thelia\Domain\DataTransfer\Export\SpreadsheetFormulaGuard;

 /**
  * Class CSVSerializer.
  *
+ * A CSV file is opened in a spreadsheet, so a text cell the spreadsheet would run as a
+ * formula is written as text, whatever export produced it.
+ *
  * @author Jérôme Billiras <jbilliras@openstudio.fr>
  */
 class CSVSerializer extends AbstractSerializer

Source: GitHub Commit 6e46059

Detection Methods for CVE-2026-109396

Indicators of Compromise

  • Stored customer records (names, addresses, phone numbers, newsletter subscriptions) whose values begin with =, +, -, @, tab (\t), or carriage return (\r).
  • Administrator workstation processes spawned by excel.exe, soffice.bin, or browser Sheets handlers shortly after opening a Thelia CSV export.
  • Outbound network connections initiated by spreadsheet processes to unknown domains, consistent with WEBSERVICE or HYPERLINK abuse.

Detection Strategies

  • Query the Thelia database for customer and newsletter fields matching the regex ^[=+\-@\t\r] to surface stored payloads.
  • Monitor endpoint telemetry for spreadsheet applications spawning cmd.exe, powershell.exe, wscript.exe, or performing DNS lookups to non-corporate domains.
  • Review web application logs for POST requests to registration, checkout, and newsletter endpoints containing leading formula trigger characters.

Monitoring Recommendations

  • Alert on any CSV export generated by Thelia administrators and correlate with subsequent child processes of spreadsheet binaries on admin workstations.
  • Track Office protected view bypass events and macro or external data warnings dismissed shortly after opening Thelia exports.
  • Baseline normal administrator export activity and flag unusual bursts that may indicate reconnaissance by an attacker testing the payload.

How to Mitigate CVE-2026-109396

Immediate Actions Required

  • Upgrade Thelia to version 3.1.2 or 3.2.1 depending on the installed branch.
  • Instruct administrators to open exports only in a sandboxed environment until the upgrade is complete.
  • Scan existing customer, address, and newsletter tables for stored formula payloads and sanitize or quarantine them before the next export.

Patch Information

The fix was released in Thelia 3.1.2 and 3.2.1. The patch introduces a new SpreadsheetFormulaGuard class invoked by CSVSerializer to neutralize values beginning with formula triggers (=, +, -, @, \t, \r) while preserving legitimate signed numbers. Technical details are available in the GitHub Security Advisory GHSA-gcgv-f8rf-w2wc and the VulnCheck advisory.

php
+namespace Thelia\Domain\DataTransfer\Export;
+
+/**
+ * Keeps a text a spreadsheet would run as a formula from being run when the export is
+ * opened: a leading quote makes it a plain text cell again.
+ */
+final class SpreadsheetFormulaGuard
+{
+    private const array FORMULA_TRIGGERS = ['=', '+', '-', '@', "\t", "\r"];
+
+    private const string PLAIN_NUMBER = '/^[+-]?[0-9]+(?:[.,][0-9]+)?$/D';
+
+    public static function neutralize(mixed $value): mixed

Source: GitHub Commit 6e46059 - SpreadsheetFormulaGuard

Workarounds

  • Apply input validation on registration, checkout, and newsletter endpoints to reject values starting with formula trigger characters until patching is possible.
  • Convert CSV exports to a non-executable format such as PDF or open them in a text editor instead of a spreadsheet application.
  • Disable Dynamic Data Exchange (DDE) and external content features in Microsoft Excel, and enforce protected view for files downloaded from administrative interfaces.
bash
# Upgrade Thelia using Composer
composer require thelia/thelia:^3.2.1
# Or for the 3.1 branch
composer require thelia/thelia:^3.1.2

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.