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
Specially crafted optgroup labels can cause code to execute if a Chosen instance is instantiated with the include_group_label_in_selected option is set to true.
Steps to reproduce
Instantiate a chosen instance with include_group_label_in_selected: true
Have the select include an optgroup with a label of </script><script>alert('hi')</script>Label (or something along those lines)
Choose any of the options in that optgroup, and see the alert pop up!
Any other information you want to share that is relevant to the issue being reported. This might include the lines of code that you have identified as causing the bug, or potential solutions and workarounds.
The text was updated successfully, but these errors were encountered:
Description
Specially crafted optgroup labels can cause code to execute if a Chosen instance is instantiated with the
include_group_label_in_selected
option is set to true.Steps to reproduce
include_group_label_in_selected: true
select
include anoptgroup
with a label of</script><script>alert('hi')</script>Label
(or something along those lines)Demo: https://jsbin.com/xavila/edit?html,output
Expected behavior
The sneaky label's text should be escaped.
Actual behavior
The sneaky label's text can be executed as code.
Environment
Additional information
Any other information you want to share that is relevant to the issue being reported. This might include the lines of code that you have identified as causing the bug, or potential solutions and workarounds.
The text was updated successfully, but these errors were encountered: