# CVE-2026-102941: gomarkdown/markdown IsSafeURL panics on short URLs

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `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
- Likelihood of exploitation in the next 30 days (EPSS): 0.37%, higher than 32% of CVEs (2026-12-01)
- Published: 2026-10-16T15:38:18.086Z
- Modified: 2026-10-26T18:17:23.420Z
- Also known as: GHSA-cv23-7vc5-jfh7
- Weaknesses: CWE-125
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: GitHub_M

## Description

The package github.com/gomarkdown/markdown is a Go library for parsing Markdown text and rendering as HTML. Prior to 0.0.0-20260724235538-61af6e1e6971, parser.IsSafeURL in parser/parser.go slices url[:nPath] before the len(url) >= nPath guard. A short destination causes a slice-bounds panic when the loop reaches a relative-path prefix for which len(url) < nPath and cap(url) < nPath. The one-byte destination / is an explicit non-panic counterexample because it matches the first valid path and returns before a longer prefix is sliced. Demonstrated panic cases include empty, ., and .. destinations under those conditions. The panic is reachable when markdown.ToHTML renders untrusted Markdown with html.Safelink enabled, including an empty link destination, and is also reachable by callers that pass a short attacker-controlled URL directly to the exported parser.IsSafeURL function. An uncaught panic can terminate the calling process and cause denial of service. This issue is fixed in 0.0.0-20260724235538-61af6e1e6971.

(As written by CVE List.)

## Affected

- gomarkdown markdown: < 0.0.0-20260724235538-61af6e1e6971
- github.com/gomarkdown/markdown (Go): before 0.0.0-20260724235538-61af6e1e6971

## Every score

- GitHub_M: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/gomarkdown/markdown/security/advisories/GHSA-cv23-7vc5-jfh7> (web)
- <https://github.com/gomarkdown/markdown/commit/61af6e1e69710c5ca13cfbaaaa1bc11bc763a8a9> (web)
- <https://github.com/gomarkdown/markdown> (package)

## Sources

- CVE List: [CVE-2026-102941](https://www.cve.org/CVERecord?id=CVE-2026-102941), CVE Terms of Use, modified 2026-10-26
- GitHub Advisory Database: [GHSA-cv23-7vc5-jfh7](https://github.com/advisories/GHSA-cv23-7vc5-jfh7), CC-BY-4.0, modified 2026-10-16
- NVD: [CVE-2026-102941](https://nvd.nist.gov/vuln/detail/CVE-2026-102941), Public domain, modified 2026-10-26

---

Page: https://cve.day/CVE-2026-102941 · Whole record: https://cve.day/CVE-2026-102941.json · Rebuilt by cve.day 2026-11-25T22:59:45.057Z
