Vulnerable JavaScript library check: jQuery, Bootstrap, AngularJS, Lodash

Short answer

Old versions of popular JavaScript libraries have public exploits, and bots scan for them constantly. SiteShield reads the script and stylesheet URLs on your homepage and fails the check (10 of 100 points) if it finds jQuery before 3.5.0, Bootstrap before 3.4.1 or 4.3.1, any AngularJS 1.x, or Lodash before 4.17.21.

Server hygieneWorth 10 of 100 pointsBy Mumshad JawadUpdated

What is Vulnerable JavaScript libraries?

SiteShield recognises the version number in common file names and CDN paths, for example jquery-1.12.4.min.js, /jquery/3.7.1/, jquery@3.5.0 or WordPress's jquery.min.js?ver=1.12.4. The versions it flags and why:

LibraryFlagged versionsReason
jQuerybefore 3.5.0Cross-site scripting flaws CVE-2020-11022 and CVE-2020-11023
Bootstrapbefore 3.4.1, and 4.x before 4.3.1Cross-site scripting flaw CVE-2019-8331
AngularJSevery 1.x versionEnd of life: official support ended on 31 December 2021, so new flaws are not fixed
Lodashbefore 4.17.21Prototype pollution and command injection (CVE-2021-23337)

Why it matters

Old versions of popular libraries have published exploits. Automated bots scan for them constantly.

"Using components with known vulnerabilities" is a category of its own in the OWASP Top 10 (A06:2021) because it's so common and so easy to exploit: the exploit is already public, so attackers don't need any skill. PCI DSS 4.0 requirement 6.3.3 expects known security vulnerabilities to be patched on systems in scope.

SiteShield maps this check to:

OWASP Top 10 A06: Vulnerable and Outdated ComponentsPCI DSS 4.0 Req. 6.3.3

See how these standards fit together in the UAE website security checklist.

How SiteShield grades it

This check, "No known-vulnerable JavaScript libraries", can cost up to 10 points: a fail loses all 10, a warning loses 5. Every scan starts at 100.

ResultWhenPoints lost
PassNo flagged version is detected (the summary lists any libraries found that are recent enough).0
FailAt least one flagged version is detected.10

Detection relies on version numbers in URLs. A library bundled into one minified file without a version in its name won't be seen, so a pass isn't proof that nothing is outdated.

How to check it yourself

In the browser console, jQuery.fn.jquery prints the loaded jQuery version. For a project with npm:

npm ls jquery bootstrap lodash angular
npm audit

Or run a free SiteShield scan, which checks this and 16 other settings in one go.

How to fix it

The quick version: Update the libraries listed above to their latest versions and remove any you no longer use.

Hand-coded sites and CDN links

  1. Change the version in the script URL to a current release, for example jQuery 3.7.1, and test your pages. jQuery 3 removed some old APIs; the jQuery Migrate plugin logs what needs changing.
  2. Add Subresource Integrity (integrity=) to CDN scripts so a tampered file is refused.
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"
        integrity="sha512-..." crossorigin="anonymous"></script>

npm / bundlers

npm install jquery@latest bootstrap@latest lodash@latest
npm audit fix

WordPress

  1. WordPress core has shipped jQuery 3.x since version 5.6, so an old jQuery on a WordPress site usually means WordPress itself is out of date, or a theme or plugin loads its own copy.
  2. Update WordPress core, the theme and all plugins. Then view the page source and search for jquery to see which file still loads an old version and which plugin it comes from (the path usually contains the plugin name).

Cloudflare, Nginx, Apache

The server or CDN can't fix an outdated library: the files have to be updated where they are referenced. A Content-Security-Policy limits the damage in the meantime.

FAQ

My site uses jQuery 1.12.4 because of an old plugin. What can I do?

Update or replace the plugin. If you can't yet, a strict Content-Security-Policy and keeping user input out of jQuery's HTML functions reduce the risk, but the check will keep failing until the version is upgraded.

Why is every AngularJS version flagged?

AngularJS (1.x) is end of life: official support ended on 31 December 2021, so newly found vulnerabilities aren't fixed. The successor framework, Angular (2+), is a separate project and isn't flagged.

Which libraries does SiteShield detect?

jQuery, Bootstrap, AngularJS and Lodash, from version numbers in script and stylesheet URLs on the homepage.

Test your Vulnerable JavaScript libraries now

Run all 17 checks on your website and email domain in about 30 seconds. Free, no signup, passive checks only.

Rather not do it yourself? Fix it for me starts at AED 750 (about USD 205 by PayPal), quote agreed first. Monitoring re-scans weekly for AED 99/month or AED 990/year.

Related checks

See all 17 security checks →