Executive brief
jQuery is a widely used JavaScript library that simplifies web development tasks. The vulnerability allows attackers to execute malicious JavaScript code on a user's browser when jQuery automatically processes text/javascript responses from cross-origin AJAX requests, even without explicit configuration. An attacker could exploit this to steal user credentials, perform unauthorized actions, or deface web pages.
Technical details
This is a cross-site scripting (CWE-79) vulnerability in jQuery's AJAX handling mechanism. The root cause is that jQuery interprets and automatically executes text/javascript responses from cross-origin AJAX requests using jQuery.globalEval(), even when the dataType option is not explicitly set. The attack vector is network-based and requires user interaction (a user visiting an attacker-controlled webpage or malicious content). An attacker can craft a malicious cross-origin AJAX request that tricks jQuery into executing arbitrary JavaScript code in the user's browser context. The vulnerability was fixed in jQuery version 1.12.2 and 3.0.0 (depending on the branch); users should upgrade to these versions or later.
Affected products
- jQuery Foundation jQuery All versions prior to 1.12.2 and all versions from 1.12.3 through 2.x, up to but not including 3.0.0
Timeline
- 2018-01-18: disclosed: Published to NVD
- 2015-06-27: patched: Fixed in jQuery 1.12.2 and 3.0.0