CVE-2026-102941
Received Received - Intake

Slice-Bounds Panic in GoMarkdown Markdown Parser

Vulnerability report for CVE-2026-102941, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-10-16

Last updated on: 2026-10-16

Assigner: GitHub, Inc.

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-10-16
Last Modified
2026-10-16
Generated
2026-10-16
AI Q&A
2026-10-16
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
gomarkdown markdown < 0.0.0-20260724235538-61af6e1e6971

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-125 The product reads data past the end, or before the beginning, of the intended buffer.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability is a slice-bounds panic in the IsSafeURL function of the github.com/gomarkdown/markdown Go library. It occurs when the function slices a URL before verifying its length, causing a panic for very short URLs like empty strings, '.', '..', or '/'. This happens because the slice operation url[:nPath] executes before the check len(url) >= nPath, leading to an out-of-bounds error.

Detection Guidance

To detect this vulnerability, check if your system uses the affected version of github.com/gomarkdown/markdown library (prior to 0.0.0-20260724235538-61af6e1e6971). Inspect Go module dependencies for the package and verify the version in use.

Impact Analysis

The vulnerability can cause a denial-of-service (DoS) condition by terminating the calling process when processing untrusted Markdown with html.Safelink enabled. It is triggered by short or empty link destinations in Markdown, such as [x](), leading to an unrecoverable panic.

Compliance Impact

This vulnerability primarily causes denial-of-service (DoS) conditions by triggering panics in the parsing process. It does not directly affect data confidentiality or integrity, which are key concerns for GDPR and HIPAA. However, prolonged DoS conditions could impact system availability, potentially violating service-level agreements or operational requirements in regulated environments.

Mitigation Strategies

Update the github.com/gomarkdown/markdown package to version 0.0.0-20260724235538-61af6e1e6971 or later. If immediate update is not possible, disable the html.Safelink feature in your Markdown parser to prevent the panic condition.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-102941. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart