Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. bolt/bolt
  4. ›
  5. CVE-2021-40219

CVE-2021-40219: Improper Control of Generation of Code ('Code Injection')

April 11, 2022 (updated April 15, 2022)

Bolt CMS <= 4.2 is vulnerable to Remote Code Execution. Unsafe theme rendering allows an authenticated attacker to edit theme to inject server-side template injection that leads to remote code execution.

References

  • boltcms.com/
  • github.com/bolt/core
  • github.com/bolt/core/blob/3b21a73ebf519b76756d3ad2841312d10ef11461/src/Controller/Frontend/TemplateController.php
  • github.com/iiSiLvEr/CVEs/tree/main/CVE-2021-40219
  • nvd.nist.gov/vuln/detail/CVE-2021-40219

Code Behaviors & Features

Detect and mitigate CVE-2021-40219 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions up to 4.2.0

Fixed versions

  • 4.2.1

Solution

Upgrade to version 4.2.1 or above.

Impact 8.8 HIGH

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

packagist/bolt/bolt/CVE-2021-40219.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:31 +0000.