{"id":"GHSA-c54g-xjwj-8g82","revision":"bf53bc72ae8a4845a9894c4b10c7aa60","records":[{"revision":"bf53bc72ae8a4845a9894c4b10c7aa60","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-c54g-xjwj-8g82","aliases":["CVE-2026-50133","GO-2026-5313"],"title":"Hugo: XSS via text/html content files","description":"**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.","state":0,"publishedAt":"2026-06-16T19:22:14+00:00","modifiedAt":"2026-07-07T20:41:27.3720622+00:00","affected":[{"ecosystem":"Go","name":"github.com/gohugoio/hugo","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.162.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/gohugoio/hugo/security/advisories/GHSA-c54g-xjwj-8g82","https://github.com/gohugoio/hugo/commit/e41a06447daa3071a01f333fdcec0a5153c3c8d1","https://github.com/gohugoio/hugo","https://github.com/gohugoio/hugo/releases/tag/v0.162.0"],"sourceUrl":"https://github.com/advisories/GHSA-c54g-xjwj-8g82","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-c54g-xjwj-8g82","identifiers":["GHSA-c54g-xjwj-8g82","CVE-2026-50133","GO-2026-5313"]},"retained":false,"historicalAffected":[]}],"coverage":[]}