On this page
What this issue is
jQuery is a JavaScript library that many themes, plugins, sliders and form tools still rely on. Like any software, it gets security fixes. Versions that are no longer updated have CVEs: public, numbered records of known vulnerabilities (for example CVE-2020-11022 and CVE-2020-11023, fixed in jQuery 3.5.0, which concern HTML handling that can lead to XSS).
Why it costs you leads or sales
An XSS flaw lets an attacker run their own script on your page. On a lead form or checkout that script can read what visitors type, redirect them, or inject fake fields. The damage is lost trust, data exposure, browser or Google Safe Browsing warnings, and possible ad account suspensions if your pages are flagged as unsafe.
- Visitor landsPage loads an old jQuery from a theme or CDN
- Old jQuery runsKnown XSS pattern is exploitable
- Injected scriptForm data read or visitor redirected
- Lead or saleTrust and conversion are lost
A vulnerable script runs in the visitor's browser before the form is submitted.
How to check if your site has it
Check in the browser console
Open your page, press F12, open the Console tab and type jQuery.fn.jquery then press Enter. It prints the version of the copy that is active, for example 1.12.4. If it says jQuery is not defined, the page does not use it.
List all copies loaded
In the Network tab, filter by JS and search for jquery. Note each file name and its source (your domain, a CDN, or a plugin folder). Two files means two copies.
Run Lighthouse
In Chrome DevTools open Lighthouse, run a Best Practices audit and look for the item about vulnerable JavaScript libraries. It lists detected library versions with known issues.
Scan with Retire.js
Retire.js is a free open-source scanner with a browser extension and a command line tool. It reports libraries with known vulnerabilities on the pages you test.
Test your key pages
Repeat for the home page, landing pages, the form page and checkout. Different templates can load different scripts.
console.log('Active jQuery:', window.jQuery ? jQuery.fn.jquery : 'not loaded');
console.log([...document.scripts].map(s => s.src).filter(src => /jquery/i.test(src)));How to fix it
The target is jQuery 3.5.0 or newer, ideally the latest 3.x release. Better still, remove jQuery from pages that do not need it. Always work on a staging copy or take a backup first.
Update core, theme and plugins
WordPress core ships its own jQuery. Update WordPress, then your theme and plugins from Dashboard > Updates. Most old copies come from outdated plugins.
Find the plugin loading the old copy
In the Network tab, check the file path. A path such as /wp-content/plugins/name/js/jquery.min.js names the culprit. Update, replace or remove that plugin.
Avoid the old 'jQuery Migrate' workaround
Only use the jQuery Migrate script as a temporary bridge while you fix incompatible plugins, and check the console for migrate warnings to see what to replace.
Update or switch your theme
Online Store > Themes. Current Online Store 2.0 themes mostly avoid jQuery. Update the theme to its latest version.
Search the theme code
Choose Edit code and search for jquery in layout/theme.liquid and the assets folder. Replace hard-coded old CDN links with a current version or remove them.
Review installed apps
Some apps inject their own jQuery through script tags. Update or remove the app and recheck the console.
Audit Custom HTML tags
In your container, search tags for jquery. Any Custom HTML tag that loads an old jquery file from a CDN should point to a current 3.x file or be removed.
Test in Preview mode
Use Preview to confirm dependent tags still work, then publish a new version.
Check Project Settings
Webflow loads its own jQuery. Under Site settings > Custom code, search for extra jquery script tags in the head or footer.
Remove duplicates
Delete any added old copy. Publish and recheck the console version.
Check custom code areas
Review funnel and website settings for Custom Code and Tracking Code sections, plus any custom code elements, for jquery script tags.
Replace the link
Point to a current 3.x file or remove it if no custom script needs it, then preview the funnel.
Check custom code
Wix manages its own libraries. Go to Settings > Custom Code and look for added jquery script tags. Update or remove them.
Check code injection
Go to Settings > Advanced > Code Injection and look for jquery links in header, footer and per-page injection. Replace or remove old ones.
Update the dependency
If you use npm, run npm install jquery@latest and rebuild. For script tags, change the URL to a current 3.x file.
Self-host and pin the version
Host the file yourself or use a pinned version with a Subresource Integrity hash so it cannot silently change.
Remove if unused
Search your code for $( and jQuery(. If nothing uses them, delete the script.
<script src="https://code.jquery.com/jquery-3.7.1.min.js"
integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo="
crossorigin="anonymous"></script>Before
- jQuery 1.12.4 loaded by an old plugin
- Two copies of jQuery on the page
- Lighthouse lists vulnerable libraries
After
- Single current jQuery 3.x copy, or none
- Plugins updated or replaced
- Forms and checkout tested and working
How to confirm it's fixed
- jQuery.fn.jquery in the console shows 3.5.0 or higher (or jQuery is not defined by design)
- Network tab shows only one jQuery file
- Lighthouse no longer lists vulnerable libraries
- Retire.js reports no jQuery findings
- The browser console shows no new red errors on key pages
- Submit a test lead and confirm it arrives in your inbox and CRM
- Walk through menus, sliders, popups and checkout up to the payment step
How to prevent it happening again
- Turn on automatic updates for plugins and themes where you can, or review updates monthly
- Remove plugins and apps you no longer use
- Do not paste old script snippets or CDN links from old tutorials
- Load libraries from one place so there is a single copy to update
- Re-run Lighthouse or Retire.js after every theme change or new plugin
- Keep a staging site to test updates before they go live
How FunnelGuard handles this
FunnelGuard does not check JavaScript library versions or CVEs today. It is a possible future check, but it is not available now, so do not rely on it for this.
What FunnelGuard does cover nearby is the result of a bad update. A robot visitor runs your real journeys on a schedule, such as lead forms and checkouts, checks each step and the tracking hits, and confirms test leads reach the inbox and CRM. If upgrading jQuery breaks a submit button, a failure is re-checked from a second region and you get one alert with a screenshot and a likely cause. To watch for old libraries themselves, use Lighthouse, Retire.js or your platform's security scanner on a regular schedule. A free read-only website audit is also available.
Frequently asked questions
Questions people ask
How do I check which jQuery version my website uses?
Open your page, press F12, go to the Console and type jQuery.fn.jquery. It prints the active version. Also check the Network tab filtered by JS for any extra jquery files, because a page can load more than one copy.
Which jQuery version is safe to use?
Use jQuery 3.5.0 or newer, ideally the latest 3.x release. Versions before 3.5.0 have known XSS-related CVEs such as CVE-2020-11022 and CVE-2020-11023. If your pages do not need jQuery, removing it is the safest option.
Why does Lighthouse say my site uses vulnerable JavaScript libraries?
Lighthouse compares the library versions it detects with a database of known vulnerabilities. The warning usually means an old jQuery, often loaded by a plugin or a pasted script. Find the file in the Network tab and update or remove its source.
Will updating jQuery break my website?
It can. Older plugins and themes sometimes use features removed in newer versions, which can break sliders, menus or forms. Update on a staging copy, check the console for errors, and test your forms and checkout before going live.
How do I update jQuery in WordPress?
WordPress ships its own jQuery, so update WordPress core first, then your theme and plugins. If an old copy still loads, find the plugin or theme file serving it in the Network tab and update, replace or remove that plugin.
Is jQuery 1.x or 2.x still a security risk?
Yes. Both lines are no longer maintained and miss fixes made in 3.5.0 and later. Moving to a current 3.x release is the standard fix, and the jQuery Migrate plugin can help as a temporary bridge.
Does FunnelGuard detect outdated jQuery?
No. FunnelGuard does not check library versions yet, though it is a possible future check. It does run your real forms and checkouts on a schedule, so it can show you if an update breaks a journey.
Related issues
- OPS-155Outdated CMS core with known CVEsFix guide
- OPS-156Outdated plugins/themes with known CVEsFix guide
- OPS-157Abandoned plugins no longer maintainedFix guide
- OPS-170Missing Content-Security-PolicyFix guide
- OPS-177Reflected XSS in form fields or searchFix guide
- OPS-178Stored XSS via form submissions into adminFix guide