CVE-2026-52846: CWE-116: Improper Encoding or Escaping of Output in caddyserver caddy
CVE-2026-52846 is a vulnerability in the Caddy web server prior to version 2.11.4. The issue lies in the stripHTML template function, which fails to reliably remove all HTML tags from input strings. Malformed HTML inputs can bypass this tag-stripping logic, potentially allowing dangerous content to remain in output rendered as HTML. This may lead to client-side cross-site scripting (XSS) if untrusted strings are rendered unsafely. The vulnerability has a medium severity with a CVSS score of 4.2 and is fixed in version 2.11.4.
AI Analysis
Technical Summary
The vulnerability CVE-2026-52846 affects the Caddy server's stripHTML template function in versions prior to 2.11.4. This function is intended to remove HTML tags from input strings but can be bypassed by certain malformed HTML inputs, such as <<>img src=x onerror=alert()>. This improper encoding or escaping of output (CWE-116) may allow client-side XSS attacks when untrusted strings are rendered without proper sanitization. The issue is resolved in Caddy version 2.11.4.
Potential Impact
If exploited, this vulnerability could allow an attacker to inject malicious HTML or script code into web pages rendered by Caddy, potentially leading to client-side cross-site scripting (XSS). This could result in limited confidentiality and integrity impacts on users viewing the affected content. The CVSS score of 4.2 reflects a medium severity with network attack vector, high attack complexity, no privileges required, and user interaction needed.
Mitigation Recommendations
A fix is available in Caddy version 2.11.4. Users should upgrade to version 2.11.4 or later to remediate this vulnerability. No other official remediation or temporary fixes are indicated. Until upgraded, avoid rendering untrusted input using the stripHTML function or apply additional sanitization measures.
CVE-2026-52846: CWE-116: Improper Encoding or Escaping of Output in caddyserver caddy
Description
CVE-2026-52846 is a vulnerability in the Caddy web server prior to version 2.11.4. The issue lies in the stripHTML template function, which fails to reliably remove all HTML tags from input strings. Malformed HTML inputs can bypass this tag-stripping logic, potentially allowing dangerous content to remain in output rendered as HTML. This may lead to client-side cross-site scripting (XSS) if untrusted strings are rendered unsafely. The vulnerability has a medium severity with a CVSS score of 4.2 and is fixed in version 2.11.4.
CVSS v3.1
Score 4.2medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability CVE-2026-52846 affects the Caddy server's stripHTML template function in versions prior to 2.11.4. This function is intended to remove HTML tags from input strings but can be bypassed by certain malformed HTML inputs, such as <<>img src=x onerror=alert()>. This improper encoding or escaping of output (CWE-116) may allow client-side XSS attacks when untrusted strings are rendered without proper sanitization. The issue is resolved in Caddy version 2.11.4.
Potential Impact
If exploited, this vulnerability could allow an attacker to inject malicious HTML or script code into web pages rendered by Caddy, potentially leading to client-side cross-site scripting (XSS). This could result in limited confidentiality and integrity impacts on users viewing the affected content. The CVSS score of 4.2 reflects a medium severity with network attack vector, high attack complexity, no privileges required, and user interaction needed.
Mitigation Recommendations
A fix is available in Caddy version 2.11.4. Users should upgrade to version 2.11.4 or later to remediate this vulnerability. No other official remediation or temporary fixes are indicated. Until upgraded, avoid rendering untrusted input using the stripHTML function or apply additional sanitization measures.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-08T18:41:27.724Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a3acbe4eed863c81e6c9a57
Added to database: 06/23/2026, 18:09:40 UTC
Last enriched: 06/23/2026, 18:24:52 UTC
Last updated: 06/23/2026, 18:30:56 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.