Docsify vulnerable to cross-site scripting due to mishandled encoding
Summary
CVE-2021-30074: Docsify vulnerable to cross-site scripting due to mishandled encoding. Affects docsify versions < 4.12.2. Fixed in 4.12.2. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
docsify versions 4.12.1 and earlier are vulnerable to cross-site scripting (XSS) because the search component does not appropriately encode Code Blocks and mishandles the " character.
How To Fix
Latest published version: 5.0.0 as of 23 Oct 2026
npm install docsify@5.0.0
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
4.12.2
This is the first release that contains the fix.
npm install docsify@4.12.2
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
References
Related vulnerabilities
Recent vulnerabilities recorded for docsify.