Skip to content

sanitize javascript: urls in href on area elements#21443

Closed
rootvector2 wants to merge 1 commit into
emberjs:mainfrom
rootvector2:sanitize-area-href
Closed

sanitize javascript: urls in href on area elements#21443
rootvector2 wants to merge 1 commit into
emberjs:mainfrom
rootvector2:sanitize-area-href

Conversation

@rootvector2
Copy link
Copy Markdown

The URL sanitizer in sanitized-values.ts lists A in badTags but not AREA. An in an image map navigates to its href on click just like an anchor, so with an attacker-controlled value reaches the DOM unsanitized and runs javascript:/vbscript: on click, while the identical is rewritten to unsafe:. Add AREA so the image-map link is treated like an anchor.

@NullVoxPopuli
Copy link
Copy Markdown
Contributor

shouldn't this go in #21442 ?

@rootvector2
Copy link
Copy Markdown
Author

Yeah, makes sense. Moved the AREA change and the area[href] suite into #21442 and added a limber repro over there. Closing this one.

@rootvector2 rootvector2 closed this Jun 2, 2026
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.

2 participants