CVE-2025-62417
📋 TL;DR
Bagisto eCommerce platform versions before 2.3.8 accept product data starting with spreadsheet formula characters (=, +, -, @). When exported to CSV and opened in spreadsheet software, these cells are interpreted as formulas, potentially allowing attackers to execute malicious code via Excel exploits or macros. This affects all Bagisto users who export product data.
💻 Affected Systems
- Bagisto
📦 What is this software?
Bagisto by Webkul
⚠️ Risk & Real-World Impact
Worst Case
Remote command execution via Excel OLE/cmd exploits or macros leading to full system compromise, data exfiltration, and lateral movement within the network.
Likely Case
Data exfiltration through Excel formulas that can access local files or network resources, potentially exposing sensitive information.
If Mitigated
Limited to CSV export functionality with no direct server-side impact if proper input validation and output encoding are implemented.
🎯 Exploit Status
Exploitation requires: 1) attacker access to input product data, 2) victim exports to CSV, 3) victim opens CSV in vulnerable spreadsheet software. Older Excel versions with OLE/cmd support are more susceptible.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 2.3.8
Vendor Advisory: https://github.com/bagisto/bagisto/security/advisories/GHSA-jqrp-58fv-w8cq
Restart Required: No
Instructions:
1. Backup your Bagisto installation and database. 2. Update to version 2.3.8 via composer: 'composer require bagisto/bagisto:2.3.8'. 3. Run database migrations if needed: 'php artisan migrate'. 4. Clear cache: 'php artisan optimize:clear'.
🔧 Temporary Workarounds
Input Validation Filter
allAdd server-side validation to strip or escape formula characters from product data inputs.
Implement input sanitization in product controllers to remove or escape =, +, -, @ characters at the beginning of strings.
CSV Export Sanitization
allModify CSV export functionality to prepend formula cells with apostrophe (') to treat as text.
In CSV export code, prepend cells starting with formula characters with single quote: if(preg_match('/^[=+\-@]/', $value)) $value = "'" . $value;
🧯 If You Can't Patch
- Implement strict input validation to reject or sanitize product data containing formula characters at the beginning of strings.
- Educate users to never open exported CSV files directly in spreadsheet software; use text editors or import with 'text' column formatting.
🔍 How to Verify
Check if Vulnerable:
Test by creating a product with name starting with '=HYPERLINK' or similar formula, export to CSV, and check if formula is preserved without sanitization.
Check Version:
php artisan --version | grep Bagisto
Verify Fix Applied:
After patching, repeat vulnerable test - formula characters should be escaped or stripped in CSV output.
📡 Detection & Monitoring
Log Indicators:
- Unusual product names containing formula patterns (=cmd|, =HYPERLINK, etc.) in application logs.
- Multiple CSV export requests for product data.
Network Indicators:
- Outbound connections from spreadsheet software to unusual domains after opening CSV files.
SIEM Query:
source="bagisto_logs" AND (product_name="=*" OR product_name="+*" OR product_name="-*" OR product_name="@*")