{"id":"CVE-2020-5238","aliases":["ALSA-2021:1972","DEBIAN-CVE-2020-5238","EUVD-2020-26457","GHSA-7gc6-9qr5-hc85","RHSA-2021:1972","RSEC-2023-6","UBUNTU-CVE-2020-5238"],"status":"published","title":"Denial of service in table parsing in cmark-gfm","description":"The table extension in GitHub Flavored Markdown before version 0.29.0.gfm.1 takes O(n * n) time to parse certain inputs. An attacker could craft a markdown table which would take an unreasonably long time to process, causing a denial of service. This issue does not affect the upstream cmark project. The issue has been fixed in version 0.29.0.gfm.1.","severity":{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.01566,"percentile":0.75527,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-20"],"published":"2020-07-01T23:05:15Z","modified":"2026-10-29T11:00:56Z","fixes":[{"ecosystem":"AlmaLinux:8","package":"pandoc","fixed_in":["2.0.6-5.el8"],"sources":["osv"]},{"ecosystem":"AlmaLinux:8","package":"pandoc-common","fixed_in":["2.0.6-5.el8"],"sources":["osv"]},{"ecosystem":"Debian:12","package":"cmark-gfm","fixed_in":["0.29.0.gfm.2-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"cmark-gfm","fixed_in":["0.29.0.gfm.2-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"cmark-gfm","fixed_in":["0.29.0.gfm.2-1"],"sources":["osv"]},{"ecosystem":"Debian:12","package":"haskell-cmark-gfm","fixed_in":["0.2.1+ds1-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"haskell-cmark-gfm","fixed_in":["0.2.1+ds1-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"haskell-cmark-gfm","fixed_in":["0.2.1+ds1-1"],"sources":["osv"]},{"ecosystem":"Debian:12","package":"python-cmarkgfm","fixed_in":["0.7.0-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"python-cmarkgfm","fixed_in":["0.7.0-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"python-cmarkgfm","fixed_in":["0.7.0-1"],"sources":["osv"]},{"ecosystem":"Debian:12","package":"r-cran-commonmark","fixed_in":["1.8.0-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"r-cran-commonmark","fixed_in":["1.8.0-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"r-cran-commonmark","fixed_in":["1.8.0-1"],"sources":["osv"]},{"ecosystem":"Debian:12","package":"ruby-commonmarker","fixed_in":["0.21.0-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"ruby-commonmarker","fixed_in":["0.21.0-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"ruby-commonmarker","fixed_in":["0.21.0-1"],"sources":["osv"]},{"ecosystem":"Red Hat:enterprise_linux:8::crb","package":"pandoc","fixed_in":["0:2.0.6-5.el8"],"sources":["osv"]},{"ecosystem":"Red Hat:enterprise_linux:8::crb","package":"pandoc-common","fixed_in":["0:2.0.6-5.el8"],"sources":["osv"]},{"ecosystem":"CRAN","package":"commonmark","fixed_in":["1.8"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"AlmaLinux:8","package":"pandoc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.6-5.el8"}]}]},{"source":"osv","ecosystem":"AlmaLinux:8","package":"pandoc-common","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.6-5.el8"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"cmark-gfm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.29.0.gfm.2-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"cmark-gfm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.29.0.gfm.2-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"cmark-gfm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.29.0.gfm.2-1"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"haskell-cmark-gfm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.2.1+ds1-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"haskell-cmark-gfm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.2.1+ds1-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"haskell-cmark-gfm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.2.1+ds1-1"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"python-cmarkgfm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.7.0-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"python-cmarkgfm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.7.0-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"python-cmarkgfm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.7.0-1"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"r-cran-commonmark","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.8.0-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"r-cran-commonmark","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.8.0-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"r-cran-commonmark","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.8.0-1"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"ruby-commonmarker","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.21.0-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"ruby-commonmarker","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.21.0-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"ruby-commonmarker","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.21.0-1"}]}]},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::crb","package":"pandoc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:2.0.6-5.el8"}]}]},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::crb","package":"pandoc-common","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:2.0.6-5.el8"}]}]},{"source":"osv","ecosystem":"CRAN","package":"commonmark","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.2"},{"fixed":"1.8"}]}],"versions":["0.2","0.4","0.5","0.6","0.7","0.8","0.9","1.0","1.1","1.2","1.4","1.5","1.6","1.7"]},{"source":"osv","ecosystem":"Ubuntu:Pro:20.04:LTS","package":"cmark-gfm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.28.3.gfm.20-3","0.29.0.gfm.0-3","0.29.0.gfm.0-4","0.29.0.gfm.0-4ubuntu0.1~esm1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"haskell-cmark-gfm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.1.8-1build1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"python-cmarkgfm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.4.2-1build1","0.4.2-1build2"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"r-cran-commonmark","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.7-1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"ruby-commonmarker","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.17.9-1","0.20.2-1build1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"haskell-cmark-gfm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.2.1+ds1-1build1","0.2.1+ds1-2build1","0.2.1+ds1-2build2"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"python-cmarkgfm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.4.2-1build3","0.4.2-1build5","0.8.0-1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"r-cran-commonmark","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.7-2"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"haskell-cmark-gfm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.2.5+ds1-1build2","0.2.5+ds1-2"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"python-cmarkgfm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.8.0-3"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"r-cran-commonmark","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.9.0-1","1.9.1-1"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"haskell-cmark-gfm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.2.6+ds1-1"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"python-cmarkgfm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.8.0-3","2024.11.20-1"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"r-cran-commonmark","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.9.5-1"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"haskell-cmark-gfm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.2.6+ds1-3"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"python-cmarkgfm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2025.10.22-2"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"r-cran-commonmark","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.0.0-2","2.0.0-3"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"haskell-cmark-gfm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.2.6+ds1-1","0.2.6+ds1-3"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"python-cmarkgfm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2024.11.20-1","2025.10.22-1","2025.10.22-2"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"r-cran-commonmark","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.9.5-1","2.0.0-1","2.0.0-2"]}],"products":[{"vendor":"fedoraproject","product":"fedora"},{"vendor":"github","product":"cmark-gfm"},{"vendor":"github_flavored_markdown_project","product":"github_flavored_markdown"}],"references":[{"url":"https://github.com/github/cmark-gfm/security/advisories/GHSA-7gc6-9qr5-hc85","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory","report"]},{"url":"https://github.com/github/cmark-gfm/commit/85d895289c5ab67f988ca659493a64abb5fec7b4","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","report"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TCDHBTUFIOYRIS5HAS6PZNBNMB7IOAX3/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZGJH2A4VAV54X6NSCNNGSEIGIIY5N2VR/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WMQFOQQCWOAMQ4I2XIVCVOXXIJ75HDCW/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"https://errata.almalinux.org/8/ALSA-2021-1972.html","tags":["advisory"]},{"url":"https://vulners.com/cve/CVE-2020-5238","tags":["report"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2020-5238","tags":["advisory","web"]},{"url":"https://access.redhat.com/errata/RHSA-2021:1972","tags":["advisory"]},{"url":"https://access.redhat.com/security/updates/classification/#moderate","tags":["article"]},{"url":"https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/8.4_release_notes/","tags":["article"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=1854328","tags":["report"]},{"url":"https://security.access.redhat.com/data/csaf/v2/advisories/2021/rhsa-2021_1972.json","tags":["advisory"]},{"url":"https://access.redhat.com/security/cve/CVE-2020-5238","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2020-5238","tags":["advisory","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-5238","tags":["advisory"]},{"url":"https://github.com/r-lib/commonmark/issues/13","tags":["web"]},{"url":"https://github.com/r-lib/commonmark/pull/18","tags":["web"]},{"url":"https://ubuntu.com/security/CVE-2020-5238","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2020-5238","title":"Denial of service in table parsing in cmark-gfm","description":"The table extension in GitHub Flavored Markdown before version 0.29.0.gfm.1 takes O(n * n) time to parse certain inputs. An attacker could craft a markdown table which would take an unreasonably long time to process, causing a denial of service. This issue does not affect the upstream cmark project. The issue has been fixed in version 0.29.0.gfm.1.","status":"published","published":"2020-07-01T23:05:15Z","modified":"2024-08-04T08:22:09.078Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"cna"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T14:35:47.56691Z"}],"euvd":[{"id":"EUVD-2020-26457","description":"The table extension in GitHub Flavored Markdown before version 0.29.0.gfm.1 takes O(n * n) time to parse certain inputs. An attacker could craft a markdown table which would take an unreasonably long time to process, causing a denial of service. This issue does not affect the upstream cmark project. The issue has been fixed in version 0.29.0.gfm.1.","status":"published","published":"2020-07-01T23:05:15Z","modified":"2024-08-04T08:22:09Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-03T03:08:07.28588Z"}],"nvd":[{"id":"CVE-2020-5238","description":"The table extension in GitHub Flavored Markdown before version 0.29.0.gfm.1 takes O(n * n) time to parse certain inputs. An attacker could craft a markdown table which would take an unreasonably long time to process, causing a denial of service. This issue does not affect the upstream cmark project. The issue has been fixed in version 0.29.0.gfm.1.","status":"published","published":"2020-07-01T23:15:10.443Z","modified":"2026-06-17T03:21:06.427Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"secondary"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"primary"},{"version":"2.0","score":4,"vector":"AV:N/AC:L/Au:S/C:N/I:N/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T14:06:08.145904Z"}],"osv":[{"id":"CVE-2020-5238","description":"The table extension in GitHub Flavored Markdown before version 0.29.0.gfm.1 takes O(n * n) time to parse certain inputs. An attacker could craft a markdown table which would take an unreasonably long time to process, causing a denial of service. This issue does not affect the upstream cmark project. The issue has been fixed in version 0.29.0.gfm.1.","status":"published","published":"2020-07-01T23:15:10.443Z","modified":"2026-10-20T10:54:22.478999037Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-02T15:44:16.936975Z"},{"id":"DEBIAN-CVE-2020-5238","description":"The table extension in GitHub Flavored Markdown before version 0.29.0.gfm.1 takes O(n * n) time to parse certain inputs. An attacker could craft a markdown table which would take an unreasonably long time to process, causing a denial of service. This issue does not affect the upstream cmark project. The issue has been fixed in version 0.29.0.gfm.1.","status":"published","published":"2020-07-01T23:15:10.443Z","modified":"2026-10-26T12:02:50.791309679Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-02T15:45:34.019707Z"},{"id":"RHSA-2021:1972","title":"Red Hat Security Advisory: pandoc security update","status":"published","published":"2024-09-13T15:42:55Z","modified":"2026-06-29T10:35:15Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-02T15:53:08.071325Z"},{"id":"UBUNTU-CVE-2020-5238","description":"The table extension in GitHub Flavored Markdown before version 0.29.0.gfm.1 takes O(n * n) time to parse certain inputs. An attacker could craft a markdown table which would take an unreasonably long time to process, causing a denial of service. This issue does not affect the upstream cmark project. The issue has been fixed in version 0.29.0.gfm.1.","status":"published","published":"2020-07-01T23:15:00Z","modified":"2026-10-17T12:56:14.009478865Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-02T15:54:25.179924Z"},{"id":"ALSA-2021:1972","title":"Moderate: pandoc security update","description":"Pandoc is a Haskell library for converting from one markup format to another, and a command-line tool that uses this library.\n\nSecurity Fix(es):\n\n* cmark-gfm: Exponential time to parse certain inputs could lead to DoS (CVE-2020-5238)\n\nFor more details about the security issue(s), including the impact, a CVSS score, acknowledgments, and other related information, refer to the CVE page(s) listed in the References section.\n\nAdditional Changes:\n\nFor detailed information on changes in this release, see the AlmaLinux Release Notes linked from the References section.","status":"published","published":"2021-05-18T06:31:29Z","modified":"2026-10-29T11:00:56.374899597Z","updated_at":"2026-11-02T15:27:51.196609Z"},{"id":"RSEC-2023-6","title":"Denial of Service (DoS) vulnerability","description":"The commonmark package, specifically in its dependency on GitHub Flavored Markdown before version 0.29.0.gfm.1, has a vulnerability related to time complexity. Parsing certain crafted markdown tables can take O(n * n) time, leading to potential Denial of Service attacks. This issue does not affect the upstream cmark project and has been fixed in version 0.29.0.gfm.1.","status":"published","published":"2023-10-06T05:00:00.6Z","modified":"2025-05-19T19:43:47.903227Z","updated_at":"2026-11-02T15:53:39.492624Z"}]}}
