CVE-2016-10707: jQuery infinite recursion in attribute getter for mixed-case names

CVE-2016-10707 · Severity: low · CVSS 3 · Published 2018-01-22

jQuery is a widely-used JavaScript library for DOM manipulation and event handling. Versions 3.0.0-rc.1 contain a bug in attribute handling that causes the application to enter an infinite loop and crash when accessing boolean HTML attributes with mixed-case names, leading to denial of service for any web page using affected jQuery versions.

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

Quick answers

Is CVE-2016-10707 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2016-10707 being exploited in the wild.
How severe is CVE-2016-10707?
Low severity, with a CVSS score of 3, published 22 January 2018.
Which products and versions are affected?
jQuery 3.0.0-rc.1; org.webjars.npm:jquery (Maven) ECOSYSTEM:introduced=3.0.0-rc1,fixed=3.0.0; jquery-rails (RubyGems) ECOSYSTEM:introduced=3.0.0-rc.1,fixed=3.0.0.
Is there a fix for CVE-2016-10707?
Yes. org.webjars.npm:jquery (Maven): upgrade to 3.0.0 or later; jquery-rails (RubyGems): upgrade to 3.0.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2016-10707 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2016-10707?
Check whether you run jQuery, org.webjars.npm:jquery (Maven) or jquery-rails (RubyGems) 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 3.0.0 or later
    # set org.webjars.npm:jquery to 3.0.0 in your pom.xml or build.gradle
  • jquery-rails (RubyGems): upgrade to 3.0.0 or later
    bundle update jquery-rails

Technical details

The vulnerability is an infinite recursion flaw (CWE-674) in jQuery's attribute getter logic. When attempting to access a boolean attribute using a name containing uppercase characters (e.g., `attr('requiRed')`), the lowercasing logic fails and triggers unbounded recursion that exhausts the call stack. The attack vector is network-based; any script on a web page can trigger the condition simply by calling `.attr()` with a mixed-case attribute name on any element. No authentication is required. An attacker can exploit this to cause a denial of service by crashing the browser or application. The issue was fixed in jQuery 3.0.0.

Affected products

  • jQuery jQuery 3.0.0-rc.1

Identifiers

  • CVE-2016-10707
  • GHSA-mhpp-875w-9cpv

Timeline

  • 2016-05-29: disclosed
  • 2016-05-29: patched: Fixed in jQuery 3.0.0
  • 2018-01-22: advisory

References

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