Skip to content
Heist/ feed
Back to feed
High

golang-github-gomarkdown-markdown — security advisory

Type: advisorySources: OSVAdvisory ID: UBUNTU-CVE-2023-42821

The package `github.com/gomarkdown/markdown` is a Go library for parsing Markdown text and rendering as HTML. Prior to pseudoversion `0.0.0-20230922105210-14b16010c2ee`, which corresponds with commit `14b16010c2ee7ff33a940a541d993bd043a88940`, parsing malformed markdown input with parser that uses parser.Mmark extension could result in out-of-bounds read vulnerability. To exploit the vulnerability, parser needs to have `parser.Mmark` extension set. The panic occurs inside the `citation.go` file on the line 69 when the parser tries to access the element past its length. This can result in a denial of service. Commit `14b16010c2ee7ff33a940a541d993bd043a88940`/pseudoversion `0.0.0-20230922105210-14b16010c2ee` contains a patch for this issue.

Products
golang-github-gomarkdown-markdown
Affected versions
0.0~git20220731.dcdaee8-2, 0.0~git20231115.a660076-1, 0.0~git20260725.8435af3-1
Fixed versions
Not specified
CVEs
CVE-2023-42821
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 01:04 UTC · Revision 1

Source evidence

UBUNTU-CVE-2023-42821

core-osv · Original source

Published 22 Sept 2023, 17:15 UTC

The package `github.com/gomarkdown/markdown` is a Go library for parsing Markdown text and rendering as HTML. Prior to pseudoversion `0.0.0-20230922105210-14b16010c2ee`, which corresponds with commit `14b16010c2ee7ff33a940a541d993bd043a88940`, parsing malformed markdown input with parser that uses parser.Mmark extension could result in out-of-bounds read vulnerability. To exploit the vulnerability, parser needs to have `parser.Mmark` extension set. The panic occurs inside the `citation.go` file on the line 69 when the parser tries to access the element past its length. This can result in a denial of service. Commit `14b16010c2ee7ff33a940a541d993bd043a88940`/pseudoversion `0.0.0-20230922105210-14b16010c2ee` contains a patch for this issue.

osv:UBUNTU-CVE-2023-42821

golang-github-gomarkdown-markdown

Fixed versions: Not specified

golang-github-gomarkdown-markdown

Fixed versions: Not specified

golang-github-gomarkdown-markdown

Fixed versions: Not specified

golang-github-gomarkdown-markdown

Fixed versions: Not specified

Complete source record
{
  "id": "9f1b78a6cfc99df67f52f63979bcd06ecd7e36974db60c336e3b7b899ea91d48",
  "url": "https://osv.dev/vulnerability/UBUNTU-CVE-2023-42821",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "UBUNTU-CVE-2023-42821",
    "summary": "The package `github.com/gomarkdown/markdown` is a Go library for parsing Markdown text and rendering as HTML. Prior to pseudoversion `0.0.0-20230922105210-14b16010c2ee`, which corresponds with commit `14b16010c2ee7ff33a940a541d993bd043a88940`, parsing malformed markdown input with parser that uses parser.Mmark extension could result in out-of-bounds read vulnerability. To exploit the vulnerability, parser needs to have `parser.Mmark` extension set. The panic occurs inside the `citation.go` file on the line 69 when the parser tries to access the element past its length. This can result in a denial of service. Commit `14b16010c2ee7ff33a940a541d993bd043a88940`/pseudoversion `0.0.0-20230922105210-14b16010c2ee` contains a patch for this issue.",
    "evidence": "osv:UBUNTU-CVE-2023-42821",
    "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"
          }
        ]
      },
      {
        "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"
          }
        ]
      },
      {
        "name": {
          "value": "golang-github-gomarkdown-markdown",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.0~git20231115.a660076-1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "0.0~git20260725.8435af3-1",
            "evidence": "/affected/2/versions"
          }
        ]
      },
      {
        "name": {
          "value": "golang-github-gomarkdown-markdown",
          "evidence": "/affected/3/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.0~git20231115.a660076-1",
            "evidence": "/affected/3/versions"
          }
        ]
      }
    ],
    "severity": "high",
    "structured": {
      "id": "UBUNTU-CVE-2023-42821",
      "aliases": [
        "UBUNTU-CVE-2023-42821"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
        },
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
        },
        {
          "type": "Ubuntu",
          "score": "medium"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "golang-github-gomarkdown-markdown",
            "purl": "pkg:deb/ubuntu/golang-github-gomarkdown-markdown?arch=source&distro=noble",
            "ecosystem": "Ubuntu:24.04:LTS"
          },
          "versions": [
            "0.0~git20220731.dcdaee8-2",
            "0.0~git20231115.a660076-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-42821.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "golang-github-gomarkdown-markdown-dev",
                "binary_version": "0.0~git20231115.a660076-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "golang-github-gomarkdown-markdown",
            "purl": "pkg:deb/ubuntu/golang-github-gomarkdown-markdown?arch=source&distro=questing",
            "ecosystem": "Ubuntu:25.10"
          },
          "versions": [
            "0.0~git20231115.a660076-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-42821.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "golang-github-gomarkdown-markdown-dev",
                "binary_version": "0.0~git20231115.a660076-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "golang-github-gomarkdown-markdown",
            "purl": "pkg:deb/ubuntu/golang-github-gomarkdown-markdown?arch=source&distro=stonking",
            "ecosystem": "Ubuntu:26.10"
          },
          "versions": [
            "0.0~git20231115.a660076-1",
            "0.0~git20260725.8435af3-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-42821.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "golang-github-gomarkdown-markdown-dev",
                "binary_version": "0.0~git20260725.8435af3-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "golang-github-gomarkdown-markdown",
            "purl": "pkg:deb/ubuntu/golang-github-gomarkdown-markdown?arch=source&distro=resolute",
            "ecosystem": "Ubuntu:26.04:LTS"
          },
          "versions": [
            "0.0~git20231115.a660076-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-42821.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "golang-github-gomarkdown-markdown-dev",
                "binary_version": "0.0~git20231115.a660076-1"
              }
            ]
          }
        }
      ],
      "modified": "2026-10-17T12:56:25.669856776Z",
      "provider": "osv",
      "upstream": [
        "CVE-2023-42821"
      ],
      "references": [
        "https://ubuntu.com/security/CVE-2023-42821",
        "https://github.com/gomarkdown/markdown/commit/14b16010c2ee7ff33a940a541d993bd043a88940",
        "https://github.com/gomarkdown/markdown/security/advisories/GHSA-m9xq-6h2j-65r2",
        "https://github.com/gomarkdown/markdown/blob/7478c230c7cd3e7328803d89abe591d0b61c41e4/parser/citation.go#L69",
        "https://www.cve.org/CVERecord?id=CVE-2023-42821"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2023-42821",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 355623,
  "published_at": "2023-09-22T17:15:00+00:00"
}