Repository navigation
config/security: Harden the default http.urls and resolved address checks - #15285
Merged
Merged
Conversation
…ecks The default IP-literal deny rule was case-sensitive, so an uppercase scheme (e.g. HTTP://127.0.0.1/) slipped past it. Make it case-insensitive like the other default rules. CheckAllowedHTTPAddress relied on IsGlobalUnicast/IsPrivate, which admit CGNAT (100.64.0.0/10), TEST-NET, benchmarking, reserved and IPv6 documentation ranges, and NAT64 addresses embedding an internal IPv4 address. Deny those explicitly and unwrap NAT64 before classifying. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
22 tasks done
bep
added a commit
that referenced
this pull request
Sep 24, 2026
30306d771 content: Update header level for Inline partial section 06f6b95c1 content: Add inline partial section to template types (#3686) 21ceed2ad content: Update hosting and deployment instructions 891289a0b content: Add searchmysite.net to open-source search tool list 4e13ad9cf content: Clarify result of unmarshaling CSV data de947ba5d theme: Reformat layouts with gotmplfmt v0.5.0 4558dd3c8 content: Standardize references to executables 8b4a5445c misc: Create script to lint heading structure 00378032a content: Clarify that config merge can occur at any level 849b4c49f content: Update style guide 271e4bfb8 content: Fix front matter 9a554d1fe content: Draft standard for function and method pages 6790441ba content: Document root-level _merge and configuration categories 55e1d9848 content: Update style guide 813a42907 content: Comply with revised heading rules in style guide d6e984b5b content: Update Truncate.md for safe HTML handling 664a84f03 content: Standardize argument names in function and method signatures 76fa3fc9e content: Comply with function/method description guidance in style guide 9ab8a1d18 content: Add guideline for subsection introductions to style guide 9dd34a7fe content: Update function/method description guidance in style guide c65c6d0dd theme: Use description list for function/method metadata ccf6b2435 content: Comply with heading rules in style guide f8356a77a content: Remove extraneous include file bfe40a569 content: Clarify single heading guidance in style guide 70bd45e21 content: Refine IndexOf examples and cross references 99158f49a content: Fix typo 689b794bf content: Miscellaneous edits 68e6e3e83 content: Updates for v0.166.0 6e03b1d62 netlify: Hugo 0.166.0 e3a5d1497 Merge branch 'tempv0.166.0' 14700d617 content: Fix broken AWS S3 link on the hugo deploy page 9ff89c730 hexec: Fail on symlinks that escape the Node.js permission paths 24d583444 config/security: Add http.proxyFromEnvironment and document the resolved address check 97ace08c2 Merge commit '371d4c4a44526c154bfb3f5110dede3f5c6dd75e' a29c7ef17 config/security: Harden the default http.urls and resolved address checks (#15285) f0856e812 tpl/crypto: Add crypto.Hash 40f5c104a Merge commit 'af91eb1997ace34ef5eed0be31646e8483b78096' 66a4e7955 deps: Add Chroma dark/light mode support 384268eb7 Merge commit 'c86d9f4aa8a58931f52df6516f10b67c807505fb' 8572bbc52 resources: Support babel/postcss config variants 3d54a3cf4 Add image processing support for AVIF 6d713bf83 Merge commit 'c23d97904fd31ef745bece57133aa1b9275ec20c' d840d7a68 docs: Update docs.yaml 8db29140a docs: Update docs.yaml e8fa7dcbb Merge commit 'e7afabb927a79b179ae57013fd5f49e32829671e' fbb82d463 refactor: Deprecate language configuration and template methods dcd46c406 docs: Regen and fix the imaging docshelper output b2c24503d Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' 80febd2f1 resources/images: Adjust WebP processing defaults 7ce14f324 Add per-request timeout option to `resources.GetRemote` 86f2061c8 docs: Fix lineNos default value in docs.yaml b9f6b233c docs: Regenerate docs.yaml fec99a912 Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82' 8c0b9d0f0 docs: Update docs.yaml a472497d6 Merge commit '08e1ea5c709d3d49bdc3ce3c21e8fa05a33150d0' 3d122016c tpl: Add missing functions to init files 26592839a markup/asciidocext: Improve Asciidoctor integration bc0fcbafe github: Add ai-watchdog workflow and update other workflows' versions 5fe1c723a markup/goldmark: Enhance footnote extension with backlinkHTML option 8de6c4ba8 markup/goldmark: Enhance footnote extension with auto-prefixing option 4c9e50d76 config/security: Add PROGRAMDATA to the osenv allowlist 2d9c7ee44 minifiers: Update deprecation handling git-subtree-dir: docs git-subtree-split: 30306d771fe806e8bb7841358ae41f795669407c
santiagon610
pushed a commit
to santiagon610/personal-website
that referenced
this pull request
Sep 28, 2026
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [gohugoio/hugo](https://github.com/gohugoio/hugo) | minor | `0.165.0` → `0.166.0` | --- ### Release Notes <details> <summary>gohugoio/hugo (gohugoio/hugo)</summary> ### [`v0.166.0`](https://github.com/gohugoio/hugo/releases/tag/v0.166.0) [Compare Source](gohugoio/hugo@v0.165.0...v0.166.0) This release is mostly about hardening and bug fixes, but there are some notable changes: - [`.Render`](https://gohugo.io/methods/page/render/) now takes an optional context argument: `{{ .Render "view" $ctx }}`, mirroring the `partial` API. This makes it possible to pass e.g. a dict to a content view. See [#​15077](gohugoio/hugo#15077). - The [`return`](https://gohugo.io/functions/go-template/return/) keyword in templates has been reimplemented. It now works in any template (not just partials) and can be used anywhere, e.g. inside `if` or `range` blocks. See [#​15212](gohugoio/hugo#15212). - New [`resources.Publish`](https://gohugo.io/functions/resources/publish/) template function and [`IndexOf`](https://gohugo.io/methods/pages/indexof/) method on `Pages`. - [`related`](https://gohugo.io/configuration/related-content/) config: new `tokenize` option for index values, and index creation is faster. - Several [security](https://gohugo.io/configuration/security/) fixes; see the notes below. #### Note - tpl/transform: Bump fileCacheEntryVersion in transform.ToMath (note) [`8d88b8b`](gohugoio/hugo@8d88b8b4) [@​bep](https://github.com/bep) [#​15267](gohugoio/hugo#15267) - resources/images: Bump formatVersionNumbers.PNG and fix version cache busting for images.Filter (note) [`d19e0a4`](gohugoio/hugo@d19e0a4b) [@​bep](https://github.com/bep) [#​12536](gohugoio/hugo#12536) [#​12543](gohugoio/hugo#12543) [#​15266](gohugoio/hugo#15266) - warpc/js: Upgrade katex to 0.18.4 (note) [`ec52e63`](gohugoio/hugo@ec52e638) [@​bep](https://github.com/bep) [#​15254](gohugoio/hugo#15254) - hexec: Fail on symlinks that escape the Node.js permission paths [`c05c012`](gohugoio/hugo@c05c012a) [@​bep](https://github.com/bep) - config/security: Deny text/org content by default [`e6abb9c`](gohugoio/hugo@e6abb9c3) [@​bep](https://github.com/bep) - config/security: Add http.proxyFromEnvironment and document the resolved address check [`6a2a955`](gohugoio/hugo@6a2a955d) [@​bep](https://github.com/bep) [#​15301](gohugoio/hugo#15301) [#​15302](gohugoio/hugo#15302) - deps: Upgrade github.com/gobwas/glob v0.2.3 => v1.0.0 [`efd2456`](gohugoio/hugo@efd24562) [@​bep](https://github.com/bep) [#​15273](gohugoio/hugo#15273) - hugofs: Drop symlinked mount roots [`938c820`](gohugoio/hugo@938c8206) [@​bep](https://github.com/bep) - tpl: Improve the return keyword in templates [`8405b80`](gohugoio/hugo@8405b802) [@​bep](https://github.com/bep) [#​15212](gohugoio/hugo#15212) - resources/page: Don't let a title's "/" split an auto-derived slug [`39507d5`](gohugoio/hugo@39507d51) [@​ipince](https://github.com/ipince) [#​4092](gohugoio/hugo#4092) [#​3577](gohugoio/hugo#3577) [#​5571](gohugoio/hugo#5571) [#​4090](gohugoio/hugo#4090) ##### Glob patterns The glob library used for e.g. module mounts (`includeFiles`, `excludeFiles`), `cascade` targets, `segments`, `deployment` matchers and `noVendor` has been upgraded to v1.0.0. This is a complete rewrite of the matching engine that fixes a long list of correctness bugs, but it also means that some patterns may behave differently: - Malformed patterns (e.g. an unclosed `{`, an empty `[]` class) now fail with a syntax error instead of being silently accepted. - `**` matches any sequence of characters including separators, but it is not the `**/` "globstar" of shells: `**/x` requires the literal `/` and does not match `x`, and `a/**/b` does not match `a/b`. Use `{**/,}x` if you need both. - `\` is the escape character, so a literal backslash must be written as `\\`. If a pattern that used to match no longer does (or vice versa), it was most likely relying on a bug in the old engine. ##### Security - `text/org` content is now denied by default, as Org mode's export blocks and `@@html:...@@` snippets pass raw HTML through unescaped, making it the same XSS sink as `text/html`. Sites with Org content can opt back in via `security.allowContent`. - Remote fetches (`resources.GetRemote` etc.) now validate the resolved address at dial time and reject loopback, private, link-local, CGNAT and similar ranges. This only applies under the default `security.http.urls` allowlist; if you have customized it, you have opted into your own hosts and the check stands down. Proxies from `HTTP_PROXY`/`HTTPS_PROXY` hide the destination address from this check and are now ignored unless you set `security.http.proxyFromEnvironment = true`. - Node.js tools (PostCSS, Tailwind CSS etc.) now fail before invocation if a symlink inside the project resolves outside the allowed read/write roots. If you have a legitimate link, add its target to `security.node.permissions.allowRead`. - Mount roots that are themselves symlinks (e.g. `themes/mytheme/assets -> /somewhere/else`) are now dropped. This closes a gap in the `themes/` confinement; absolute mount `source` values are still allowed. ##### Other - `{{ return <value> }}` outside a partial is now an error; it was previously silently ignored. - A page without an explicit `slug` whose title contains a `/` (e.g. `Watch/listen to this`) now gets a single URL segment (`.../watch-listen-to-this/`) instead of a nested one (`.../watch/listen-to-this/`). Taxonomy and term pages are not affected. - Hugo is now built with Go 1.27. ##### KaTeX When upgrading to Hugo v0.166.0, sites using `transform.ToMath` with the `output` option set to `html` or `htmlAndMathml` must update the KaTeX stylesheet referenced in their template(s) to version 0.18.4 or higher. Using older CSS versions like 0.16.21 will cause certain mathematical or chemical expressions to render incorrectly. Example update: ```diff - <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.21/dist/katex.min.css"> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.18.4/dist/katex.min.css"> ``` See these examples: - <https://gohugo.io/functions/transform/tomath/#step-3> - <https://gohugo.io/render-hooks/passthrough/#example> #### Bug fixes - tpl/strings: Fix replaceRE with zero-width assertions [`ae07063`](gohugoio/hugo@ae07063f) [@​youdie006](https://github.com/youdie006) - common/hreflect: Fix the off-by-one in the float to int overflow guards [`5130d00`](gohugoio/hugo@5130d000) [@​youdie006](https://github.com/youdie006) - resources/images: Fix filters on transparent colors and paletted images [`7785668`](gohugoio/hugo@77856683) [@​bep](https://github.com/bep) [#​12536](gohugoio/hugo#12536) [#​12543](gohugoio/hugo#12543) - github: Fix workflow for stale issues [`efe5cbc`](gohugoio/hugo@efe5cbc7) [@​jmooring](https://github.com/jmooring) [#​15261](gohugoio/hugo#15261) - all: Run modernize -fix ./... [`7b5199f`](gohugoio/hugo@7b5199fd) [@​bep](https://github.com/bep) - commands: Fix lang flag description in config command [`87260e4`](gohugoio/hugo@87260e4a) [@​jmooring](https://github.com/jmooring) [#​15223](gohugoio/hugo#15223) - hugolib: Fix slice bounds panic when deleting multiple nodes at same path [`49dceb1`](gohugoio/hugo@49dceb19) [@​bep](https://github.com/bep) [#​15207](gohugoio/hugo#15207) - hugolib: Fix ReadingTime and FuzzyWordCount calculations [`5e70992`](gohugoio/hugo@5e709925) [@​jmooring](https://github.com/jmooring) [#​15206](gohugoio/hugo#15206) #### Improvements - js: Add es2025 as supported build target [`857120b`](gohugoio/hugo@857120b7) [@​bep](https://github.com/bep) [#​15307](gohugoio/hugo#15307) - hugofs: Drop symlinked mount roots [`938c820`](gohugoio/hugo@938c8206) [@​bep](https://github.com/bep) - markup/highlight: Escape lineAnchors before passing it to Chroma [`3b2d3b8`](gohugoio/hugo@3b2d3b82) [@​bep](https://github.com/bep) - tpl/partials: Slight performance improvement of the common partialCached case [`9c2527f`](gohugoio/hugo@9c2527f8) [@​bep](https://github.com/bep) - Add internalExternal.IgnoreTailwindCSSSecurityError config option [`a36bd27`](gohugoio/hugo@a36bd274) [@​bep](https://github.com/bep) - config/security: Harden the default http.urls and resolved address checks ([#​15285](gohugoio/hugo#15285)) [`24d5e42`](gohugoio/hugo@24d5e42f) [@​bep](https://github.com/bep) - resources/images: Preserve the source palette for geometric filter chains [`9e7c978`](gohugoio/hugo@9e7c978e) [@​bep](https://github.com/bep) [#​12543](gohugoio/hugo#12543) - resources/images: Add golden test cases for geometric filter chains on paletted images [`6b5b7d8`](gohugoio/hugo@6b5b7d82) [@​bep](https://github.com/bep) [#​12543](gohugoio/hugo#12543) - resources/images: Add some golden test cases [`62e24b7`](gohugoio/hugo@62e24b7e) [@​bep](https://github.com/bep) [#​12536](gohugoio/hugo#12536) [#​12543](gohugoio/hugo#12543) - related: Speed up index creation [`f61346e`](gohugoio/hugo@f61346ed) [@​bep](https://github.com/bep) - related: Add tokenize option for index values [`850f11c`](gohugoio/hugo@850f11c0) [@​jmooring](https://github.com/jmooring) [#​7515](gohugoio/hugo#7515) [#​15199](gohugoio/hugo#15199) - resources/page: Don't let a title's "/" split an auto-derived slug [`39507d5`](gohugoio/hugo@39507d51) [@​ipince](https://github.com/ipince) [#​4092](gohugoio/hugo#4092) [#​3577](gohugoio/hugo#3577) [#​5571](gohugoio/hugo#5571) [#​4090](gohugoio/hugo#4090) - config/allconfig: Improve resilience of hugo mod init [`90fe506`](gohugoio/hugo@90fe5068) [@​jmooring](https://github.com/jmooring) [#​15253](gohugoio/hugo#15253) - tpl: Separate deferred templates by escaping mode [`49835f8`](gohugoio/hugo@49835f8f) [@​Soundcreates](https://github.com/Soundcreates) [#​15234](gohugoio/hugo#15234) - resources: Validate the resolved address on remote fetches [`d6e6f9e`](gohugoio/hugo@d6e6f9e5) [@​bep](https://github.com/bep) [#​15247](gohugoio/hugo#15247) - markup: Escape code-fence attribute values in the default renderer [`e4dc48c`](gohugoio/hugo@e4dc48cf) [@​bep](https://github.com/bep) [#​15247](gohugoio/hugo#15247) - hugolib: Make .Render take an optional context argument [`bcde806`](gohugoio/hugo@bcde8063) [@​bep](https://github.com/bep) [#​15077](gohugoio/hugo#15077) - modules/npm: Make the generated workspace package private with a stable name [`df4ac34`](gohugoio/hugo@df4ac348) [@​bep](https://github.com/bep) [#​15245](gohugoio/hugo#15245) - common/hstore: Keep read lock while sorting map values [`166d3ee`](gohugoio/hugo@166d3ee1) [@​Soundcreates](https://github.com/Soundcreates) [#​15237](gohugoio/hugo#15237) - metrics: Improve template metrics duration formatting [`a25af7f`](gohugoio/hugo@a25af7fa) [@​Shiwang0-0](https://github.com/Shiwang0-0) [#​15027](gohugoio/hugo#15027) - Remove comments from rebuild test functions [`723579f`](gohugoio/hugo@723579ff) [@​bep](https://github.com/bep) - hugolib: Add some fast render mode integration tests [`85ad5e4`](gohugoio/hugo@85ad5e48) [@​bep](https://github.com/bep) - Upgrade to Go 1.27 [`e31ff54`](gohugoio/hugo@e31ff547) [@​bep](https://github.com/bep) [#​15228](gohugoio/hugo#15228) - tpl: Improve the return keyword in templates [`8405b80`](gohugoio/hugo@8405b802) [@​bep](https://github.com/bep) [#​15212](gohugoio/hugo#15212) - page: Add IndexOf method to Pages [`bf05832`](gohugoio/hugo@bf05832d) [@​Shiwang0-0](https://github.com/Shiwang0-0) [#​13589](gohugoio/hugo#13589) - tpl/resources: Add resources.Publish [`a05736c`](gohugoio/hugo@a05736cb) [@​bep](https://github.com/bep) [#​15208](gohugoio/hugo#15208) - markup/pandoc: Support pandoc 3.11 and later [`423e9ce`](gohugoio/hugo@423e9cea) [@​jmooring](https://github.com/jmooring) [#​15271](gohugoio/hugo#15271) [#​15280](gohugoio/hugo#15280) #### Dependency Updates - build(deps): bump google.golang.org/grpc from 1.83.1 to 1.83.2 [`3fbfd27`](gohugoio/hugo@3fbfd273) [@​dependabot](https://github.com/dependabot)\[bot] - build(deps): bump golang.org/x/sync from 0.22.0 to 0.23.0 [`393de58`](gohugoio/hugo@393de587) [@​dependabot](https://github.com/dependabot)\[bot] - build(deps): bump golang.org/x/mod from 0.40.0 to 0.41.0 [`870f746`](gohugoio/hugo@870f7464) [@​dependabot](https://github.com/dependabot)\[bot] - build(deps): bump github.com/getkin/kin-openapi from 0.146.0 to 0.149.0 [`6152e22`](gohugoio/hugo@6152e22e) [@​dependabot](https://github.com/dependabot)\[bot] - build(deps): bump github.com/bits-and-blooms/bitset [`5b6e7c2`](gohugoio/hugo@5b6e7c23) [@​dependabot](https://github.com/dependabot)\[bot] - build(deps): bump github.com/bep/lazycache from 0.8.1 to 0.9.0 [`dc03bb2`](gohugoio/hugo@dc03bb27) [@​dependabot](https://github.com/dependabot)\[bot] - build(deps): bump github.com/bep/tmc from 0.6.0 to 0.7.0 [`701dd33`](gohugoio/hugo@701dd337) [@​dependabot](https://github.com/dependabot)\[bot] - build(deps): bump github.com/yuin/goldmark from 1.8.5 to 1.8.6 [`b4062c8`](gohugoio/hugo@b4062c84) [@​dependabot](https://github.com/dependabot)\[bot] - build(deps): bump golang.org/x/image from 0.44.0 to 0.45.0 [`cdd1627`](gohugoio/hugo@cdd16273) [@​dependabot](https://github.com/dependabot)\[bot] - deps: Upgrade github.com/gobwas/glob v0.2.3 => v1.0.0 [`efd2456`](gohugoio/hugo@efd24562) [@​bep](https://github.com/bep) [#​15273](gohugoio/hugo#15273) - build(deps): bump golang.org/x/mod from 0.39.0 to 0.40.0 [`d462968`](gohugoio/hugo@d4629682) [@​dependabot](https://github.com/dependabot)\[bot] - build(deps): bump github.com/tdewolff/minify/v2 from 2.24.16 to 2.24.17 [`fd5f7c6`](gohugoio/hugo@fd5f7c6e) [@​dependabot](https://github.com/dependabot)\[bot] - build(deps): bump github.com/gohugoio/httpcache from 0.8.0 to 0.9.0 [`6b33517`](gohugoio/hugo@6b335176) [@​dependabot](https://github.com/dependabot)\[bot] - build(deps): bump google.golang.org/grpc from 1.82.1 to 1.83.1 [`5f0d88b`](gohugoio/hugo@5f0d88b8) [@​dependabot](https://github.com/dependabot)\[bot] - build(deps): bump golang.org/x/tools from 0.48.0 to 0.49.0 [`9171dae`](gohugoio/hugo@9171daeb) [@​dependabot](https://github.com/dependabot)\[bot] - build(deps): bump software.sslmate.com/src/go-pkcs12 from 0.7.0 to 0.7.2 [`d1ee825`](gohugoio/hugo@d1ee825b) [@​dependabot](https://github.com/dependabot)\[bot] </details> --- ### Configuration 📅 **Schedule**: (in timezone Etc/UTC) - Branch creation - Between 12:00 AM and 03:59 AM, only on Monday (`* 0-3 * * 1`) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC42NS41IiwidXBkYXRlZEluVmVyIjoiNDQuNjUuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19--> Co-authored-by: Renovate <renovate@users.noreply.code.inl.io> Reviewed-on: https://code.inl.io/nick/personal-website/pulls/13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The default IP-literal deny rule was case-sensitive, so an uppercase
scheme (e.g. HTTP://127.0.0.1/) slipped past it. Make it case-insensitive
like the other default rules.
CheckAllowedHTTPAddress relied on IsGlobalUnicast/IsPrivate, which admit
CGNAT (100.64.0.0/10), TEST-NET, benchmarking, reserved and IPv6
documentation ranges, and NAT64 addresses embedding an internal IPv4
address. Deny those explicitly and unwrap NAT64 before classifying.
Co-Authored-By: Claude Fable 5.1 noreply@anthropic.com