# GHSA-x6m6-5hrf-fh6r: Denial of Service in markdown-it-toc-and-anchor

- Severity: High 7.5 (CVSS:3.1, scored by GitHub) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2020-09-01T21:26:50.000Z
- Modified: 2023-12-07T22:05:03.000Z
- Weaknesses: CWE-400

## Description

All versions of `markdown-it-toc-and-anchor` are vulnerable to Denial of Service. Parsing markdown containing `**text**+\n@[toc]` causes the application to enter and infinite loop.


## Recommendation

No fix is currently available. Consider using an alternative module until a fix is made available.

(As written by GitHub Advisory Database.)

## Affected

- markdown-it-toc-and-anchor (npm): before 4.2.0

## References

- <https://github.com/medfreeman/markdown-it-toc-and-anchor> (package)
- <https://snyk.io/vuln/SNYK-JS-MARKDOWNITTOCANDANCHOR-73500> (web)
- <https://www.npmjs.com/advisories/749> (web)

## Sources

- GitHub Advisory Database: [GHSA-x6m6-5hrf-fh6r](https://github.com/advisories/GHSA-x6m6-5hrf-fh6r), CC-BY-4.0, modified 2023-12-07

---

Page: https://cve.day/GHSA-x6m6-5hrf-fh6r · Whole record: https://cve.day/GHSA-x6m6-5hrf-fh6r.json · Rebuilt by cve.day 2026-11-25T22:56:46.981Z
