{"id":"CVE-2026-50133","aliases":["GHSA-c54g-xjwj-8g82","GO-2026-5313"],"url":"https://o3.security/vulnerability/CVE-2026-50133","summary":"Hugo: XSS via text/html content files","details":"**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.","published":"2026-07-06T19:31:18.386Z","modified":"2026-10-28T02:30:46.579063156Z","cvss":null,"epss":{"score":0.00327,"percentile":0.25237,"asOf":"2026-09-01"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Go","name":"github.com/gohugoio/hugo","fixedVersion":"0.162.0"}],"fix":{"url":"https://github.com/gohugoio/hugo/commit/e41a06447daa3071a01f333fdcec0a5153c3c8d1","label":"gohugoio/hugo@e41a064"},"references":[{"type":"WEB","url":"https://github.com/gohugoio/hugo/releases/tag/v0.162.0"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/50xxx/CVE-2026-50133.json"},{"type":"ADVISORY","url":"https://github.com/gohugoio/hugo/security/advisories/GHSA-c54g-xjwj-8g82"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-50133"},{"type":"FIX","url":"https://github.com/gohugoio/hugo/commit/e41a06447daa3071a01f333fdcec0a5153c3c8d1"},{"type":"PACKAGE","url":"https://github.com/gohugoio/hugo"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-28T02:30:46.579063156Z"}}