jQuery 4.1.0 released with fix for 120-second selector hang
dev.to

jQuery 4.1.0 released with fix for 120-second selector hang

Archived — this story has rotated out of today’s deck. It is kept here in full.

The gist

jQuery released version 4.1.0, fixing a selector flaw that hung pages for over 120 seconds.
The fix cuts that hang to 4 milliseconds; 3.x now gets only critical fixes.

Background

jQuery is a widely used JavaScript library for DOM manipulation and Ajax. Timmy Willison (timmywil), the jQuery release manager, published 4.1.0 on Nov 17, 2026, the first minor release of the 4.x line, alongside 3.8.0. The release fixes a selector regex vulnerable to catastrophic backtracking: a long chain of hex escapes followed by an invalid character could hang the page. The blog says the fix brings jQuery closer to spec and eliminates the ReDoS (regular-expression denial-of-service) issue.

How it unfolded

  1. Jun 18, 2025A proposal was filed to make `await $.ajax()` throw `Error` instances instead of raw jqXHR; it was added to the 4.1.0 milestone on Jul 21, 2025.
  2. May 4, 2026Milestones for that issue were modified to 4.1.0 and 5.0.0.
  3. Nov 17, 2026Timmy Willison released jQuery 4.1.0 on GitHub, tagged as the latest release with a verified GPG signature, and announced it with 3.8.0 on the Official jQuery Blog.
  4. Nov 18, 2026A dev.to post reported the same malicious selector took more than 120 seconds in jQuery 4.0.0 and 4 milliseconds in 4.1.0.

Key terms

selector
A style sheet language used to specify the presentation and styling of documents written in markup languages like HTML.
DOM
A cross-platform, language-independent API that represents an HTML or XML document as a tree of nodes that can be accessed and modified programmatically.
Ajax
A set of client-side web development techniques for sending and retrieving data asynchronously without reloading the whole page.

Source: Wikipedia

Who’s saying what

Official
The jQuery Blog says 3.8.0 "is a send-off, not a comeback"; the 3.x branch will only receive critical security and bug fixes, and users are encouraged to move to 4.x.
Official
The blog says most users can upgrade with minimal changes, with an upgrade guide and the jQuery Migrate plugin available.

Sources

See today’s stories in the app Gistline — free on the App Store