CVE-2024-55601: Github.com/gohugoio/hugo Hugo Does Not Escape Some Vulnerability
MODERATECVE-2024-55601 is a MODERATE hugo does not escape some vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Github.com/gohugoio/hugo libraries in the Go ecosystem. The issue involves hugo does not escape some attributes in internal templates. Remediation is available by upgrading affected packages to version 0.139.4.
CVE-2024-55601 at a Glance
How to Fix CVE-2024-55601
To remediate this vulnerability, upgrade all affected Github.com/gohugoio/hugo 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/gohugoio/hugo to 0.139.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/gohugoio/hugo
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-55601, inspect your project dependencies for Github.com/gohugoio/hugo:
inspect dependencies for github.com/gohugoio/hugo
Analyze the terminal output to locate any version of Github.com/gohugoio/hugo in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.139.4), 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-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Github.com/gohugoio/hugo, 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-55601 Affected Github.com/gohugoio/hugo Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/gohugoio/hugo
|
Go |
≥ 0.123.0
< 0.139.4
|
0.139.4
|
References
Frequently Asked Questions
What is CVE-2024-55601?
Which Github.com/gohugoio/hugo versions are affected?
What version fixes CVE-2024-55601?
Is github.com/gohugoio/hugo affected?
What CWE is associated with CVE-2024-55601?
How can I check Go dependencies for CVE-2024-55601?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-c2xf-9v2r-r2rx",
"modified" : "2024-12-10T15:33:23Z",
"published" : "2024-12-09T20:44:50Z",
"aliases" : [ "CVE-2024-55601" ],
"summary" : "Hugo does not escape some attributes in internal templates",
"details" : "## Impact\n\nSome HTML attributes in Markdown in the internal templates listed below not escaped. Impacted are Hugo users who do not trust their Markdown content files and are using one or more of these templates.\n\n* `_default/_markup/render-link.html` from `v0.123.0`\n* `_default/_markup/render-image.html` from `v0.123.0`\n* `_default/_markup/render-table.html` from `v0.134.0`\n* `shortcodes/youtube.html` from `v0.125.0`\n\n## Patches\n\nPatched in v0.139.4.\n\n## Workarounds\n\nReplace with user defined templates or disable the internal templates: https://gohugo.io/getting-started/configuration-markup/#renderhooksimageenabledefault\n\n## References\n\n* https://github.com/gohugoio/hugo/releases/tag/v0.139.4\n* https://gohugo.io/about/security/\n\n\n",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/gohugoio/hugo"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.123.0"
}, {
"fixed" : "0.139.4"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/gohugoio/hugo/security/advisories/GHSA-c2xf-9v2r-r2rx"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-55601"
}, {
"type" : "WEB",
"url" : "https://github.com/gohugoio/hugo/commit/54398f8d572c689f9785d59e907fd910a23401b0"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/gohugoio/hugo"
}, {
"type" : "WEB",
"url" : "https://github.com/gohugoio/hugo/releases/tag/v0.139.4"
}, {
"type" : "WEB",
"url" : "https://gohugo.io/getting-started/configuration-markup/#renderhooksimageenabledefault"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-12-09T20:44:50Z",
"nvd_published_at" : "2024-12-09T22:15:23Z"
}
}