Описание
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 allows dangerous content to remain in the output, which, if subsequently rendered as HTML, can lead to client-side Cross-Site Scripting (XSS). A remote attacker could exploit this by providing specially crafted input, potentially executing malicious scripts in a user's browser.
Отчет
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.
Меры по смягчению последствий
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.
Затронутые пакеты
| Платформа | Пакет | Состояние | Рекомендация | Релиз |
|---|---|---|---|---|
| Red Hat Hardened Images | caddy | Not affected |
Показывать по
Дополнительная информация
Статус:
EPSS
4.2 Medium
CVSS3
Связанные уязвимости
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.
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.
Caddy is an extensible server platform that uses TLS by default. Prior ...
EPSS
4.2 Medium
CVSS3