docsify <= 4.12.0 DOM-based Cross-Site Scripting Vulnerability

• Affected Versions:

Version 4.12.0 and prior versions.

• Vulnerability Description:

The vulnerability exists due to an incomplete fix for CVE-2020-7680. When parsing HTML from remote URLs, the HTML code on the main page is sanitized, but this sanitization is not taking place in the sidebar. This can be exploited to inject arbitrary HTML code and carry out DOM-based Cross-Site Scripting (XSS) attacks.

• Solution:

Upgrade to version 4.12.1 or later.

• Disclosure Timeline:

[23/12/2020] – Vendor notified, no response

[13/01/2021] – Opened issue on GitHub:

[13/01/2021] – Vulnerability details sent to Snyk

[08/02/2021] – Version 4.12.0 released

[18/02/2021] – Publication of this advisory

[22/02/2021] – Vendor informed about the ineffective fix

[07/03/2021] – Version 4.12.1 released

• CVE Reference:

The Common Vulnerabilities and Exposures project ( has assigned the name CVE-2021-23342 to this vulnerability.

• Credits:

Vulnerability discovered by Egidio Romano.

• Other References: