VDB
Sign up
MEDIUM5.4

GHSA-xvg9-69gf-fjrf

Material for MkDocs: DOM XSS in search suggestions via query parameter

Quick fix

GHSA-xvg9-69gf-fjrf — mkdocs-material: upgrade to the fixed version with the command below.

pip install --upgrade 'mkdocs-material>=9.7.7'

Details

### Impact

Material for MkDocs 7.2.0 through 9.7.6 contains a DOM-based cross-site scripting vulnerability in the optional `search.suggest` feature. A crafted `q` URL parameter could execute JavaScript in the documentation site's origin after user interaction.

### Patches

The issue is fixed in Material for MkDocs 9.7.7. Users should upgrade to 9.7.7 or later.

### Workarounds

Sites unable to upgrade should disable the `search.suggest` feature.

Are you affected?

Enter the version of the package you're using.

Affected packages

PyPI/mkdocs-material
Introduced in: 7.2.0Fixed in: 9.7.7
Fixpip install --upgrade 'mkdocs-material>=9.7.7'

References