{"answers":{"affected":"3 open source packages ship an affected version, including github.com/gomarkdown/markdown. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-42821 exists.","fix":"Upgrade github.com/gomarkdown/markdown to 0.0.0-20230922105210-14b16010c2ee or later.","what":"CVE-2023-42821 is a high-severity denial of service vulnerability in gomarkdown markdown, published on 22 Sep 2023. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2023-42821 and fix it if it is affected.\n\nWhat it is: CVE-2023-42821 is a high-severity denial of service vulnerability in gomarkdown markdown, published on 22 Sep 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-42821 exists.\n\nAffected packages and fixed versions:\n- github.com/gomarkdown/markdown (Go): affected all versions; fixed in 0.0.0-20230922105210-14b16010c2ee\n- github.com/gomarkdown/markdown (Go): affected all versions; fixed in 0.0.0-20230922105210-14b16010c2ee\n- github.com/gomarkdown/markdown (Go): affected all versions; fixed in 0.0.0-20230922105210-14b16010c2ee\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2023-42821/ (Markdown: https://insights.sbomify.com/CVE-2023-42821/index.md)","id":"CVE-2023-42821","markdown":"https://insights.sbomify.com/CVE-2023-42821/index.md","name":"CVE-2023-42821","record":{"aliases":["AZL-39828","CLEANSTART-2026-DC83183","DEBIAN-CVE-2023-42821","GHSA-m9xq-6h2j-65r2","GO-2023-2074","UBUNTU-CVE-2023-42821"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":true,"product_category":"Go Markdown library","requires_auth":"none","summary":"An attacker can cause a denial of service in applications using the gomarkdown library by providing malformed input when the Mmark extension is enabled.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"markdown","vendor":"gomarkdown"}],"cvss":{"score":7.5,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","version":"3.1"},"cwes":[{"id":"CWE-125","name":"Out-of-bounds Read"}],"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.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"github.com/gomarkdown/markdown Out-of-bounds Read while parsing citations","id":"CVE-2023-42821","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"denial_of_service","year":"2023"},"n_packages":3,"n_references":3,"next":{"headline":"Unchecked access to font glyph info in xrdp","id":"CVE-2023-42822"},"packages":[{"ecosystem":"Go","fixed":["0.0.0-20230922105210-14b16010c2ee"],"introduced":["0"],"last_affected":[],"package":"github.com/gomarkdown/markdown","purl":null,"source":"GHSA-m9xq-6h2j-65r2"},{"ecosystem":"Go","fixed":["0.0.0-20230922105210-14b16010c2ee"],"introduced":["0"],"last_affected":[],"package":"github.com/gomarkdown/markdown","purl":"pkg:golang/github.com/gomarkdown/markdown","source":"GHSA-m9xq-6h2j-65r2"},{"ecosystem":"Go","fixed":["0.0.0-20230922105210-14b16010c2ee"],"introduced":["0"],"last_affected":[],"package":"github.com/gomarkdown/markdown","purl":"pkg:golang/github.com/gomarkdown/markdown","source":"GO-2023-2074"}],"prev":{"headline":"Random seed leakage in Jumpserver","id":"CVE-2023-42820"},"products":["markdown"],"published":"2023-09-22","related":[{"cvss_score":7.5,"headline":"github.com/gomarkdown/markdown: Out-of-bounds Read in SmartypantsRenderer","id":"CVE-2026-40890","kev_date_added":null,"published":"2026-04-21"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-09-24","vendors":["gomarkdown"]},"summary":"An attacker can cause a denial of service in applications using the gomarkdown library by providing malformed input when the Mmark extension is enabled.","url":"https://insights.sbomify.com/CVE-2023-42821/"}