-
-
Notifications
You must be signed in to change notification settings - Fork 351
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
XSS in select dropdowns #171
Comments
I have created a pull request that fixes this bug: #172 |
I will upload a new release to PyPI containing this fix, and remove previous (insecure) versions from PyPI. Thanks for your help! |
You're welcome ;) |
Your changes are in version 1.2.9 and are now on PyPI. People reading this in the futureI dug through the history - this has been a security flaw since the first initial commit, so I removed all versions below 1.2.9 from PyPI. I know this will break people's builds, and I'm sorry. Please upgrade to version 1.2.9 or higher (whatever the latest version is). If you truly need to use any previous versions, you can specify the commit to use. See this Stack Overflow post for examples, but I am making this difficult for a reason: you should not do this. |
During our testing, @KubaGorski found a XSS vulnerability in the select dropdown rendering.
The bug is found in chainedfk.js#L41 and chainedm2m.js#L54.
You can trigger the XSS while having a model with
__str__
method that returns arbitrary javascript code, and can be dangerous if have chained models with__str__
methods using fields that are filled in by users, for example:And if the
text
field contains something likeLorem ipsum <script>alert(123)</script>
, the javascript code will be executed in the django admin interface, which can lead to data leak, credential stealing or attacks on particular browser vulnerabilities of the site admin.The text was updated successfully, but these errors were encountered: