CVE-2024-44337: Github.com/gomarkdown/markdown Infinite Loop Vulnerability
MODERATECVE-2024-44337 is a MODERATE (CVSS 5.1) infinite loop vulnerability (CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')) affecting Github.com/gomarkdown/markdown libraries in the Go ecosystem. The issue involves infinite loop in github.com/gomarkdown/markdown. Remediation is available by upgrading affected packages to version 0.0.0-20240729212818-a2a9c4f76ef5.
CVE-2024-44337 at a Glance
Security Impact
CVSS: 5.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L).
How to Fix CVE-2024-44337
To remediate this vulnerability, upgrade all affected Github.com/gomarkdown/markdown dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/gomarkdown/markdown to 0.0.0-20240729212818-a2a9c4f76ef5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/gomarkdown/markdown
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-44337, inspect your project dependencies for Github.com/gomarkdown/markdown:
inspect dependencies for github.com/gomarkdown/markdown
Analyze the terminal output to locate any version of Github.com/gomarkdown/markdown in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.0-20240729212818-a2a9c4f76ef5), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop'), where the product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. In Github.com/gomarkdown/markdown, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-44337 Affected Github.com/gomarkdown/markdown Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/gomarkdown/markdown
|
Go |
< 0.0.0-20240729212818-a2a9c4f76ef5
|
0.0.0-20240729212818-a2a9c4f76ef5
|
References
Frequently Asked Questions
What is CVE-2024-44337?
Which Github.com/gomarkdown/markdown versions are affected?
What version fixes CVE-2024-44337?
Is github.com/gomarkdown/markdown affected?
What is the CVSS score of CVE-2024-44337?
What CWE is associated with CVE-2024-44337?
How can I check Go dependencies for CVE-2024-44337?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-xhr3-wf7j-h255",
"modified" : "2024-12-12T17:59:12Z",
"published" : "2024-10-15T21:30:39Z",
"aliases" : [ "CVE-2024-44337" ],
"summary" : "Infinite loop in github.com/gomarkdown/markdown",
"details" : "The package `github.com/gomarkdown/markdown` is a Go library for parsing Markdown text and rendering as HTML. Prior to pseudoversion `v0.0.0-20240729232818-a2a9c4f`, which corresponds with commit `a2a9c4f76ef5a5c32108e36f7c47f8d310322252`, there was a logical problem in the paragraph function of the parser/block.go file, which allowed a remote attacker to cause a denial of service (DoS) condition by providing a tailor-made input that caused an infinite loop, causing the program to hang and consume resources indefinitely. Submit `a2a9c4f76ef5a5c32108e36f7c47f8d310322252` contains fixes to this problem.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/gomarkdown/markdown"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.0.0-20240729212818-a2a9c4f76ef5"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-44337"
}, {
"type" : "WEB",
"url" : "https://github.com/gomarkdown/markdown/commit/a2a9c4f76ef5a5c32108e36f7c47f8d310322252"
}, {
"type" : "WEB",
"url" : "https://github.com/Brinmon/CVE-2024-44337"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/gomarkdown/markdown"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2024-3205"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-835" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-10-16T14:09:50Z",
"nvd_published_at" : "2024-10-15T20:15:21Z"
}
}