{"schemaVersion":4,"id":"CVE-2020-26297","aliases":["GHSA-gx5w-rrhp-f436","RUSTSEC-2021-0001"],"status":"published","duplicateOf":null,"title":"XSS in mdBook's search page","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.","dates":{"published":"2021-01-04T18:45:15.000Z","modified":"2024-08-04T15:56:04.096Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":8.2,"severity":"high","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":8.2,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:N","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Crates.io","score":6.1,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","exploitability":7.2,"impact":4.5,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":6.1,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","exploitability":null,"impact":null,"computed":false},{"version":"2.0","versionLabel":"v2.0","source":"NVD","score":4.3,"severity":"medium","vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.0127,"percentile":0.70788,"severity":"low","asOf":"2026-12-04T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-11-04T00:00:00.000Z","baselineScore":0.0127},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.01254,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.01254,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.01254,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.01254,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.01254,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.01254,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.01254,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.01254,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.01254,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.01254,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.01254,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01254,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01254,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01254,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01254,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-10-21T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-10-22T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-10-23T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-10-24T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-10-25T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-10-26T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-10-27T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-10-28T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-10-29T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-10-30T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-10-31T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-01T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-02T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-03T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-04T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-05T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-06T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-07T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-08T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-09T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-10T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-11T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-12T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-13T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-14T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-15T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-16T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-17T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-18T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-19T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-20T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-21T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-22T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-23T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-24T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-25T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-26T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-27T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-28T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-29T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-30T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-12-01T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-12-02T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-12-03T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.0127,"percentile":0.70788}],"last30":[{"date":"2026-11-04T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-05T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-06T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-07T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-08T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-09T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-10T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-11T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-12T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-13T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-14T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-15T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-16T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-17T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-18T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-19T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-20T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-21T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-22T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-23T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-24T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-25T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-26T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-27T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-28T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-29T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-11-30T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-12-01T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-12-02T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-12-03T00:00:00.000Z","score":0.0127,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.0127,"percentile":0.70788}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation","description":"The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.","type":"weakness","status":"Stable","abstraction":"Base","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/79.html"}],"affected":[{"vendor":"Crates.Io","product":"mdbook","name":"mdbook","label":"mdbook","ecosystem":"Crates.Io","cpePart":null,"purl":"pkg:cargo/mdbook","purlType":"cargo","versions":[{"text":"≥ 0.1.4, < 0.4.5","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"0.1.4","startInclusive":true,"end":"0.4.5","endInclusive":false}},{"text":"≥ 0.1.4-0, < 0.4.5","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"0.1.4-0","startInclusive":true,"end":"0.4.5","endInclusive":false}}],"versionsText":"≥ 0.1.4, < 0.4.5 | ≥ 0.1.4-0, < 0.4.5","eol":null,"hubHref":null},{"vendor":"rust-lang","product":"mdbook","name":"mdbook","label":"mdbook","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 0.4.5","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"0.4.5","endInclusive":false}},{"text":"≥ 0.1.4, < 0.4.5","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"0.1.4","startInclusive":true,"end":"0.4.5","endInclusive":false}}],"versionsText":"< 0.4.5 | ≥ 0.1.4, < 0.4.5","eol":null,"hubHref":"/vendor/rust-lang/mdbook"}],"affectedCount":2,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/rust-lang/mdBook/security/advisories/GHSA-gx5w-rrhp-f436","label":"github.com/rust-lang/mdBook/security/advisories/GHSA-gx5w-rrhp-f436","hostname":"github.com","tags":["X Refsource CONFIRM","WEB","Mitigation","Third Party Advisory"]},{"url":"https://groups.google.com/g/rustlang-security-announcements/c/3-sO6of29O0","label":"groups.google.com/g/rustlang-security-announcements/c/3-sO6of29O0","hostname":"groups.google.com","tags":["X Refsource MISC","WEB","Mailing List","Third Party Advisory"]},{"url":"https://crates.io/crates/mdbook","label":"crates.io/crates/mdbook","hostname":"crates.io","tags":["X Refsource MISC","PACKAGE","Product","Third Party Advisory"]},{"url":"https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-045","label":"github.com/rust-lang/mdBook/blob/master/CHANGELOG.md","hostname":"github.com","tags":["X Refsource MISC","WEB","Release Notes","Third Party Advisory"]},{"url":"https://github.com/rust-lang/mdBook/commit/32abeef088e98327ca0dfccdad92e84afa9d2e9b","label":"github.com/rust-lang/mdBook/commit/32abeef088e98327ca0dfccdad92e84afa9d2e9b","hostname":"github.com","tags":["X Refsource MISC","WEB","Patch","Third Party Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-26297","label":"nvd.nist.gov/vuln/detail/CVE-2020-26297","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/rust-lang/mdBook","label":"github.com/rust-lang/mdBook","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0001.html","label":"rustsec.org/advisories/RUSTSEC-2021-0001.html","hostname":"rustsec.org","tags":["WEB","Advisory"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2021-01-04T18:45:15.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2024-08-04T15:56:04.096Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"priority":{"label":"routine","tag":null,"reason":"Not severe (CVSS 8.2, network access); no exploitation reported by the 5 checked sources","nextStep":"Fix in the normal cadence","rank":[0,0,0,0,1,82],"checkedSources":["cisa","enisa","circl","shadowserver","cisa-adp"],"evidence":[{"type":"epss","source":"FIRST","date":"2026-12-04T00:00:00.000Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"value":0.0127,"stale":false,"promoted":null},{"type":"cvss","source":"cve.org","date":"2024-08-04T15:56:04.096Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":8.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:N","version":"3.1","headline":true},{"type":"cvss","source":"osv_crates.io","date":"2024-08-04T15:56:04.096Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","version":"3.1"},{"type":"cvss","source":"nvd","date":"2024-08-04T15:56:04.096Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","version":"3.1"},{"type":"cvss","source":"nvd","date":"2024-08-04T15:56:04.096Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":4.3,"vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","version":"2.0"}],"epss":{"value":0.0127,"date":"2026-12-04T00:00:00.000Z","stale":false,"promoted":null},"sources":[{"id":"cisa","lastSuccessfulSync":"2026-12-05T10:02:10.250Z","state":"fresh"},{"id":"enisa","lastSuccessfulSync":"2026-12-05T10:02:10.837Z","state":"fresh"},{"id":"circl","lastSuccessfulSync":"2026-12-05T10:02:11.033Z","state":"fresh"},{"id":"shadowserver","lastSuccessfulSync":null,"state":"unavailable"},{"id":"cisa-adp","lastSuccessfulSync":"2026-12-05T10:01:03.214Z","state":"fresh"},{"id":"epss","lastSuccessfulSync":"2026-12-05T10:02:08.667Z","state":"fresh"},{"id":"osv","lastSuccessfulSync":"2026-12-05T10:02:07.694Z","state":"fresh"}],"feedEvent":null},"meta":{"dataAsOf":"2026-12-05T10:44:18.734Z","stale":false,"partial":false}}