# CVE-2020-26297: XSS in mdBook's search page

- Severity: High 8.2 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/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): 1.27%, higher than 70% of CVEs (2026-12-01)
- Published: 2021-01-04T12:00:00.000Z
- Modified: 2026-09-10T03:49:07.989Z
- Also known as: GHSA-gx5w-rrhp-f436, RUSTSEC-2021-0001
- Weaknesses: CWE-79
- Assigned by: GitHub_M

## Description

mdBook is a utility to create modern online books from Markdown files and is written in Rust. In mdBook before version 0.4.5, there is a vulnerability affecting the search feature of mdBook, which could allow an attacker to execute arbitrary JavaScript code on the page. The search feature of mdBook (introduced in version 0.1.4) was affected by a cross site scripting vulnerability that allowed an attacker to execute arbitrary JavaScript code on an user's browser by tricking the user into typing a malicious search query, or tricking the user into clicking a link to the search page with the malicious search query prefilled. mdBook 0.4.5 fixes the vulnerability by properly escaping the search query. Owners of websites built with mdBook have to upgrade to mdBook 0.4.5 or greater and rebuild their website contents with it.

(As written by CVE List.)

## Affected

- rust-lang mdBook: < 0.4.5; from 0.1.4 before 0.4.5
- mdBook (crates.io): from 0.1.4 before 0.4.5; from 0.1.4-0 before 0.4.5

## Every score

- GitHub_M: CVSS:3.1 8.2 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:N`
- GitHub: CVSS:3.1 8.2 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:N`
- RustSec Advisory Database: 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/rust-lang/mdBook/security/advisories/GHSA-gx5w-rrhp-f436> (mitigation, third-party-advisory, web)
- <https://groups.google.com/g/rustlang-security-announcements/c/3-sO6of29O0> (mailing-list, third-party-advisory, web)
- <https://crates.io/crates/mdbook> (package, product, third-party-advisory)
- <https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-045> (release-notes, third-party-advisory, web)
- <https://github.com/rust-lang/mdBook/commit/32abeef088e98327ca0dfccdad92e84afa9d2e9b> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2020-26297> (advisory)
- <https://github.com/rust-lang/mdBook> (package)
- <https://rustsec.org/advisories/RUSTSEC-2021-0001.html> (advisory, web)

## Sources

- CVE List: [CVE-2020-26297](https://www.cve.org/CVERecord?id=CVE-2020-26297), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-gx5w-rrhp-f436](https://github.com/advisories/GHSA-gx5w-rrhp-f436), CC-BY-4.0, modified 2026-09-10
- RustSec Advisory Database: [RUSTSEC-2021-0001](https://rustsec.org/advisories/RUSTSEC-2021-0001.html), CC0-1.0, modified 2023-11-08
- NVD: [CVE-2020-26297](https://nvd.nist.gov/vuln/detail/CVE-2020-26297), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2020-26297 · Whole record: https://cve.day/CVE-2020-26297.json · Rebuilt by cve.day 2026-11-25T22:57:56.856Z
