XSS in mdBook's search page
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- Low · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.
Summary
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| rust-lang | mdBook | before 0.4.5 | 0.4.5 | Patch available | CNA |
| — | mdBook (crates.io) | 0.1.4 to before 0.4.5 | 0.4.5 | Patch available | GHSA-gx5w-rrhp-f436 |
- mdBook Vendorrust-lang Affected before 0.4.5 Fixed in 0.4.5 Patch available CNA
- mdBook (crates.io) Vendor— Affected 0.1.4 to before 0.4.5 Fixed in 0.4.5 Patch available GHSA-gx5w-rrhp-f436
Remediation
- Fix · CNA mdBook (rust-lang) Fixed in 0.4.5
- Fix · GHSA-gx5w-rrhp-f436 mdBook (crates.io) Fixed in 0.4.5 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2020-26297
- 2026-10-03 Alias added: GHSA-gx5w-rrhp-f436
References
Advisory 5
Sources
- CVE-2020-26297 · CVE Program
- CVE-2020-26297 · NVD
- FIRST EPSS
- GHSA-gx5w-rrhp-f436 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences