github gohugoio/hugo v0.168.0

3 hours ago

Notable new features

  • New imaging.firstFrameOnly option (and a matching processing flag) to only decode/encode the first frame of animated images. Hugo now also only decodes the first frame when the target format doesn't support animation, and fails early with an informative error if processing all frames would exceed the WASM memory limit.
  • New FrameCount method on images, e.g. to check if an image is animated.
  • site.Language now has Translate and Format* methods, so you can e.g. range over site.Languages and translate into each language.
  • New charset option for js.Build and css.Build.
  • Basic support for the OSC 7501 program status (working/done/idle/error) in terminals that support it, alongside the existing OSC 9;4 progress.

Security fixes

This release is built with Go 1.27.2, which includes 15 security fixes. The most relevant for Hugo are:

  • Two html/template escaping fixes, which also apply to Hugo's fork of the package: CVE-2026-94448 (context tracking not reset on consecutive expressions in JS template literals) and CVE-2026-97030 (yield not recognized as a regexp preceder keyword). Both could lead to incorrect escaping of inline JavaScript.
  • Several net/http fixes (HTTP/2 server crash and memory exhaustion, connection desynchronization, unbounded Range header parsing), relevant for hugo server and remote resources. The corresponding HTTP/2 fixes are also included via the upgrade of golang.org/x/net to v0.61.0.
  • CVE-2026-56857: os.Root.Mkdir(All) could follow junctions out of the root on Windows.

Also:

  • github.com/tdewolff/minify is upgraded to v2.24.19, which fixes GHSA-3ppm-p7r9-c5w3: </script> (and <!--) inside inline scripts was not properly escaped (case-insensitively) when minifying JS in HTML.
  • Hugo now ignores module.replacements defined in themes; only the project can define replacements.

Changes

Dependency Updates

Build Setup

Don't miss a new hugo release

NewReleases is sending notifications on new releases.