-
Notifications
You must be signed in to change notification settings - Fork 193
Open
Description
SamlIdp::Request#valid? validates the host of the ACS URL but does not check the scheme.
This allows URLs like javascript://whitelisted-host.com/%0aalert(1) to pass validation if the host is whitelisted.
When such a URL is used as a form action, it leads to XSS. This is currently reproducible in the spec/rails_app where saml_acs_url is rendered in the saml_post.html.erb template:
| <%= form_tag(saml_acs_url) do %> |
How about enforcing http or https schemes by default in the validation logic?
def valid?
# ...
return false unless ['http', 'https'].include?(URI(response_url.to_s).scheme)
# ...
endReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels