Skip to content

Load jQuery over https with SRI in the UMA sample pages - #172

Open
vharseko wants to merge 1 commit into
OpenIdentityPlatform:masterfrom
vharseko:uma-sample-jquery
Open

vharseko wants to merge 1 commit into
OpenIdentityPlatform:masterfrom
vharseko:uma-sample-jquery

Conversation

@vharseko

Copy link
Copy Markdown
Member

Closes code scanning alert #66 (js/functionality-from-untrusted-source, medium) in openig-doc/src/main/resources/uma/index.html.

The three UMA sample pages (index.html, alice.html, bob.html) loaded code.jquery.com/jquery-latest.min.js — over plain http:// in index.html and via ///code.jquery.com/… in the other two — with no integrity check. jquery-latest has 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:

<script type="text/javascript" src="https://code.jquery.com/jquery-3.7.1.min.js"
        integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>

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 (explicit http:); alice.html and bob.html had the same issue behind the /// form and are fixed as well.

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).
@vharseko vharseko added javascript Pull requests that update Javascript code security Security fixes and CVE / vulnerability updates documentation Improvements or additions to documentation labels Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation javascript Pull requests that update Javascript code security Security fixes and CVE / vulnerability updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant