A complete guide to finding and fixing CVEs in your Node.js package.json using the free npm vulnerability scanner.
npm packages can contain known vulnerabilities (CVEs) that attackers can exploit. The average Node.js project has 700+ transitive dependencies, and new CVEs are published daily. Scanning your package.json regularly is essential for application security. The npm vulnerability scanner makes this free, fast, and requires no account.
package.json content into the textarea# Scan your local package.json
bunx --bun github:sudaisalamboy/npm-vulnerability-scanner bin/scan.ts ./package.json
# JSON output for CI
bunx --bun github:sudaisalamboy/npm-vulnerability-scanner bin/scan.ts ./package.json --json
# Generate SBOM
bunx --bun github:sudaisalamboy/npm-vulnerability-scanner bin/scan.ts ./package.json --sbom cyclonedx > sbom.json
# Fail on high-severity vulns
bunx --bun github:sudaisalamboy/npm-vulnerability-scanner bin/scan.ts ./package.json --fail-on high
Add this to .github/workflows/security-scan.yml in any repo:
name: Security Scan
on: [push, pull_request]
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: sudaisalamboy/npm-vulnerability-scanner@v1
with:
package-json: ./package.json
fail-on: high
sbom: cyclonedx
The npm vulnerability scanner analyzes every vulnerability and generates a single npm install command that upgrades every fixable package at once. This is the fastest way to resolve all your CVEs in one step.
The scanner queries OSV.dev — a free, open-source vulnerability database maintained by Google. OSV.dev aggregates CVEs from the npm advisory database, GitHub Security Advisories (GHSA), and other sources. The scanner never uploads your code — it only queries package names and versions.
Yes — 100% free and MIT-licensed. No API key, no account, no rate limits beyond OSV.dev's generous limits.
Yes. The scanner scans both dependencies and devDependencies from your package.json.
The scanner scans the direct dependencies listed in package.json. For transitive (nested) dependency scanning, use npm ls or run the scanner after npm install against your lockfile.
SPDX 2.3 and CycloneDX 1.4 — both industry standards for Software Bills of Materials.
Ready to scan your dependencies?
🔍 Open the npm vulnerability scanner