From d4feeb6c6dec7ef28c38221feb41fcc9dc1f5c9a Mon Sep 17 00:00:00 2001 From: navnitan-7 Date: Tue, 31 Mar 2026 02:07:33 +0530 Subject: [PATCH] Security: backport jQuery ajax XSS mitigation (CVE-2015-9251) Mirror upstream jQuery gh-2432 fix in vendored ajaxConvert: skip automatic script conversion on cross-domain responses unless dataType was explicit. Refs: https://github.com/jquery/jquery/commit/2546bb35b89413da5198d54a4539e4ed0aaf6e49 Made-with: Cursor --- static/jquery/jquery.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/static/jquery/jquery.js b/static/jquery/jquery.js index 7fc60fca7..cba0c18c1 100644 --- a/static/jquery/jquery.js +++ b/static/jquery/jquery.js @@ -9293,6 +9293,11 @@ function ajaxConvert( s, response, jqXHR, isSuccess ) { // Convert response if prev dataType is non-auto and differs from current } else if ( prev !== "*" && prev !== current ) { + // Mitigate possible XSS vulnerability (gh-2432) + if ( s.crossDomain && current === "script" ) { + continue; + } + // Seek a direct converter conv = converters[ prev + " " + current ] || converters[ "* " + current ];