jQuery 4.1.0 fixes a selector ReDoS and drops getElementsBy lookups

The jQuery project has published release 4.1.0 on GitHub. The release page links to a blog post announcing jQuery 4.1.0 and 3.8.0 under the heading "passing the torch"; the post's URL is dated 2026-11-17. The page itself carries the changelog, grouped by area.
The Selector module has the most changes. It gets a fix for a ReDoS (regular-expression denial of service) problem in identifier matching, and a workaround for a Safari 27 regex interpreter bug. Invalid escape code points in selectors are now decoded to U+FFFD, and the runescape regex in unescapeSelector is fixed. Other Selector entries make quick selection paths stricter, optimize duplicate removal in jQuery.uniqueSort, and use loose document comparisons everywhere.
Core drops getElementsByTagName and getElementsByClassName in favor of querySelectorAll, and refactors loops so they do not go behind array bounds. In Ajax, the responseURL field is added to jqXHR, and an alternative completeCallback API is supported for transports. CSS now uses createElementNS to support XML documents, and the computeTableStyleTests probe table is emptied when it might be reused. Data gets a small size trim, described as shaving off some bytes.
The Docs changes add TuxCare as a new commercial support vendor, update the jQuery NES HeroDevs link in the README, update the active version table and the README for the 4.0 release, fix the spelling of XMLHttpRequest in the README, and add guidelines for machine-generated contributions.
The Tests section is the longest list. It expects reliableTrDimensions to fail in Chrome, makes the jQuery.parseXML error reporting test less strict, and accepts both old and new :enabled/:disabled option/optgroup semantics. It re-enables the AJAX binary data tests in IE. New tests cover jQuery.text, callback-only animation signatures, jQuery.ajaxPrefilter and jQuery.ajaxTransport, and .data() on SVG elements, and test coverage of the serialize module is increased. The Serialize heading itself has no items listed.
Key facts
- jQuery 4.1.0 fixes a ReDoS in identifier matching in the Selector module.
- Selector also gets a workaround for a Safari 27 regex interpreter bug, and invalid escape code points now decode to U+FFFD.
- Core drops getElementsByTagName and getElementsByClassName in favor of querySelectorAll.
- Ajax adds the responseURL field to jqXHR and supports an alternative completeCallback API for transports.
- Docs add TuxCare as a commercial support vendor and add guidelines for machine-generated contributions.
Why it matters
jQuery is a long-established JavaScript library, and this release is a maintenance step on the 4.x line after the 4.0 release mentioned in the README changes. The headline item is the ReDoS fix in selector identifier matching, since a regex that can be made to run for a very long time is a denial-of-service risk. The Safari 27 workaround and the move to querySelectorAll show the library adjusting to current browser behavior. The linked announcement covers 4.1.0 and 3.8.0 together under the title "passing the torch".
Who it affects
Anyone running jQuery on a site or app is the audience, especially code that builds or passes selectors, uses jQuery.uniqueSort, or relies on Safari. Authors of custom Ajax transports are touched by the alternative completeCallback API. Organizations buying commercial support see TuxCare added to the list of vendors, and the jQuery NES link to HeroDevs was updated in the README. Contributors are affected by the new guidelines for machine-generated contributions.
How to use it
The release is published on GitHub under the tag 4.1.0, and the changelog is the place to check which areas a given project touches: Ajax, Core, CSS, Data, Selector. Projects that read the response URL of an Ajax call can now use the responseURL field on jqXHR. The release notes carry no migration steps or upgrade advice, so testing selector-heavy code against the new version is the practical check.
How solid is it
The source is the official release page on the jQuery repository, so the list of changes is first-hand. It is a terse commit-style changelog, with one line and a commit hash or issue number per change. The text of the linked blog post is not part of what was available, so what "passing the torch" refers to is not stated here.
Risks and caveats
The ReDoS fix comes with no CVE, severity rating or affected-version range. The Safari 27 entry calls the problem only a regex interpreter bug. The changelog makes no statement on breaking changes, and several entries (stricter quick selection paths, dropping getElementsBy{Tag,Class}Name, decoding invalid escapes to U+FFFD) touch core selector behavior, so they are worth testing. The changelog does not list the contents of jQuery 3.8.0, and no performance measurements or download figures are given.