Skip to content

fix(captcha): prevent injection of malicious payloads in challenge.image#1652

Open
amitsingh05667 wants to merge 2 commits into
masterfrom
SDK-7315
Open

fix(captcha): prevent injection of malicious payloads in challenge.image#1652
amitsingh05667 wants to merge 2 commits into
masterfrom
SDK-7315

Conversation

@amitsingh05667
Copy link
Copy Markdown
Member

@amitsingh05667 amitsingh05667 commented May 19, 2026

Fix

The auth0 captcha template concatenated challenge.image directly into an HTML string assigned to innerHTML, allowing attribute injection if the value contained quote characters.

Fix: removed challenge.image from the template string and set src via img.setAttribute('src', challenge.image || '') instead - the DOM API encodes the value safely.

No breaking changes. Public API, visual output, and custom template overrides are all unaffected.

@amitsingh05667 amitsingh05667 requested a review from a team as a code owner May 19, 2026 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant