Developer and Text Tools

Finding Outdated and Vulnerable JavaScript Libraries on Your Site

Why old jQuery, Lodash, Moment and AngularJS versions keep showing up in security reports, how to find them in pages and lockfiles, and how to upgrade.

Saizul Amin
Saizul Amin3 Nov 2026 · 3 min read
Finding Outdated and Vulnerable JavaScript Libraries on Your Site

Finding Outdated and Vulnerable JavaScript Libraries on Your Site

Ask any penetration tester for their most frequent finding on websites and outdated JavaScript libraries will be near the top. The pattern is always similar: a page loads jQuery 1.12 from a CDN because a plugin needed it in 2016, or a project lockfile still pins a Lodash version from before its prototype pollution fixes. The libraries work, so nobody touches them. This guide explains why they matter, how to find them and how to prioritise.

Why old libraries are a real risk

Popular libraries are studied closely, and their past bugs are public. jQuery before 3.5.0 could execute scripts hidden in HTML passed to its DOM methods. Lodash before 4.17.21 allowed command injection through its template function. Handlebars before 4.7.7 could run code when compiling untrusted templates. Moment before 2.29.4 had a regular expression that could be made to run for a very long time. Each of these has a CVE number, a description and often a public proof of concept. Scanners used by attackers and by auditors check for them automatically.

Not every advisory is exploitable in every application. A prototype pollution bug in a function you never call may be harmless. But you rarely know for sure, and upgrading within the same major version is usually cheap.

Where versions hide

  • Front-end pages. Script tags pointing at CDNs often carry the version in the path, for example /[email protected]/ or /ajax/libs/moment.js/2.29.1/. Self-hosted files often keep it in the file name or in a licence banner at the top of the minified file.
  • Lockfiles. package-lock.json, yarn.lock and pnpm-lock.yaml record the exact installed version of every direct and transitive dependency. Many advisories live in packages you never chose, such as minimist or semver pulled in by build tools.
  • Bundles. Webpack and Vite builds usually strip banners, so the lockfile is the better source.

End of life is a finding too

Some libraries no longer receive security fixes at all. AngularJS 1.x reached end of life on 31 December 2021 and Vue 2 on 31 December 2023. For those, the answer is a migration plan, not a patch.

How to prioritise

  1. Critical and high severity first, especially anything involving code execution, template injection or hijacked releases.
  2. Internet-facing pages before internal tools.
  3. Cheap upgrades early. Moving from Lodash 4.17.20 to 4.17.21 or jQuery 3.4.1 to 3.5.0 rarely breaks anything.
  4. Plan migrations for end-of-life frameworks with a date, rather than leaving them as permanent exceptions.

Using the detector

The Vulnerable JavaScript Library Detector does the scanning part in your browser. Paste a page's HTML, drop a folder of script files, or paste a lockfile. It recognises versions from CDN paths, file names, banner comments and lockfile entries, matches each against a bundled list of well-known advisories for about thirty widely used packages, and shows the worst severity, every advisory with a link to the NVD entry and the lowest version that clears them. Results export as CSV for a ticket or JSON for a report. A second tab lets you browse the advisory list with affected ranges.

Make it continuous

A one-off scan finds today's problems. To stay ahead:

  • Run npm audit or osv-scanner in CI and fail builds on critical findings.
  • Enable automated dependency updates such as Dependabot or Renovate.
  • Remove libraries you no longer need; the safest dependency is the one you deleted.
  • Re-scan public pages after marketing or CMS changes, which often add old plugins.

Limits

A bundled advisory list covers the most common issues, not every CVE ever published, and it does not update itself. Treat a clean result as a good sign, then rely on a full software composition analysis tool in your pipeline for complete coverage.

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages