Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad response_type can lead to XSS attack #151

Closed
gobengo opened this issue Dec 10, 2015 · 0 comments
Closed

Bad response_type can lead to XSS attack #151

gobengo opened this issue Dec 10, 2015 · 0 comments

Comments

@gobengo
Copy link
Contributor

gobengo commented Dec 10, 2015

https://github.com/rohe/pyoidc/blob/master/src/oic/oic/provider.py#L1837

Because that line includes the user input in the BadRequest response, and does not sanitize the HTML before returning, this can be used to execute arbitrary JS

Example Request
https://my-oidc-provider.com/authorization/?other_valid_parts&response_type=<script>alert("hi")%3B<%2Fscript>

You probably should at least cgi.escape in here https://github.com/rohe/pyoidc/blob/master/src/oic/utils/http_util.py#L52

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

No branches or pull requests

1 participant