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.19%
8.7th 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 |
CVSS provenance
nvdv3.14.2MEDIUMCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N
vendor_redhat4.2MEDIUM
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,
Red Hat
github.com/caddyserver/caddy: Caddy: Client-side Cross-Site Scripting (XSS) due to incomplete HTML tag stripping
vendor_redhat·2026-06-23·CVSS 4.2
CVE-2026-52846 [MEDIUM] CWE-79 github.com/caddyserver/caddy: Caddy: Client-side Cross-Site Scripting (XSS) due to incomplete HTML tag stripping
github.com/caddyserver/caddy: Caddy: Client-side Cross-Site Scripting (XSS) due to incomplete HTML tag stripping
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.
A flaw was found in Caddy, an extensible server platform. The `stripHTML` template function, intended to remove HTML tags from input, fails to reliably process certain malformed HTML. This oversight allo
No detection rules found.
No public exploits indexed.
Bugzilla
CVE-2026-52846 caddy: Caddy: Client-side Cross-Site Scripting (XSS) due to incomplete HTML tag stripping [fedora-all]
bugzilla·2026-07-13·CVSS 4.2
CVE-2026-52846 [MEDIUM] CVE-2026-52846 caddy: Caddy: Client-side Cross-Site Scripting (XSS) due to incomplete HTML tag stripping [fedora-all]
CVE-2026-52846 caddy: Caddy: Client-side Cross-Site Scripting (XSS) due to incomplete HTML tag stripping [fedora-all]
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.
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 vulnerab
Bugzilla
CVE-2026-52846 caddy: Caddy: Client-side Cross-Site Scripting (XSS) due to incomplete HTML tag stripping [epel-all]
bugzilla·2026-07-13·CVSS 4.2
CVE-2026-52846 [MEDIUM] CVE-2026-52846 caddy: Caddy: Client-side Cross-Site Scripting (XSS) due to incomplete HTML tag stripping [epel-all]
CVE-2026-52846 caddy: Caddy: Client-side Cross-Site Scripting (XSS) due to incomplete HTML tag stripping [epel-all]
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.
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 vulnerabil
Bugzilla
CVE-2026-52846 github.com/caddyserver/caddy: Caddy: Client-side Cross-Site Scripting (XSS) due to incomplete HTML tag stripping
bugzilla·2026-06-23·CVSS 4.2
CVE-2026-52846 [MEDIUM] CVE-2026-52846 github.com/caddyserver/caddy: Caddy: Client-side Cross-Site Scripting (XSS) due to incomplete HTML tag stripping
CVE-2026-52846 github.com/caddyserver/caddy: Caddy: Client-side Cross-Site Scripting (XSS) due to incomplete HTML tag stripping
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.
2026-06-23
Published