---
id: CVE-2021-40219
title: Bolt CMS <= 4.2 is vulnerable to Remote Code Execution
summary: >-
  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.
severity: high
cvss: 8.8
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'
cwe:
  - CWE-94
vendor: bolt
product: bolt_cms
affected:
  - bolt_cms <= 4.2.0
published: '2022-04-11'
updated: '2026-07-05'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2021-40219'
references:
  - url: 'https://github.com/bolt/core'
    label: cve@mitre.org
  - url: >-
      https://github.com/bolt/core/blob/3b21a73ebf519b76756d3ad2841312d10ef11461/src/Controller/Frontend/TemplateController.php
    label: cve@mitre.org
  - url: 'https://github.com/iiSiLvEr/CVEs/tree/main/CVE-2021-40219'
    label: cve@mitre.org
  - url: 'http://boltcms.com'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://github.com/bolt/core'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://github.com/bolt/core/blob/3b21a73ebf519b76756d3ad2841312d10ef11461/src/Controller/Frontend/TemplateController.php
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://github.com/iiSiLvEr/CVEs/tree/main/CVE-2021-40219'
    label: af854a3a-2127-422b-91ae-364da2661108
tags:
  - nvd
epss: 0.03428
epssPercentile: 0.88453
ingestedAt: '2026-07-06T17:03:24.146Z'
---

## Overview

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.

## Affected

- `bolt_cms <= 4.2.0`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
