{"id":"CVE-2020-26297","published":"2021-01-04T18:45:15Z","modified":"2024-08-04T15:56:04Z","title":"XSS in mdBook's search page","vendor":"rust-lang","product":"mdBook","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.2,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0127,"percentile":0.70516,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/rust-lang/mdBook/security/advisories/GHSA-gx5w-rrhp-f436","tags":["x_refsource_CONFIRM"]},{"url":"https://groups.google.com/g/rustlang-security-announcements/c/3-sO6of29O0","tags":["x_refsource_MISC"]},{"url":"https://crates.io/crates/mdbook","tags":["x_refsource_MISC"]},{"url":"https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-045","tags":["x_refsource_MISC"]},{"url":"https://github.com/rust-lang/mdBook/commit/32abeef088e98327ca0dfccdad92e84afa9d2e9b","tags":["x_refsource_MISC"]}],"priority":{"score":19.8,"factors":[{"name":"EPSS percentile","points":14.1},{"name":"CVSS severity","points":5.74}]},"vendorSlug":"rust-lang","affectedVersions":[{"vendor":"rust-lang","product":"mdBook","versions":["< 0.4.5"]}],"affected":[{"ecosystem":"crates.io","package":"mdBook","vulnerableRanges":[">=0.1.4, <0.4.5",">=0.1.4-0, <0.4.5"],"patched":["0.4.5"],"from":["GHSA-gx5w-rrhp-f436","RUSTSEC-2021-0001"],"provenance":"source"}],"summary":{"text":"mdBook, a Rust utility for building online books from Markdown, has a cross-site scripting flaw in the search feature of its generated pages, present in versions before 0.4.5, where the search query is not properly escaped. An attacker can run arbitrary JavaScript in a user's browser by getting the user to type a malicious search query or to click a link to the search page with that query prefilled, which requires no authentication but does require user interaction.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:15:25Z"},"euvd":{"id":"EUVD-2021-1733","exploited":false,"provenance":"source"}}