Skip to content
TrustList
News

jQuery 4.1.0 and 3.8.0 fix a selector ReDoS; 3.x moves to critical fixes only

Editorial

By TrustList Editorial

Both releases fix a regular-expression denial of service in selector identifier matching; 3.8.0 is the last planned feature release for 3.x, so sites are urged to move to 4.x.

About jQuery 4.1.0 and 3.8.0 fix a selector ReDoS; 3.x moves to critical fixes only

jQuery 4.1.0 and 3.8.0 fix a selector ReDoS; 3.x moves to critical fixes only

17 November 2026: The jQuery team published jQuery 4.1.0, the first minor release of the 4.x line, together with jQuery 3.8.0. Both fix a regular expression denial of service (ReDoS) in the code that matches identifiers in selectors. The 3.8.0 release is also described by the project as the last planned feature release for the 3.x branch: from now on 3.x receives only critical security and bug fixes.

Not yet independently verified. The release post describes the denial-of-service fix but gives no CVE number or severity score. We did not run the new releases or test the upgrade path; the post's own claim that most users can upgrade with minimal changes is the project's view. We will update this when it can be confirmed, and remove this note.

The ReDoS fix

According to the release post, the regular expression jQuery uses to match identifiers in selectors suffered from catastrophic backtracking. A long chain of hex escapes followed by an invalid character, for example inside an attribute selector, could hang the page. The grammar now explicitly excludes digits and hex characters where the CSS specification says it should, which brings it closer to the specification and removes the problem. The post does not assign a CVE number.

The practical risk is for pages that pass untrusted text into a jQuery selector. If user input, a URL fragment or a query parameter ever ends up inside a call such as the dollar function, a crafted string could freeze the visitor's browser tab. Updating the library removes that route, and avoiding building selectors from untrusted strings does so as well.

What else changed

Both releases add a new way for custom AJAX transports to call their completion callback, with a single object rather than positional arguments, and convert the remaining strict document comparisons in the selector code to loose ones, which avoids rare crashes in IE and Edge Legacy.

jQuery 4.1.0 adds a responseURL field on jqXHR objects, correct serialisation of form-associated custom elements, support for CSS methods in XML documents, and an internal switch to querySelectorAll in place of getElementsByTagName and getElementsByClassName. Invalid escape sequences in selectors are now decoded to the Unicode replacement character as the CSS specification requires, and jQuery.uniqueSort has a faster duplicate-removal routine.

jQuery 3.8.0 supports the hidden attribute value until-found, formally deprecates the push, sort and splice methods on the jQuery prototype and the jQuery.expr colon and filters properties (so the Migrate plugin can warn about them), and backports several fixes from 4.0.0.

What site owners should do

If you run jQuery 3.x, the project's message is clear: the branch is now in maintenance and you should plan the move to 4.x. The team says an upgrade guide and the jQuery Migrate plugin are ready, and that most users will be able to upgrade with minimal changes. Run the Migrate plugin against your pages first, fix the warnings it reports, then test the move to 4.1.0.

If you cannot upgrade soon, move to 3.8.0 to get the ReDoS fix, and use the Migrate warnings about the new deprecations as a to-do list. Plugins and themes that pin an old jQuery are the usual obstacle, so check the ones you depend on.

Update the version wherever it is referenced: npm packages, bundled files and CDN links. The post notes that the releases are on the jQuery CDN and npm now, and that third-party CDNs will probably carry them soon but on their own schedules. Do not assume a third-party CDN has the fix until you have checked the file it serves.

What the post leaves open

The post names no deadline for the end of critical fixes on 3.x, and it does not say how a "critical" fix is defined. Sites that cannot leave 3.x for a long time should ask the maintainers of their plugins and themes whether they support 4.x, and plan around the answer.

Sources

Categories & features

TrustList Weekly

The week in software and IT, in one email

The news that matters to buyers, new rankings and our own research. Every Thursday, free, and easy to leave.

We will email you to confirm. Unsubscribe with one click in any issue. Privacy policy

You may be interested in