nday
GHSA-r73q-gwx2-fpxm

Hugo theme-defined module replacements bypass mount restrictions and widen the Node.js read sandbox

公開当日に修正版が確認されています。修正済みバージョンは github.com/gohugoio/hugo 0.168.0 です。4 つの PoC ソースのいずれにも未掲載です。CISA KEV には現時点で未掲載です。

tags weakness typebroken access control accesslocalno authentication required ecosystemGo
why these tags

nday derives these tags by fixed rules from the facts below; NVD, the CNA and other sources do not assign them. Vocabulary and rules: ~/tags.

broken access control
CWE-863, stated by GitHub advisory GHSA-r73q-gwx2-fpxm
local
AV:L in CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N (CVSS 4.0) from GitHub advisory GHSA-r73q-gwx2-fpxm
no authentication required
PR:N in CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N (CVSS 4.0) from GitHub advisory GHSA-r73q-gwx2-fpxm
Go
GHSA-r73q-gwx2-fpxm: go packages github.com/gohugoio/hugo
現在の段階
PAT
公開日時
公開から修正版まで
T+0d
CVSS 基本値
6.7 MEDIUM v4.0

ライフサイクル

横軸は UTC。点=分単位、幅広の帯=日付のみ、白抜き=不明または推定。
日時不明
DIS公開
11-30T21:49Z
PAT修正
11-30T22:03Z
ANA解析
記録なし
POCPoC
記録なし
ITW悪用
記録なし
KEVKEV
記録なし

概要

### Summary

A theme or module could define its own module.replacements and mount directories anywhere on the host.

### Details

A theme or module could define its own module.replacements. If the project didn't set any replacements, Hugo applied the theme's replacements as if the project had set them. The theme could then import and mount a directory anywhere on the host, either by absolute path or by escaping themesDir with ../. This got around the rule that theme mount sources must be local paths.

Mounting such a directory as assets also added it to the Node.js --allow-fs-read roots. That widened the security.node.permissions sandbox. For example, Node tools such as css.PostCSS could read files from that directory and load JavaScript modules from it.

Only sites that use an untrusted theme or module are affected.

### Proof of concept

Create a theme as outlined in the Go test below:

func TestMountRestrictThemeReplacements(t *testing.T) {
    files := `
-- hugo.toml --
disableKinds = ["taxonomy", "term", "rss"]
theme = "mytheme"
-- themes/mytheme/hugo.toml --
[module]
replacements = "evil -> ../../secret"
[[module.imports]]
path = "evil"
[[module.imports.mounts]]
source = "."
target = "assets"
-- secret/file1.txt --
file1
-- layouts/all.html --
All.
`
    b, err := hugolib.TestE(t, files)
    b.Assert(err, qt.IsNotNil)
    b.Assert(err.Error(), qt.Contains, `module "evil" not found in "/themes/evil"`)
}

### Impact

A theme could read files outside its sandbox.

Original text of GitHub advisory GHSA-r73q-gwx2-fpxm, shown as published.

Exploit conditions

What an attack needs, read from the CVSS vector.
Attack vector AV:L
Local: needs a local or SSH session, or a user tricked into acting on the machine
Attack complexity AC:L
Low: no target-specific security measures to get around
Attack requirements AT:N
None: success does not depend on how the target is deployed or running
Privileges required PR:N
None: no account or authorization needed
User interaction UI:A
Active: a user must deliberately do something specific, such as install or run a file or dismiss a warning

CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

CVSS 4.0 vector from GitHub advisory GHSA-r73q-gwx2-fpxm.

イベント履歴

+DIS公開

ghsa が公開を報告。

出典 ghsa · nday が にリアルタイムで観測 · 生データ
{
  "id": 563068,
  "type": "disclosed",
  "source": "ghsa",
  "url": "https://github.com/advisories/GHSA-r73q-gwx2-fpxm",
  "occurred_at": "2026-11-30T21:49:32Z",
  "observed_at": "2026-11-30T22:03:42.565529Z",
  "is_backfill": false,
  "dedupe_key": "GHSA-r73q-gwx2-fpxm",
  "detail": {
    "state": "PUBLISHED",
    "ghsa_id": "GHSA-r73q-gwx2-fpxm",
    "withdrawn_at": null
  }
}
ソースに時刻なし、nday が観測
+PAT修正版公開

アドバイザリ記載の修正済みバージョン:github.com/gohugoio/hugo 0.168.0。修正コミットへのリンクあり。アドバイザリの公開は 。修正版そのもののリリース日時は記録なし。

出典 ghsa · nday が にリアルタイムで観測 · 生データ
{
  "id": 563069,
  "type": "patch_released",
  "source": "ghsa",
  "url": "https://github.com/advisories/GHSA-r73q-gwx2-fpxm",
  "occurred_at": null,
  "observed_at": "2026-11-30T22:03:42.565529Z",
  "is_backfill": false,
  "dedupe_key": "GHSA-r73q-gwx2-fpxm",
  "detail": {
    "cvss": {
      "cvss_v3": {
        "score": 0.0,
        "vector_string": null
      },
      "cvss_v4": {
        "score": 6.7,
        "vector_string": "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
      }
    },
    "cwes": [
      {
        "name": "Incorrect Authorization",
        "cwe_id": "CWE-863"
      }
    ],
    "ghsa_id": "GHSA-r73q-gwx2-fpxm",
    "packages": [
      {
        "name": "github.com/gohugoio/hugo",
        "ecosystem": "go",
        "first_patched_version": "0.168.0",
        "vulnerable_version_range": ">= 0.152.0, < 0.168.0"
      }
    ],
    "severity": "medium",
    "references": [
      "https://github.com/gohugoio/hugo/security/advisories/GHSA-r73q-gwx2-fpxm",
      "https://github.com/gohugoio/hugo/pull/15426",
      "https://github.com/gohugoio/hugo/commit/6883b55ad59e0daa1aaba0cf2b66db1132202e2c",
      "https://github.com/gohugoio/hugo/releases/tag/v0.168.0",
      "https://github.com/advisories/GHSA-r73q-gwx2-fpxm"
    ],
    "fix_commit_urls": [
      "https://github.com/gohugoio/hugo/pull/15426",
      "https://github.com/gohugoio/hugo/commit/6883b55ad59e0daa1aaba0cf2b66db1132202e2c"
    ],
    "github_reviewed_at": "2026-11-30T21:49:32Z",
    "advisory_updated_at": "2026-11-30T21:49:37Z",
    "source_code_location": "https://github.com/gohugoio/hugo",
    "advisory_published_at": "2026-11-30T21:49:32Z"
  }
}

Report an error

report an error or omission

Something on this page wrong or missing? Tell the editors; if they accept it, this page's revision log says so publicly. Upstream data is not changed.

Discussion

0 comments

No comments yet.