CVE-2026-102941
sync 2026-10-16T15:41:51Z
Published Oct 16, 2026 · corrected/updated Oct 16, 2026 · evidence confidence high
## Summary IsSafeURL slices url[:nPath] before checking that len(url) >= nPath, so a URL shorter than a path prefix (0, 1 or 2 bytes) triggers a slice-bounds panic, and this is reached end to end when the html.Safelink hardening flag is enabled and the input contains an empty or very short link destination, giving an unrecoverable crash DoS. Confirmed at HEAD (e08cff8; present since 2022). ## The defect parser/parser.go, IsSafeURL: url[:nPath] is evaluated before the check. When len(url) < nPath and cap(url) < nPath, the slice expression panics. Only the relative-path loop is affected; the adjacent URIs loop is already correctly guarded (the signal that this one deviates, the same signal as the anchor). Input: IsSafeURL("") panics ([:1] cap 0), IsSafeURL(".") panics ([:2] cap 1), IsSafeURL("..") panics ([:3] cap 2), while IsSafeURL("/") returns true. End to end: with input panics. Attacker model: (1) any service rendering untrusted Markdown with the html.Safelink flag (the URL-sanitizing hardening flag itself introduces the crash); or (2) any downstream that calls the exported parser.IsSafeURL on a 0/1/2-byte attacker URL, no flag required. No recover() anywhere, so an uncaught crash of the calling goroutine. ## Verification EXECUTED with negative controls. Direct: the empty/1/2-char cases panic with the exact slice-bounds message while "/" returns true. End to end via ToHTML with html.CommonFlags|html.Safelink: panics, while , , plain text, and (safely dropped) do not. NOT verified: how many downstream apps enable Safelink or call IsSafeURL directly (the default no-Safelink render path does not reach it). ## Suggested fix Move the slice inside the guard: check first, then compute url[:nPath] (or use bytes.HasPrefix(url, path), which is length-safe). One-line change, mirroring the already-correct URIs loop. Also checked and sound: CVE-2026-40890 (smartypants smartLeftAngle OOB) is fixed; CVE-2024-44337 (list/paragraph infinite loop) is fixed (deep nesting capped at
Grounded briefings
Catalog interpretations for three audiences. Each brief cites ingested metadata and the original advisories below. They are not independent research and they do not invent exploit steps.
Executive
CVE-2026-102941 is a high public vulnerability record for this product. It is not currently listed in the CISA Known Exploited catalog. Check the linked vendor or CERT advisories for patch status. This summary is a catalog interpretation of the ingested metadata and cites the original advisories below.
System administrator
Identify whether this product is in your estate, then compare installed versions with the affected ranges. Affected packages or ranges on record: github.com/gomarkdown/markdown (0 → 0.0.0-20260724235538-61af6e1e6971); github.com/gomarkdown/markdown (<0.0.0-20260724235538-61af6e1e6971). Check the linked vendor or CERT advisories for patch status. Prefer the vendor or distribution advisory linked in Sources before changing production systems. This is a catalog interpretation, not a runbook.
Security analyst
Signals on file: CVSS 7.5. It is not currently listed in the CISA Known Exploited catalog. Weakness classes: CWE-125. Sources contributing to this record: github, gitlab, go_vulndb, osv. Public exploit references, when present, are outbound links only and are not proof of active exploitation. This is a catalog interpretation of stored metadata.
Exploitation and remediation
Exploitation evidence
Not listed as known exploited in CISA KEV. Not in CISA KEV or VulnCheck KEV.
Patch and remediation
No required-action text is stored yet. Use the vendor or CERT links in Sources for patch availability.
Safe detection guidance
Compare installed versions with the affected ranges below and verify the advisory from the original publisher. This site stores metadata and outbound links only; it does not ship exploit code or proof-of-concept payloads.
Code
The project this record applies to. Exploit listings stay in References.
Timeline
Detection, updates, and resolution for this record.
Oct 16, 2026 · GitHub Advisory Database
Fix available
github.com/gomarkdown/markdown fixed in 0.0.0-20260724235538-61af6e1e6971
Oct 16, 2026 · GitHub Advisory Database
Fix available
github.com/gomarkdown/markdown fixed in 0.0.0-20260724235538-61af6e1e6971
Oct 16, 2026 · GitHub Advisory Database
Updated
## Summary IsSafeURL slices url[:nPath] before checking that len(url) >= nPath, so a URL shorter than a path prefix (0, 1 or 2 bytes) triggers a slice-bounds panic, and this is reached end to end when the html.Safelink hardening flag is enabled and the input contains an empty or very short link destination, giving an unrecoverable crash DoS. Confirmed at HEAD (e08cff8; present since 2022). ## The
Oct 16, 2026 · GitLab Advisory Database
Detected
IsSafeURL slices url[:nPath] before checking that len(url) >= nPath, + so a URL shorter than a path prefix (0, 1 or 2 bytes) triggers a slice-bounds panic, + and this is reached end to end when the html.Safelink hardening flag is enabled + and the input contains an empty or very short link destination, giving an unrecoverable + crash DoS. Confirmed at HEAD (e08cff8; present since 2022)." +date: "2
Affected
- Go github.com/gomarkdown/markdown0 → 0.0.0-20260724235538-61af6e1e6971
- go github.com/gomarkdown/markdown<0.0.0-20260724235538-61af6e1e6971
Sources
- GitHub Advisory DatabasePackage advisoryGHSA-cv23-7vc5-jfh7
GitHub Advisory Database record mirrored by OSV.
github.com - GitLab Advisory DatabasePackage advisorygo/github.com/gomarkdown/markdown/CVE-2026-102941.yml
IsSafeURL slices url[:nPath] before checking that len(url) >= nPath, + so a URL shorter than a path prefix (0, 1 or 2 bytes) triggers a slice-bounds panic, + and this is reached end to end when the html.Safelink hardening flag is enabled + and the input contains an empty or very short link destination, giving an unrecoverable + crash DoS. Confirmed at HEAD (e08cff8; present since 2022)." +date: "2
gitlab.com - Go Vulnerability DatabasePackage advisoryGHSA-cv23-7vc5-jfh7
gomarkdown/markdown IsSafeURL panics on short URLs
osv.dev - OpenSSF OSV / OSV ScannerPackage advisoryGHSA-cv23-7vc5-jfh7
gomarkdown/markdown IsSafeURL panics on short URLs
osv.dev