{"id":"JLSEC-2026-794","aliases":["JLSEC-2026-794"],"related":["CVE-2026-50133","EUVD-2026-41909","GHSA-c54g-xjwj-8g82"],"kind":"vulnerability","state":"published","title":"Hugo: XSS via text/html content files","summary":"**Commit:** [e41a06447d](https://github.com/gohugoio/hugo/commit/e41a06447d) — _Disallow HTML content by default_\n**Affected versions:** all Hugo versions prior to v0.162.0.\n**Fixed in:** v0.162.0.\n**Severity:** Low to Medium, depending on threat model. Not an issue if you fully trust every file under `/content` and every content adapter you load.\n\n**Description.** Hugo accepts content files in several markup formats. Files mapped to the `text/html` media type (typically `.html` files under `/content`, or pages produced by a content adapter that sets `content.mediaType = \"text/html\"`) had their body emitted verbatim into the rendered page. A site that ingests HTML content from an untrusted source — for example, a CMS-backed editor, a content adapter pulling from an external API, or an automated import pipeline — could therefore be served stored cross-site scripting.\n\n**Mitigation.** v0.162.0 introduces a `security.allowContent` whitelist with `text/html` denied by default. Sites that intentionally author HTML content can opt back in:\n\n```toml\n[security]\nallowContent = ['.*']\n```\n\nThis only affects pages whose source file (or content adapter output) declares an HTML media type; Markdown, AsciiDoc, Org, Pandoc and reStructuredText content is unaffected.","summaryFormat":"markdown","summarySource":"jlsec","descriptions":[{"lang":"en","text":"**Commit:** [e41a06447d](https://github.com/gohugoio/hugo/commit/e41a06447d) — _Disallow HTML content by default_\n**Affected versions:** all Hugo versions prior to v0.162.0.\n**Fixed in:** v0.162.0.\n**Severity:** Low to Medium, depending on threat model. Not an issue if you fully trust every file under `/content` and every content adapter you load.\n\n**Description.** Hugo accepts content files in several markup formats. Files mapped to the `text/html` media type (typically `.html` files under `/content`, or pages produced by a content adapter that sets `content.mediaType = \"text/html\"`) had their body emitted verbatim into the rendered page. A site that ingests HTML content from an untrusted source — for example, a CMS-backed editor, a content adapter pulling from an external API, or an automated import pipeline — could therefore be served stored cross-site scripting.\n\n**Mitigation.** v0.162.0 introduces a `security.allowContent` whitelist with `text/html` denied by default. Sites that intentionally author HTML content can opt back in:\n\n```toml\n[security]\nallowContent = ['.*']\n```\n\nThis only affects pages whose source file (or content adapter output) declares an HTML media type; Markdown, AsciiDoc, Org, Pandoc and reStructuredText content is unaffected.","format":"markdown","source":"jlsec"}],"published":"2026-07-25T03:41:43.685Z","modified":"2026-07-25T03:50:08.578Z","severity":{"scorer":"Julia Security Advisories","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},"severities":[{"scorer":"Julia Security Advisories","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"Julia Security Advisories","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X"}],"cwes":[],"affected":[{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.163.3+0"}],"ecosystem":"Julia","package":"Hugo_jll","purl":"pkg:julia/Hugo_jll?uuid=c8420254-0ddf-5525-a2d3-3ad9242def7d","source":"jlsec"}],"references":[{"url":"https://github.com/advisories/GHSA-c54g-xjwj-8g82","tags":["web"],"sources":["jlsec"]},{"url":"https://github.com/gohugoio/hugo/commit/e41a06447daa3071a01f333fdcec0a5153c3c8d1","tags":["web"],"sources":["jlsec"]},{"url":"https://github.com/gohugoio/hugo/releases/tag/v0.162.0","tags":["web"],"sources":["jlsec"]},{"url":"https://github.com/gohugoio/hugo/security/advisories/GHSA-c54g-xjwj-8g82","tags":["web"],"sources":["jlsec"]}],"credits":["jmooring"],"sources":[{"source":"jlsec","name":"Julia Security Advisories","id":"JLSEC-2026-794","url":"https://osv.dev/vulnerability/JLSEC-2026-794","licence":"CC-BY-4.0","modified":"2026-07-25T03:50:08.578Z"}],"updatedAt":"2026-11-25T22:56:26.239Z"}