GHSA-GX5W-RRHP-F436

Vulnerability from github – Published: 2021-08-25 20:56 – Updated: 2021-08-18 21:06
VLAI?
Summary
XSS in mdBook
Details

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
Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "crates.io",
        "name": "mdBook"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.1.4"
            },
            {
              "fixed": "0.4.5"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2020-26297"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-79"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2021-08-18T21:06:53Z",
    "nvd_published_at": "2021-01-04T19:15:00Z",
    "severity": "HIGH"
  },
  "details": "\u003e This is a cross-post of [the official security advisory][ml]. The official post contains a signed version with our PGP key, as well.\n\n[ml]: https://groups.google.com/g/rustlang-security-announcements/c/3-sO6of29O0\n\nThe 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.\n\nThe CVE for this vulnerability is [CVE-2020-26297](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-26297).\n\n## Overview\n\nThe 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\u0027s 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.\n\nmdBook 0.4.5 fixes the vulnerability by properly escaping the search query.\n\n## Mitigations\n\nOwners of websites built with mdBook have to upgrade to mdBook 0.4.5 or greater and rebuild their website contents with it. It\u0027s possible to install mdBook 0.4.5 on the local system with:\n\n```\ncargo install mdbook --version 0.4.5 --force\n```\n\n## Acknowledgements\n\nThanks to Kamil Vavra for responsibly disclosing the vulnerability to us according to [our security policy](https://www.rust-lang.org/policies/security).\n\n## Timeline of events\n\nAll times are listed in UTC.\n\n- 2020-12-30 20:14 - The issue is reported to the Rust Security Response WG\n- 2020-12-30 20:32 - The issue is acknowledged and the investigation began\n- 2020-12-30 21:21 - Found the cause of the vulnerability and prepared the patch\n- 2021-01-04 15:00 - Patched version released and vulnerability disclosed",
  "id": "GHSA-gx5w-rrhp-f436",
  "modified": "2021-08-18T21:06:53Z",
  "published": "2021-08-25T20:56:20Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/rust-lang/mdBook/security/advisories/GHSA-gx5w-rrhp-f436"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2020-26297"
    },
    {
      "type": "WEB",
      "url": "https://github.com/rust-lang/mdBook/commit/32abeef088e98327ca0dfccdad92e84afa9d2e9b"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/rust-lang/mdBook"
    },
    {
      "type": "WEB",
      "url": "https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-045"
    },
    {
      "type": "WEB",
      "url": "https://groups.google.com/g/rustlang-security-announcements/c/3-sO6of29O0"
    },
    {
      "type": "WEB",
      "url": "https://rustsec.org/advisories/RUSTSEC-2021-0001.html"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "XSS in mdBook"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…