CVE-2026-21450: Bagisto/bagisto Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-9hvg-qw5q-wqwp
CWE-1336
Published
Advisory Summary

CVE-2026-21450 is a HIGH remote code execution vulnerability (CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine) affecting Bagisto/bagisto libraries in the Packagist ecosystem. The issue involves bagisto ssti vulnerability in type parameter can lead to rce. Remediation is available by upgrading affected packages to version 2.3.10.

CVE-2026-21450 at a Glance

CVE Identifier CVE-2026-21450
GHSA Identifier GHSA-9hvg-qw5q-wqwp
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine
Affected Product Bagisto/bagisto
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2026-21450

To remediate this vulnerability, upgrade all affected Bagisto/bagisto dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

bagisto/bagisto fixed: 2.3.10
Upgrade bagisto/bagisto to 2.3.10
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for bagisto/bagisto

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-21450, inspect your project dependencies for Bagisto/bagisto:

inspect dependencies for bagisto/bagisto

Analyze the terminal output to locate any version of Bagisto/bagisto in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.3.10), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine, where the product uses a template engine to insert or process externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements or syntax that can be interpreted as template expressions or other code directives when processed by the engine. In Bagisto/bagisto, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary SSTI is possible in Bagisto via type parameter can lead to RCE and other exploitations. ### Details 1. Go to `http://127.0.0.1:8000/admin/reporting/products/view?type={{7*7}}` <img width="1251" height="282" alt="image" src="https://github.com/user-attachments/assets/652e96f4-631e-4322-8561-63f4d897a480" /> ### Impact Can lead to RCE, command injection.

CVE-2026-21450 Affected Bagisto/bagisto Versions

1 component(s)
Fixed Versions:
2.3.10
Product / Package Ecosystem Affected Versions Fixed Version
bagisto/bagisto
Packagist
< 2.3.10
2.3.10

References

Frequently Asked Questions

What is CVE-2026-21450?
CVE-2026-21450 is a security vulnerability in Bagisto/bagisto involving Bagisto SSTI vulnerability in type parameter can lead to RCE under CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine.
Which Bagisto/bagisto versions are affected?
Affected versions include releases prior to 2.3.10 across affected packages: bagisto/bagisto.
What version fixes CVE-2026-21450?
Upgrading to 2.3.10 (or the latest patched release for your respective branch) resolves the vulnerability.
Is bagisto/bagisto affected?
Yes, bagisto/bagisto is affected in releases prior to 2.3.10. Upgrade your dependency to 2.3.10 or later.
What CWE is associated with CVE-2026-21450?
CVE-2026-21450 is classified under CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine (The product uses a template engine to insert or process externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements or syntax that can be interpreted as template expressions or other code directives when processed by the engine.).
How can I check Packagist dependencies for CVE-2026-21450?
Run the dependency tree command: 'inspect dependencies for bagisto/bagisto'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-9hvg-qw5q-wqwp",
  "modified" : "2026-01-02T21:56:00Z",
  "published" : "2026-01-02T21:56:00Z",
  "aliases" : [ "CVE-2026-21450" ],
  "summary" : "Bagisto SSTI vulnerability in type parameter can lead to RCE",
  "details" : "### Summary\nSSTI is possible in Bagisto via type parameter can lead to RCE and other exploitations.\n\n### Details\n1. Go to `http://127.0.0.1:8000/admin/reporting/products/view?type={{7*7}}`\n\n<img width=\"1251\" height=\"282\" alt=\"image\" src=\"https://github.com/user-attachments/assets/652e96f4-631e-4322-8561-63f4d897a480\" />\n\n\n### Impact\nCan lead to RCE, command injection.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "bagisto/bagisto"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.3.10"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/bagisto/bagisto/security/advisories/GHSA-9hvg-qw5q-wqwp"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-21450"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bagisto/bagisto/commit/3f294b4837595929107d9c1bbd6d5b1222ef9fea"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/bagisto/bagisto"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bagisto/bagisto/releases/tag/v2.3.10"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1336" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-01-02T21:56:00Z",
    "nvd_published_at" : "2026-01-02T21:16:02Z"
  }
}