Conversation
The UMA sample pages loaded jquery-latest.min.js (frozen at 1.11.1) over plain http and without an integrity check. Pin jQuery 3.7.1, load it over https and add the subresource integrity hash (js/functionality-from-untrusted-source).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes code scanning alert #66 (
js/functionality-from-untrusted-source, medium) inopenig-doc/src/main/resources/uma/index.html.The three UMA sample pages (
index.html,alice.html,bob.html) loadedcode.jquery.com/jquery-latest.min.js— over plainhttp://inindex.htmland via///code.jquery.com/…in the other two — with no integrity check.jquery-latesthas been frozen at 1.11.1 (2014) by the jQuery project and carries known XSS CVEs (CVE-2015-9251, CVE-2019-11358, CVE-2020-11022/11023).Change, in all three pages:
The SRI hash was computed from the file served by the CDN and matches the one published on jquery.com.
jQuery 3.x compatibility checked against the API the pages actually use —
$.ajax({type, url, data, contentType}).done/.fail,.click(),.html(),$(document).ready()— none of the APIs removed in 3.0 are involved.CodeQL only flagged
index.html(explicithttp:);alice.htmlandbob.htmlhad the same issue behind the///form and are fixed as well.