CVE-2015-9251: jQuery cross-site scripting in AJAX responses

CVE-2015-9251 · Severity: low · CVSS 3 · Published 2018-01-22

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.

Technologies: org.webjars.npm:jquery (Maven), jquery-rails (RubyGems). Vendors: Maven, npm, NuGet, RubyGems.

Quick answers

Is CVE-2015-9251 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2015-9251 being exploited in the wild.
How severe is CVE-2015-9251?
Low severity, with a CVSS score of 3, published 22 January 2018.
Which products and versions are affected?
org.webjars.npm:jquery (Maven) ECOSYSTEM:introduced=0,fixed=1.12.2; jquery (npm) SEMVER:introduced=0,fixed=1.12.2; jQuery (NuGet) ECOSYSTEM:introduced=0,fixed=1.12.2; jquery-rails (RubyGems) ECOSYSTEM:introduced=0,fixed=4.2.0.
Is there a fix for CVE-2015-9251?
Yes. org.webjars.npm:jquery (Maven): upgrade to 1.12.2 or later; jquery (npm): upgrade to 1.12.2 or later; jQuery (NuGet): upgrade to 1.12.2 or later; jquery-rails (RubyGems): upgrade to 4.2.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2015-9251 attacked?
It is attacked over the network.
Am I affected by CVE-2015-9251?
Check whether you run org.webjars.npm:jquery (Maven), jquery (npm), jQuery (NuGet) or one of the others listed at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • org.webjars.npm:jquery (Maven): upgrade to 1.12.2 or later
    # set org.webjars.npm:jquery to 1.12.2 in your pom.xml or build.gradle
  • jquery (npm): upgrade to 1.12.2 or later
    npm install jquery@1.12.2
  • jQuery (NuGet): upgrade to 1.12.2 or later
    dotnet add package jQuery --version 1.12.2
  • jquery-rails (RubyGems): upgrade to 4.2.0 or later
    bundle update jquery-rails

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

Identifiers

  • CVE-2015-9251
  • GHSA-rmxg-73gg-4p98

Timeline

  • 2018-01-18: disclosed: Published to NVD
  • 2015-06-27: patched: Fixed in jQuery 1.12.2 and 3.0.0

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.