CVE-2026-102941 Details
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.
A denial-of-service vulnerability has been identified in the gomarkdown markdown library, prior to version 0.0.0-20260724235538-61af6e1e6971. The issue arises in the IsSafeURL function within parser/parser.go, where the URL is sliced before checking its length. This flaw can lead to a slice-bounds panic when processing short or empty link destinations, especially under the 'html.Safelink' option, which is designed to sanitize URLs but inadvertently triggers the crash. The vulnerability can also be exploited by directly passing a short, attacker-controlled URL to the IsSafeURL function.
Users should update to gomarkdown markdown version 0.0.0-20260724235538-61af6e1e6971 or later, where this issue has been fixed.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Oct 16, 2026CISA-ADP
Assessed Oct 26, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/gomarkdown/markdown/commit/61af6e1e69710c5ca13cfbaaaa1bc11bc763a8a9 | [email protected] | Source CodeVendor |
| https://github.com/gomarkdown/markdown/security/advisories/GHSA-cv23-7vc5-jfh7 | [email protected] | AdvisoryRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-125 | Out-of-bounds Read | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| github.com/gomarkdown/markdown | <= 0.0.0-20991231235959-ffffffffffff (semver) |
CPE
Remediation
| |
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 26, 2026 | CVE Modified | CISA-ADP |
| Oct 16, 2026 | New CVE Received | [email protected] |
Volerion