{"answers":{"affected":"2 open source packages ship an affected version, including kanidm.","exploited":"There is no known exploitation of GHSA-gpxg-fx2g-qxj2 in the wild and no public exploit code.","fix":"Upgrade kanidm to 1.9.3 or later.","what":"GHSA-gpxg-fx2g-qxj2 is a cross-site scripting vulnerability in kanidm, published on 6 May 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for GHSA-gpxg-fx2g-qxj2 and fix it if it is affected.\n\nWhat it is: GHSA-gpxg-fx2g-qxj2 is a cross-site scripting vulnerability in kanidm, published on 6 May 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of GHSA-gpxg-fx2g-qxj2 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- kanidm (crates.io): affected all versions; fixed in 1.9.3\n- kanidm (crates.io): affected all versions; fixed in 1.9.3\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-gpxg-fx2g-qxj2/ (Markdown: https://insights.sbomify.com/GHSA-gpxg-fx2g-qxj2/index.md)","id":"GHSA-gpxg-fx2g-qxj2","markdown":"https://insights.sbomify.com/GHSA-gpxg-fx2g-qxj2/index.md","name":"GHSA-gpxg-fx2g-qxj2","record":{"aliases":[],"analysis":{"component_type":"server_software","fix_type":"patch","impacts":["privilege_escalation","account_takeover"],"network_reachable":"yes","non_default_config":false,"product_category":"Identity management server","requires_auth":"low_privilege","summary":"An authenticated low-privilege user can inject HTML into another user's passkey page, triggering htmx requests to escalate privileges or take over accounts.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Summary\n\nThe kanidmd web UI renders the WebAuthn passkey-registration challenge as raw JSON inside an inline `\u003cscript id=\"data\"\u003e` element using the Askama `|safe` filter. The challenge embeds the account's `displayname`, which `serde_json` serialises without escaping `\u003c`/`\u003e`. A `displayname` containing `\u003c/script\u003e` 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.\n\n### Impact\n\nAn authenticated attacker who is a member of `idm_people_admins` can write the `displayname` of any `Person` entry — including high-privilege persons — because `idm_acp_people_pii_manage` carries no high-privilege exclusion filter. When the targeted high-privilege user later opens **Add Passkey** on their own credential-update page (`/ui/reset`), the injected markup is swapped into the DOM and htmx fires attacker-chosen same-origin requests authenticated as the victim. This allows a helpdesk-tier operator to escalate to `idm_admins` (e.g. by POSTing themselves into the group) or otherwise act with the victim's session. The self-write path (`idm_people_self_name_write`) is self-XSS only and is not counted toward impact. Even without the htmx vector, the breakout permits `\u003cmeta http-equiv='refresh'\u003e` open-redirect and arbitrary defacement of the credential page.\n\n### Details\n\n- https://github.com/kanidm/kanidm/blob/master/server/core/templates/credential_update_add_passkey_partial.html#L3 — the `|safe` sink\n- https://github.com/kanidm/kanidm/blob/master/server/core/src/https/views/reset.rs#L506-L509 — `serde_json::to_string` of the challenge\n- https://github.com/kanidm/kanidm/blob/master/server/lib/src/idm/credupdatesession.rs#L2453-L2460 — `displayname` flows into `start_passkey_registration`\n\n### Affected versions\n\nAll releases shipping the htmx credential-update views","ecosystems":["crates.io"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"The kanidmd web UI renders the WebAuthn passkey-registration challenge as raw JSON inside an inline `\u003cscript id=\"data\"\u003e` element","id":"GHSA-gpxg-fx2g-qxj2","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"xss","year":"2026"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"crates.io","fixed":["1.9.3"],"introduced":["0"],"last_affected":[],"package":"kanidm","purl":null,"source":"GHSA-gpxg-fx2g-qxj2"},{"ecosystem":"crates.io","fixed":["1.9.3"],"introduced":["0"],"last_affected":[],"package":"kanidm","purl":"pkg:cargo/kanidm","source":"GHSA-gpxg-fx2g-qxj2"}],"products":null,"published":"2026-05-06","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"An authenticated low-privilege user can inject HTML into another user's passkey page, triggering htmx requests to escalate privileges or take over accounts.","url":"https://insights.sbomify.com/GHSA-gpxg-fx2g-qxj2/"}