cve.bz

CVE-2026-52846 caddyserver caddy: Improper Encoding or Escaping of Output

4.2 mediumExploit referenceEPSS 0.2%Fix available

Medium (4.2) in caddyserver caddy. EPSS 0.2% estimated probability of exploitation activity in the next 30 days. Fixed in github.com/caddyserver/caddy/v2 2.11.4.

On this page
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.

Severity

CVSS 3.1

4.2 medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N
EPSS
0.2% (unchanged from 0.2% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 16th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: partial, assessed 2026-06-25. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-116 Improper Encoding or Escaping of Output
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-52846 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-52846?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-52846?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-52846 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
caddyserver:caddybefore 2.11.4

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-vcc4-2c75-vc9vGogithub.com/caddyserver/caddy/v2<2.11.42.11.4
GHSA-vcc4-2c75-vc9vGogithub.com/caddyserver/caddy<=1.0.5no fix published
GO-2026-5660Gogithub.com/caddyserver/caddy/v2<2.11.42.11.4

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12caddy2.6.2-5+deb12u1DEBIAN-CVE-2026-52846 DLA-4857-1
Debian13caddy2.6.2-12+deb13u1DEBIAN-CVE-2026-52846 DSA-6429-1
Debian14caddy2.11.4-1DEBIAN-CVE-2026-52846
Ubuntu25.10, 26.10, Pro:24.04:LTS and 1 morecaddyno fix listedUBUNTU-CVE-2026-52846
SUSELinux Enterprise Server 16.0, Linux Enterprise Server for SAP applications 16.0govulncheck-vulndb0.0.20260727T201416-160000.1.1SUSE-SU-2026:23216-1 SUSE-SU-2026:23227-1
openSUSELeap 16.0govulncheck-vulndb0.0.20260727T201416-160000.1.1openSUSE-SU-2026:21551-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

Caddy's stripHTML template function fails to reliably strip malformed HTML, which can lead to client-side XSS if untrusted input is rendered through Caddy's `templates` directive. Exploitation requires the `templates` directive to be enabled in a Caddyfile with a template that calls stripHTML on untrusted input; Caddy deployments that only use `file_server` for static asset serving never reach the vulnerable function. All investigated Red Hat Insights/console.redhat.com frontend services build and deploy through a shared Caddyfile-generation pipeline (insights-frontend-builder-common) or an equivalent static-file-only configuration that does not enable `templates`, and are therefore not affected. The general-purpose `caddy` package shipped by Fedora/EPEL may be configured with `templates` by downstream users and is marked affected.

Red Hat's mitigation

Users who have enabled Caddy's `templates` directive with untrusted input passed through the stripHTML function should upgrade to Caddy 2.11.4 or later, or disable the `templates` directive if not required.

ProductPackageStateAdvisory
Red Hat Hardened ImagescaddyNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-52846.

Attack patterns (CAPEC)

  • CAPEC-73 User-Controlled Filename Likelihood: High · Severity: High
  • CAPEC-81 Web Server Logs Tampering Likelihood: Medium · Severity: High
  • CAPEC-85 AJAX Footprinting Likelihood: High · Severity: Low
  • CAPEC-104 Cross Zone Scripting Likelihood: Medium · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON