CVE-2026-52846
published 2026-06-23CVE-2026-52846: 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…
PriorityP420medium4.2CVSS 3.1
AVNACHPRNUIRSUCLILAN
EPSS
0.15%
4.9th percentile
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.
Affected
3 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| caddyserver | caddy | < 2.11.4 | 2.11.4 |
| github.com | caddyserver_caddy | 0 – 1.0.5 | — |
| github.com | caddyserver_caddy_v2 | >= 0 < 2.11.4 | 2.11.4 |
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
VulDB
caddyserver caddy up to 2.11.3 cross site scripting (GHSA-vcc4-2c75-vc9v)
vuldb·2026-06-23·CVSS 4.2
CVE-2026-52846 [MEDIUM] caddyserver caddy up to 2.11.3 cross site scripting (GHSA-vcc4-2c75-vc9v)
A vulnerability, which was classified as problematic, has been found in caddyserver caddy up to 2.11.3. Impacted is an unknown function. Performing a manipulation results in cross site scripting.
This vulnerability is cataloged as CVE-2026-52846. It is possible to initiate the attack remotely. There is no exploit available.
It is advisable to upgrade the affected component.
GHSA
Caddy: stripHTML template function bypass
ghsa·2026-06-16
CVE-2026-52846 [MEDIUM] CWE-116 Caddy: stripHTML template function bypass
Caddy: stripHTML template function bypass
### Summary
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.
---
### Details
The vulnerability originates from `funcStripHTML` in:
[caddy/caddy/caddyhttp/templates/tplcontext.go](https://github.com/caddyserver/caddy/blob/77e9ce7404c4a76853e101a9f5687a929ee56654/modules/caddyhttp/templates/tplcontext.go)
```go
func (TemplateContext) funcStripHTML(s string) string {
var buf bytes.Buffer
var inTag, inQuotes bool
var tagStart int
for i,
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
2026-06-23
Published