CVE-2026-35166: Hugo Certain Markdown Links Are Not Vulnerability
MODERATECVE-2026-35166 is a MODERATE certain markdown links are not vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Hugo libraries in the Go ecosystem. The issue involves certain markdown links are not properly escaped. Remediation is available by upgrading affected packages to version 0.159.2.
CVE-2026-35166 at a Glance
How to Fix CVE-2026-35166
To remediate this vulnerability, upgrade all affected 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.159.2
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-2026-35166, inspect your project dependencies for Hugo:
inspect dependencies for github.com/gohugoio/hugo
Analyze the terminal output to locate any version of Hugo in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.159.2), 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 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-2026-35166 Affected Hugo Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/gohugoio/hugo
|
Go |
≥ 0.60.0
< 0.159.2
|
0.159.2
|
References
Frequently Asked Questions
What is CVE-2026-35166?
Which Hugo versions are affected?
What version fixes CVE-2026-35166?
Is github.com/gohugoio/hugo affected?
What CWE is associated with CVE-2026-35166?
How can I check Go dependencies for CVE-2026-35166?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-mcv8-8m8x-48pg",
"modified" : "2026-04-06T23:42:22Z",
"published" : "2026-04-03T23:38:19Z",
"aliases" : [ "CVE-2026-35166" ],
"summary" : "Hugo: Certain markdown links are not properly escaped",
"details" : "### Impact\nLinks and image links in the default markdown to HTML renderer are not properly escaped. Hugo users who trust their Markdown content or have custom render hooks for links and images are not affected.\n\n### Patches\nPatched in v0.159.2\n\n### Workarounds\nCreate custom render hooks for links and images in a Hugo theme/project.",
"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.60.0"
}, {
"fixed" : "0.159.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/gohugoio/hugo/security/advisories/GHSA-mcv8-8m8x-48pg"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-35166"
}, {
"type" : "WEB",
"url" : "https://github.com/gohugoio/hugo/commit/479fe6c654937a850b65e74551dc4e857d52898f"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/gohugoio/hugo"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-03T23:38:19Z",
"nvd_published_at" : "2026-04-06T18:16:43Z"
}
}