{"id":"CVE-2026-102941","published":"2026-10-16T15:38:18Z","modified":"2026-10-26T17:37:11Z","title":"gomarkdown/markdown IsSafeURL panics on short URLs","vendor":"gomarkdown","product":"markdown","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00488,"percentile":0.34732,"provenance":"source"},"cwes":[{"id":"CWE-125","name":"Out-of-bounds Read"}],"references":[{"url":"https://github.com/gomarkdown/markdown/security/advisories/GHSA-cv23-7vc5-jfh7","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/gomarkdown/markdown/commit/61af6e1e69710c5ca13cfbaaaa1bc11bc763a8a9","tags":["x_refsource_MISC"]}],"priority":{"score":12.2,"factors":[{"name":"EPSS percentile","points":6.95},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"gomarkdown","affectedVersions":[{"vendor":"gomarkdown","product":"markdown","versions":["< 0.0.0-20260724235538-61af6e1e6971"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2026-10-26T17:28:56.649619Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"github.com/gomarkdown/markdown","vulnerableRanges":["<0.0.0-20260724235538-61af6e1e6971"],"patched":["0.0.0-20260724235538-61af6e1e6971"],"from":["GHSA-cv23-7vc5-jfh7"],"provenance":"source"}],"summary":{"text":"The gomarkdown/markdown Go library's parser.IsSafeURL function (in parser/parser.go) slices a URL before checking its length, so a short link destination can trigger a slice-bounds panic when rendering with html.Safelink enabled or when a short URL is passed directly to the exported function. An unauthenticated remote attacker who supplies untrusted Markdown with a short or empty link destination, or a short URL to a caller of parser.IsSafeURL, can crash the calling process, causing denial of service, with no user interaction or configuration beyond enabling html.Safelink.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:05:22Z"},"euvd":{"id":"EUVD-2026-102934","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2023-42821","published":"2023-09-22","fixed":"0.0.0-20230922105210-14b16010c2ee","kev":false},{"cve":"CVE-2024-44337","published":"2024-10-15","fixed":"0.0.0-20240729212818-a2a9c4f76ef5","kev":false},{"cve":"CVE-2026-40890","published":"2026-04-21","fixed":"0.0.0-20260411013819-759bbc3e3207","kev":false,"link":{"from":"CVE-2026-40890","to":"CVE-2026-102941","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Go:github.com/gomarkdown/markdown","fromFixed":"0.0.0-20260411013819-759bbc3e3207","toFixed":"0.0.0-20260724235538-61af6e1e6971","daysApart":178}]}},{"cve":"CVE-2026-102941","published":"2026-10-16","fixed":"0.0.0-20260724235538-61af6e1e6971","kev":false}],"package":"Go:github.com/gomarkdown/markdown"}}