CVE-2023-42821 json
github.com/gomarkdown/markdown Out-of-bounds Read while parsing citations
published 2023-09-22 3 y ago modified 2026-09-10 1 mo ago also EUVD-2023-2549 , GHSA-m9xq-6h2j-65r2 , GO-2023-2074
- cvss
- 7.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.3%
- EPSS 1.3% chance of exploitation in 30 days, percentile 69%
- public exploits
- 0
- none known
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.
Patch / fix
- go github.com/gomarkdown/markdown 0.0.0-20230922105210-14b16010c2ee
- gomarkdown markdown 0.0.0-20230922105210-14b16010c2ee
- golang-github-gomarkdown-markdown Debian 14, Debian 13 0.0~git20231115.a660076-1
debian advisories DEBIAN-CVE-2023-42821
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2023-42821 updated cvss 6.2
gomarkdown-markdown: Out-of-bounds Read while parsing citations
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- yes
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
1.25% chance of exploitation in the next 30 days, higher than 69% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/gomarkdown/markdown/security/advisories/GHSA-m9xq-6h2j-65r2 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| go | github.com/gomarkdown/markdown | <0.0.0-20230922105210-14b16010c2ee |
0.0.0-20230922105210-14b16010c2ee |
Affected products
- gomarkdown markdown
Classification
- Weakness
-
- CWE-125 Out-of-bounds Read
References
-
github.com
/gomarkdown/markdown/commit/14b16010c2ee7ff33a940a541d993bd043a88940
web, patch
-
github.com
/gomarkdown/markdown/security/advisories/GHSA-m9xq-6h2j-65r2
web, exploit, vendor-advisory, advisory
-
github.com
/gomarkdown/markdown/blob/7478c230c7cd3e7328803d89abe591d0b61c41e4/parser/citation.go#L69
web, product
-
nvd.nist.gov
/vuln/detail/CVE-2023-42821
advisory
-
github.com
/gomarkdown/markdown
package
Sources
- CVE List CVE-2023-42821
- GitHub Advisory GHSA-m9xq-6h2j-65r2
- NVD CVE-2023-42821
- OSV GO-2023-2074
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Add fix versions.