# CVE-2021-30074: Docsify vulnerable to cross-site scripting due to mishandled encoding

- Severity: Medium 6.1 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.78%, higher than 57% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-04-02T20:40:10.000Z
- Modified: 2026-06-17T03:49:40.060Z
- Also known as: GHSA-5h7x-68wj-jhwc
- Weaknesses: CWE-79
- Assigned by: mitre

## Description

docsify 4.12.1 is affected by Cross Site Scripting (XSS) because the search component does not appropriately encode Code Blocks and mishandles the " character.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- docsify (npm): before 4.12.2
- docsifyjs docsify: 4.12.1

## Every score

- GitHub: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:2.0 4.3 Medium `AV:N/AC:M/Au:N/C:N/I:P/A:N`

## References

- <https://github.com/docsifyjs/docsify/issues/1549> (exploit, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-30074> (advisory)
- <https://github.com/docsifyjs/docsify/pull/1551> (web)
- <https://github.com/docsifyjs/docsify/commit/c24f7f6f0b87a87f6dd3755f69eb0969ebb029c9> (web)
- <https://github.com/docsifyjs/docsify> (package)

## Sources

- CVE List: [CVE-2021-30074](https://www.cve.org/CVERecord?id=CVE-2021-30074), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-5h7x-68wj-jhwc](https://github.com/advisories/GHSA-5h7x-68wj-jhwc), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2021-30074](https://nvd.nist.gov/vuln/detail/CVE-2021-30074), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-30074 · Whole record: https://cve.day/CVE-2021-30074.json · Rebuilt by cve.day 2026-11-25T22:58:00.597Z
