GHSA-gpxg-fx2g-qxj2: Kanidm: Stored HTML injection in "passkey-enrolment" partial via displayname → htmx-driven authenticated request forgery
The kanidmd web UI renders the WebAuthn passkey-registration challenge as raw JSON inside an inline <script id="data"> element using the Askama |safe filter. The challenge embeds the account’s displayname, which serde_json serialises without escaping </>. A displayname containing </script> therefore terminates the script element early and injects arbitrary HTML into the credential-update page. Because the page is htmx-driven and the server’s CSP allows 'unsafe-eval', injected hx-* attributes can issue authenticated same-origin API requests with the viewer’s bearer cookie.
References
Code Behaviors & Features
Detect and mitigate GHSA-gpxg-fx2g-qxj2 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →