Fix CVE-2022-23540 in jsonwebtoken HIGH

Fix CVE-2022-23540 (algorithm confusion attack) in jsonwebtoken for npm. Paste your package.json into PackageFix and get a patched version back — no CLI, no signup.

⚠ Vulnerability

CVE-2022-23540 — algorithm confusion attack in jsonwebtoken. Update to 9.0.0 or later.

Vulnerable Version — package.json

"jsonwebtoken": "8.5.1"

Fixed Version — package.json

"jsonwebtoken": "9.0.0"
✓ Fix

Update to 9.0.0 and run npm install to apply the fix.

Scan your dependencies now — paste your manifest, get a fixed version back in seconds.

Open PackageFix →

No signup · No CLI · No GitHub connection · Runs 100% in your browser

Frequently Asked Questions

What is CVE-2022-23540?
CVE-2022-23540 is a vulnerability in jsonwebtoken that allows algorithm confusion attack. Update to version 9.0.0 or later to fix it.
Is CVE-2022-23540 on the CISA KEV catalog?
Check the live CISA KEV catalog at packagefix.dev — the catalog updates daily and PackageFix always reflects the current status.
How do I fix CVE-2022-23540 in jsonwebtoken?
Update jsonwebtoken to version 9.0.0 or later in your package.json. Run npm install after updating.
Does CVE-2022-23540 affect all versions of jsonwebtoken?
Check the OSV advisory for the exact affected version range. PackageFix shows the minimum safe version for your installed version.