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。四个 PoC 来源都还没有收录。尚未列入 CISA KEV。

标签 漏洞类型broken access control 攻击途径本地无需认证 软件包生态Go
这些标签的依据

这些标签由 nday 按固定规则从下列事实自动推导,不是 NVD、编号分配方或其他来源给出的。全部标签和规则见 ~/tags。

broken access control
CWE-863(来源:GitHub 公告 GHSA-r73q-gwx2-fpxm)
本地
GitHub 公告 GHSA-r73q-gwx2-fpxm 给出的 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)中的 AV:L
无需认证
GitHub 公告 GHSA-r73q-gwx2-fpxm 给出的 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)中的 PR:N
Go
GHSA-r73q-gwx2-fpxm:go 包 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.

以上是 GitHub 安全公告 GHSA-r73q-gwx2-fpxm 中的原文,未经改写。

利用条件

按 CVSS 向量说明攻击需要的条件。
攻击途径 AV:L
本地:需要本地或 SSH 会话,或诱使用户在本机上操作
攻击复杂度 AC:L
低:不需要绕过目标特有的安全防护
攻击前提 AT:N
无:能否成功与目标的部署和运行条件无关
所需权限 PR:N
无:不需要账号或授权
用户交互 UI:A
主动:须有用户特意执行特定操作,例如安装或运行文件、忽略安全警告

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 向量,来自 GitHub 安全公告 GHSA-r73q-gwx2-fpxm。

事件记录

+DIS披露

ghsa 报告了披露事件。

来源 ghsa · 本站 实时观测 · 原始记录
{
  "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
  }
}
来源未给时间,本站实时观测
+PAT补丁发布

公告给出修复版本 github.com/gohugoio/hugo 0.168.0。公告附有修复提交。公告本身发布于 ,补丁实际发布时间没有记录。

来源 ghsa · 本站 实时观测 · 原始记录
{
  "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"
  }
}

纠错

报告错误或缺失

页面有误或缺失?告诉编辑;采纳后在本页修订记录公开说明,上游数据不会被改动。

讨论

0 条评论

还没有评论。