Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🦀
🦀 crates.io
Not in CISA KEV
HIGH severity

XSS in mdBookGHSA-gx5w-rrhp-f436

HIGHFix: rust-lang/mdBook@32abeef

GHSA-gx5w-rrhp-f436 is a high-severity (CVSS 8.2) Cross-site Scripting (XSS) vulnerability in mdBook. A fix is available for mdBook — see the affected versions and patch details below.

Also known asCVE-2020-26297RUSTSEC-2021-0001
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Oct 11, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
1.3%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs69th percentile — riskier than 69% of all scored CVEsHighest risk
0.00%0.59%1.18%1.77%0.3%1.3%1.3%May 26Oct 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

GHSA-gx5w-rrhp-f436 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 385,738 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

1 pkg affected
🦀mdBook

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects crates.io packages — download data is not available via public APIs for these ecosystems.

Description

This is a cross-post of the official security advisory. The official post contains a signed version with our PGP key, as well.

The Rust Security Response Working Group was recently notified of a security issue affecting the search feature of mdBook, which could allow an attacker to execute arbitrary JavaScript code on the page.

The CVE for this vulnerability is CVE-2020-26297.

Overview

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.

Mitigations

Owners of websites built with mdBook have to upgrade to mdBook 0.4.5 or greater and rebuild their website contents with it. It's possible to install mdBook 0.4.5 on the local system with:

cargo install mdbook --version 0.4.5 --force

Acknowledgements

Thanks to Kamil Vavra for responsibly disclosing the vulnerability to us according to our security policy.

Timeline of events

All times are listed in UTC.

  • 2020-12-30 20:14 - The issue is reported to the Rust Security Response WG
  • 2020-12-30 20:32 - The issue is acknowledged and the investigation began
  • 2020-12-30 21:21 - Found the cause of the vulnerability and prepared the patch
  • 2021-01-04 15:00 - Patched version released and vulnerability disclosed

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🦀crates.iomdBook≥ 0.1.4&&< 0.4.50.4.5cargo update -p mdBook --precise 0.4.5

Affected Products

1 product · 1 configurations
Application
mdbookrust-lang
≥ 0.1.4 && < 0.4.5
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for mdBook, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update mdBook to 0.4.5 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-gx5w-rrhp-f436 is resolved across your whole dependency graph.

  3. Workarounds

    Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.

Frequently Asked Questions

> This is a cross-post of [the official security advisory][ml]. The official post contains a signed version with our PGP key, as well. [ml]: https://groups.google.com/g/rustlang-security-announcements/c/3-sO6of29O0 The Rust Security Response Working Group was recently notified of a security issue affecting the search feature of mdBook, which could allow an attacker to execute arbitrary JavaScript code on the page. The CVE for this vulnerability is [CVE-2020-26297](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-26297). ## Overview The search feature of mdBook (introduced in versio
O3 Security · Impact-Aware SCA

Is GHSA-gx5w-rrhp-f436 in your dependencies?

Find it across crates.io, including transitive dependencies.

XSS in mdBook (High 8.2)