Skip to content
Heist/ feed
Back to feed
HighFix available

golang-github-gomarkdown-markdown — security advisory

Type: advisorySources: OSVAdvisory ID: DEBIAN-CVE-2026-102941

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.

Products
golang-github-gomarkdown-markdown
Affected versions
0.0~git20220731.dcdaee8-2, 0.0~git20231115.a660076-1, 0.0~git20260725.8435af3-1
Fixed versions
0.0~git20260725.8435af3-1
CVEs
CVE-2026-102941
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 17:49 UTC · Revision 1

Source evidence

DEBIAN-CVE-2026-102941

core-osv · Original source

Published 16 Oct 2026, 16:16 UTC

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.

osv:DEBIAN-CVE-2026-102941

golang-github-gomarkdown-markdown

Fixed versions: Not specified

golang-github-gomarkdown-markdown

Fixed versions: Not specified

golang-github-gomarkdown-markdown

Fixed versions: 0.0~git20260725.8435af3-1

Complete source record
{
  "id": "ff95c0e5cac47b4298a766c5e20a1e6e4ca036389093a3347536fc66c5ddd666",
  "url": "https://osv.dev/vulnerability/DEBIAN-CVE-2026-102941",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "DEBIAN-CVE-2026-102941",
    "summary": "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.",
    "evidence": "osv:DEBIAN-CVE-2026-102941",
    "products": [
      {
        "name": {
          "value": "golang-github-gomarkdown-markdown",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.0~git20220731.dcdaee8-2",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.0~git20231115.a660076-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.0~git20260725.8435af3-1",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "golang-github-gomarkdown-markdown",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.0~git20231115.a660076-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "0.0~git20260725.8435af3-1",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "golang-github-gomarkdown-markdown",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "0.0~git20260725.8435af3-1",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "0.0~git20231115.a660076-1",
            "evidence": "/affected/2/versions"
          }
        ]
      }
    ],
    "severity": "high",
    "structured": {
      "id": "DEBIAN-CVE-2026-102941",
      "aliases": [
        "DEBIAN-CVE-2026-102941"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "golang-github-gomarkdown-markdown",
            "purl": "pkg:deb/debian/golang-github-gomarkdown-markdown?arch=source&distro=bookworm",
            "ecosystem": "Debian:12"
          },
          "versions": [
            "0.0~git20220731.dcdaee8-2",
            "0.0~git20231115.a660076-1",
            "0.0~git20260725.8435af3-1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-102941.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "golang-github-gomarkdown-markdown",
            "purl": "pkg:deb/debian/golang-github-gomarkdown-markdown?arch=source&distro=trixie",
            "ecosystem": "Debian:13"
          },
          "versions": [
            "0.0~git20231115.a660076-1",
            "0.0~git20260725.8435af3-1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-102941.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "0.0~git20260725.8435af3-1"
                }
              ]
            }
          ],
          "package": {
            "name": "golang-github-gomarkdown-markdown",
            "purl": "pkg:deb/debian/golang-github-gomarkdown-markdown?arch=source&distro=forky",
            "ecosystem": "Debian:14"
          },
          "versions": [
            "0.0~git20231115.a660076-1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-102941.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        }
      ],
      "modified": "2026-10-27T09:47:36.501314390Z",
      "provider": "osv",
      "upstream": [
        "CVE-2026-102941"
      ],
      "references": [
        "https://security-tracker.debian.org/tracker/CVE-2026-102941"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2026-102941",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 461296,
  "published_at": "2026-10-16T16:16:52.937+00:00"
}