Fix CVE-2024-21901 in React HIGH

Fix CVE-2024-21901 (XSS via dangerouslySetInnerHTML) in React for npm. Paste your package.json into PackageFix and get a patched version back — no CLI, no signup.

⚠ Vulnerability

CVE-2024-21901 — XSS via dangerouslySetInnerHTML in React. Update to 18.2.0 or later.

Vulnerable Version — package.json

"react": "18.0.0"

Fixed Version — package.json

"react": "18.2.0"
✓ Fix

Update to 18.2.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-2024-21901?
CVE-2024-21901 is a vulnerability in React that allows XSS via dangerouslySetInnerHTML. Update to version 18.2.0 or later to fix it.
Is CVE-2024-21901 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-2024-21901 in React?
Update React to version 18.2.0 or later in your package.json. Run npm install after updating.
Does CVE-2024-21901 affect all versions of React?
Check the OSV advisory for the exact affected version range. PackageFix shows the minimum safe version for your installed version.