You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reflected XSS occurs when an application includes untrusted data in the HTML response sent to the user’s browser. In this case, the provided /admin%22%3E%3Cscript%3Ealert(document.domain)%3C/script%3E/admin/login or /settings/mfa/delete/<img%20src=x%20onerror=alert(document.domain)> API calls trigger an alert. An attacker can exploit this vulnerability to execute arbitrary JavaScript code within the target user’s browser, potentially leading to further attacks such as session hijacking.
Example request-response cycle that triggers alert:
GET /adminhxuk8%22%3e%3cscript%3ealert(document.domain)%3c/script%3ecsdz9/admin/login HTTP/2Host: internal.caddysecurity.portalCookie: AUTHP_SESSION_ID=XYZUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.199 Safari/537.36Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
To immediately address this issue, strategically treat all string values as potentially untrustworthy, regardless of their source, and escape them properly (using the safehtml/template package that generates output-safe HTML).
In addition to that remediation, we also suggest a few different ways to improve defense in depth:
Consider using the Active Scanner from Burp Suite Professional in a testing environment for all API calls. Additionally, use the scanning with a live task strategy to have underlying requests scanned automatically when interacting with the web interface.
Expand the caddy-security documentation to promote security headers—especially the Content Security Policy (CSP) header that controls which resources can be loaded by the browser, limiting the impact of potential XSS attacks.
More information about the issue and our public disclosure:
Severity: High
Reflected XSS occurs when an application includes untrusted data in the HTML response sent to the user’s browser. In this case, the provided
/admin%22%3E%3Cscript%3Ealert(document.domain)%3C/script%3E/admin/login
or/settings/mfa/delete/<img%20src=x%20onerror=alert(document.domain)>
API calls trigger an alert. An attacker can exploit this vulnerability to execute arbitrary JavaScript code within the target user’s browser, potentially leading to further attacks such as session hijacking.Example request-response cycle that triggers alert:
To immediately address this issue, strategically treat all string values as potentially untrustworthy, regardless of their source, and escape them properly (using the
safehtml/template
package that generates output-safe HTML).In addition to that remediation, we also suggest a few different ways to improve defense in depth:
More information about the issue and our public disclosure:
The text was updated successfully, but these errors were encountered: