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

Source: https://junglewise.ai/threats/cve-2015-9251-jquery-cross-site-scripting-in-ajax-responses  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2018-01-22. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

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)](https://junglewise.ai/threats/technologies/org-webjars-npm-jquery), [jquery-rails (RubyGems)](https://junglewise.ai/threats/technologies/jquery-rails). Vendors: [Maven](https://junglewise.ai/threats/vendors/maven), [npm](https://junglewise.ai/threats/vendors/npm), [NuGet](https://junglewise.ai/threats/vendors/nuget), [RubyGems](https://junglewise.ai/threats/vendors/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

  ```sh
  # 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

  ```sh
  npm install jquery@1.12.2
  ```

- jQuery (NuGet): upgrade to 1.12.2 or later

  ```sh
  dotnet add package jQuery --version 1.12.2
  ```

- jquery-rails (RubyGems): upgrade to 4.2.0 or later

  ```sh
  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

- [https://github.com/jquery/jquery/issues/2432](https://github.com/jquery/jquery/issues/2432)

## Related threats

- [jQuery Cross Site Scripting in htmlPrefilter](https://junglewise.ai/threats/jquery-cross-site-scripting-in-htmlprefilter-9649f1a0)
- [jQuery Cross-Site Scripting in location.hash element selection](https://junglewise.ai/threats/cve-2011-4969-jquery-cross-site-scripting-in-location-hash-element-selection)
- [jQuery Cross-Site Scripting in main jQuery function](https://junglewise.ai/threats/cve-2012-6708-jquery-cross-site-scripting-in-main-jquery-function)
- [jQuery cross-site scripting in load method](https://junglewise.ai/threats/cve-2020-7656-jquery-cross-site-scripting-in-load-method)
- [jQuery DOM manipulation XSS via option elements](https://junglewise.ai/threats/cve-2020-11023-jquery-cross-site-scripting-xss-vulnerability)
