CVE-2026-21449

8.8 HIGH

📋 TL;DR

Bagisto eCommerce platform versions before 2.3.10 are vulnerable to server-side template injection (SSTI) through first name and last name fields. This allows low-privilege users to execute arbitrary code on the server. All Bagisto installations using vulnerable versions are affected.

💻 Affected Systems

Products:
  • Bagisto
Versions: All versions prior to 2.3.10
Operating Systems: All platforms running Bagisto
Default Config Vulnerable: ⚠️ Yes
Notes: Requires user registration/login capability to be enabled

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full server compromise leading to data theft, ransomware deployment, or complete system takeover

🟠

Likely Case

Privilege escalation to admin, data exfiltration, or installation of backdoors

🟢

If Mitigated

Limited impact if proper input validation and user privilege separation are in place

🌐 Internet-Facing: HIGH - Bagisto is typically deployed as internet-facing eCommerce software
🏢 Internal Only: MEDIUM - Internal deployments still vulnerable to insider threats

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires low-privilege user account; GitHub advisory includes technical details

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.3.10

Vendor Advisory: https://github.com/bagisto/bagisto/security/advisories/GHSA-mqhg-v22x-pqj8

Restart Required: No

Instructions:

1. Backup your Bagisto installation and database. 2. Update to version 2.3.10 via composer: 'composer require bagisto/bagisto:2.3.10'. 3. Run database migrations if needed: 'php artisan migrate'. 4. Clear cache: 'php artisan cache:clear'.

🔧 Temporary Workarounds

Input Validation Filter

all

Add server-side validation to reject template injection patterns in user profile fields

Add validation rules to UserController to sanitize first_name and last_name fields

Disable User Registration

all

Temporarily disable new user registration to prevent exploitation

Modify config/auth.php to disable registration routes

🧯 If You Can't Patch

  • Implement WAF rules to block template injection patterns in POST requests
  • Restrict user registration to trusted IP addresses only

🔍 How to Verify

Check if Vulnerable:

Check Bagisto version in composer.json or via 'php artisan --version'

Check Version:

grep '"bagisto/bagisto"' composer.json | grep -o '"[0-9.]*"'

Verify Fix Applied:

Confirm version is 2.3.10 or higher and test user profile updates with template injection attempts

📡 Detection & Monitoring

Log Indicators:

  • Unusual template rendering errors
  • User profile updates containing {{, {% or other template syntax
  • PHP execution from unexpected sources

Network Indicators:

  • POST requests to user profile endpoints with template payloads

SIEM Query:

source="web_logs" AND (uri="/customer/account/editPost" OR uri="/admin/customer/*") AND (body CONTAINS "{{.*}}" OR body CONTAINS "{%.*%}")

🔗 References

📤 Share & Export