Description
Caddy is an extensible server platform that uses TLS by default. Prior to 2.11.4, Caddy’s stripHTML template function cannot reliably remove all HTML tags from input strings. Certain malformed HTML, such as <<>img src=x onerror=alert()>, can bypass the tag-stripping logic, potentially leaving dangerous content in the output if it is later rendered as HTML. This may allow client-side XSS in cases where untrusted strings are rendered unsafely. This vulnerability is fixed in 2.11.4.
Published: 2026-06-23
Score: 4.2 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Prior to 2.11.4, Caddy’s stripHTML template function fails to reliably remove all HTML tags from input strings. Malformed HTML, such as <<>img src=x onerror=alert()>, can bypass the stripping logic, potentially leaving dangerous content in the output if it is later rendered as HTML. This allows client‑side XSS when untrusted strings are rendered unsafely. The vulnerability is fixed in 2.11.4, and the platform uses TLS by default, but the flaw remains until the update. The flaw is an instance of improper string manipulation (CWE‑116).

Affected Systems

Affected systems are all installations of Caddy running before the patch release 2.11.4. The vulnerability affects the core server engine supplied by the caddyserver:Caddy CNA, and any instance that uses the stripHTML template helper within its page rendering logic. Version information is limited to the release line; earlier versions (e.g., 2.11.3 and under) are considered vulnerable, while 2.11.4 and later include the fix.

Risk and Exploitability

The CVSS score of 4.2 indicates a moderate impact. EPSS data is not available, and the vulnerability is not listed in the CISA KEV catalog, suggesting no documented exploitation yet. The likely attack vector is an attacker inserting crafted content into a template variable that is renderedoitation requires the ability to influence template input; if the application uses templating to display untrusted data without proper escaping, the vulnerability can be leveraged to execute malicious scripts in users’ browsers.

Generated by OpenCVE AI on June 24, 2026 at 10:21 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Caddy to version 2.11.4 or later to apply the official fix.
  • Disable the stripHTML template helper if it is not required by the application.
  • Validate and sanitize any user‑supplied content prior to rendering it as HTML, using a trusted HTML sanitizer or strict escaping mechanisms.

Generated by OpenCVE AI on June 24, 2026 at 10:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-vcc4-2c75-vc9v Caddy: stripHTML template function bypass
History

Tue, 23 Jun 2026 22:15:00 +0000

Type Values Removed Values Added
First Time appeared Caddyserver
Caddyserver caddy
Vendors & Products Caddyserver
Caddyserver caddy

Tue, 23 Jun 2026 18:15:00 +0000

Type Values Removed Values Added
Description Caddy is an extensible server platform that uses TLS by default. Prior to 2.11.4, Caddy’s stripHTML template function cannot reliably remove all HTML tags from input strings. Certain malformed HTML, such as <<>img src=x onerror=alert()>, can bypass the tag-stripping logic, potentially leaving dangerous content in the output if it is later rendered as HTML. This may allow client-side XSS in cases where untrusted strings are rendered unsafely. This vulnerability is fixed in 2.11.4.
Title Caddy: stripHTML template function bypass
Weaknesses CWE-116
References
Metrics cvssV3_1

{'score': 4.2, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N'}


Subscriptions

Caddyserver Caddy
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-06-23T17:47:30.387Z

Reserved: 2026-06-08T18:41:27.724Z

Link: CVE-2026-52846

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-06-24T10:30:14Z

Weaknesses
  • CWE-116

    Improper Encoding or Escaping of Output