CVE-2026-21448
PHP vulnerability analysis and mitigation

Overview

CVE-2026-21448 is a Server-Side Template Injection (SSTI) vulnerability in Bagisto, an open-source Laravel eCommerce platform developed by Webkul. It affects all versions prior to 2.3.10 and allows a low-privileged (normal customer) user to inject malicious template expressions during the checkout process that are subsequently rendered in the admin view, potentially leading to remote code execution (RCE). The vulnerability was published on January 2, 2026, with a patch released the same day in version 2.3.10. It carries a CVSS v3.1 base score of 9.8 (Critical) and a CVSS v4.0 score of 8.9 (High) (Github Advisory, Bagisto Advisory).

Technical details

The vulnerability is classified as CWE-1336 (Improper Neutralization of Special Elements Used in a Template Engine), rooted in insufficient sanitization of user-supplied input in address fields during the order checkout flow (Github Advisory). When a customer adds an address during checkout or via the address management page (/customer/account/addresses/create), template expressions such as {{7*7}} are stored and later rendered unescaped by the Blade template engine in the admin order view (/admin/sales/orders), causing server-side evaluation. The attack requires only a standard customer account (or potentially no account at all during guest checkout) and network access — no elevated privileges or user interaction are needed. Both normal and blind SSTI variants are possible, as confirmed by the advisory's PoC video (Bagisto Advisory). The v2.3.10 release notes confirm the fix involved sanitizing first/last name fields and the type parameter to prevent SSTI (Bagisto Release).

Impact

Successful exploitation allows an attacker to achieve remote code execution on the server hosting the Bagisto application, with the privileges of the web server process. This can result in full compromise of the eCommerce platform, including theft of sensitive customer data (personally identifiable information, payment details), manipulation of orders and product data, and complete system takeover. The attack vector is network-based with no user interaction required, making it highly automatable and scalable against any exposed Bagisto instance running a vulnerable version (Github Advisory, Bagisto Advisory).

Exploitability

A proof-of-concept (PoC) exploit, including a demonstration video, was published alongside the security advisory on January 2, 2026 (Bagisto Advisory). The EPSS score is approximately 0.177% (39th percentile), indicating a moderate near-term exploitation probability (Github Advisory). There is no confirmed evidence of in-the-wild exploitation or threat actor attribution at this time, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. The low barrier to exploitation — requiring only a customer account and network access — makes this a high-priority patching target.

Exploitation steps

  1. Reconnaissance: Identify internet-facing Bagisto instances running versions prior to 2.3.10 using search engines (Shodan, Censys) or by checking the application's version disclosure in source code or headers.
  2. Register or use a guest account: Create a normal customer account on the target Bagisto store, or proceed as a guest if guest checkout is enabled.
  3. Add a product to cart: Browse the storefront and add any product to the shopping cart, then proceed to checkout.
  4. Inject SSTI payload in address fields: At the "Add Address" step during checkout, inject a Blade/Twig template expression (e.g., {{7*7}}) into any address input field (such as first name, last name, or address line). For RCE, use a more advanced payload such as {{system('id')}} or equivalent Laravel/Blade-compatible expressions.
  5. Alternatively, inject via address management: Navigate to /customer/account/addresses/create and inject the payload into address fields directly.
  6. Trigger admin rendering: The injected payload is stored and rendered when an admin views the order at /admin/sales/orders. The template engine evaluates the expression server-side, returning the result (e.g., 49 for {{7*7}}).
  7. Escalate to RCE: Replace the test payload with a command execution payload to spawn a reverse shell, exfiltrate data, or establish persistence on the server (Bagisto Advisory, Github Advisory).

Indicators of compromise

  • Network: Unusual outbound connections from the web server process to external IPs (potential reverse shell activity); HTTP POST requests to /customer/checkout/ or /customer/account/addresses/create containing template syntax characters such as {{, }}, {%, or %}.
  • Logs: Laravel/application logs showing template rendering errors or unexpected evaluated expressions in order address fields; admin access logs showing repeated visits to /admin/sales/orders shortly after suspicious customer address submissions.
  • File System: Unexpected new files (web shells, scripts) written to the Bagisto public/ or storage/ directories by the web server process; modified PHP files in the application directory.
  • Process: Unusual child processes spawned by the PHP-FPM or Apache/Nginx worker process (e.g., bash, sh, curl, wget, python) indicating command execution via SSTI.
  • Database: Address records in the database containing template syntax strings (e.g., {{, }}) in name or address fields (Bagisto Advisory).

Mitigation and workarounds

Upgrade Bagisto to version 2.3.10 or later, which patches the SSTI vulnerability by sanitizing user input in first/last name fields, the type parameter, and other address-related inputs before template rendering (Bagisto Release). No official configuration-based workaround has been published; upgrading is the only recommended remediation. As a defense-in-depth measure, implement a Web Application Firewall (WAF) rule to block requests containing template injection patterns ({{, }}, {%, %}) in form fields, and restrict admin panel access to trusted IP ranges.

Community reactions

The vulnerability was disclosed by Webkul's security team (devansh-webkul) via GitHub's security advisory process on January 2, 2026, with a coordinated patch release on the same day (Bagisto Advisory). A technical write-up was published at infinitsec.net shortly after disclosure, detailing both normal and blind SSTI exploitation paths. The vulnerability was picked up by standard CVE tracking feeds (Vulners, CIRCL, CVEFeed) within hours of publication, indicating broad community awareness. No significant controversy or notable researcher commentary beyond the initial disclosure has been observed.

Additional resources


SourceThis report was generated using AI

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-44741HIGH8.8
  • PHP logoPHP
  • pimcore/admin-ui-classic-bundle
NoYesAug 12, 2026
CVE-2026-47233MEDIUM6.5
  • PHP logoPHP
  • admidio/admidio
NoYesAug 12, 2026
CVE-2026-47132MEDIUM5.4
  • PHP logoPHP
  • thorsten/phpmyfaq
NoYesAug 12, 2026
CVE-2026-47234MEDIUM4.4
  • PHP logoPHP
  • admidio/admidio
NoYesAug 12, 2026
CVE-2026-49262LOW3
  • PHP logoPHP
  • aimeos/pagible
NoYesAug 12, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management