Skip to content
Heist/ feed
Back to feed
Medium

Hugo: Symlink confinement bypass in resources.Get

Type: advisorySources: OSV

Hugo is a static site generator. From 0.123.0 to 0.161.1, a regression made RootMappingFs.statRoot use Stat (follows symlinks) instead of Lstat , so a direct resources.Get of a symlink pointing outside its mount returned the target's contents — letting a symlink planted in a local mount (e.g. a vendored themes/ theme) read arbitrary files accessible to the Hugo user. Go-module themes from GitHub (symlinks stripped) and directory walks were unaffected. Fixed in 0.162.0.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-50135
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 20:42 UTC · Revision 1

Source evidence

Hugo: Symlink confinement bypass in resources.Get

core-osv · Original source

Published 6 Jul 2026, 19:52 UTC

Hugo is a static site generator. From 0.123.0 to 0.161.1, a regression made RootMappingFs.statRoot use Stat (follows symlinks) instead of Lstat , so a direct resources.Get of a symlink pointing outside its mount returned the target's contents — letting a symlink planted in a local mount (e.g. a vendored themes/ theme) read arbitrary files accessible to the Hugo user. Go-module themes from GitHub (symlinks stripped) and directory walks were unaffected. Fixed in 0.162.0.

osv:CVE-2026-50135
Complete source record
{
  "id": "e69c667992f22e5c2f9adccc4a92e2f21d86ddcecea44b19db858387437f4707",
  "url": "https://osv.dev/vulnerability/CVE-2026-50135",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Hugo: Symlink confinement bypass in resources.Get",
    "summary": "Hugo is a static site generator. From 0.123.0 to 0.161.1, a regression made RootMappingFs.statRoot use Stat (follows symlinks) instead of Lstat , so a direct resources.Get of a symlink pointing outside its mount returned the target's contents — letting a symlink planted in a local mount (e.g. a vendored themes/ theme) read arbitrary files accessible to the Hugo user. Go-module themes from GitHub (symlinks stripped) and directory walks were unaffected. Fixed in 0.162.0.",
    "evidence": "osv:CVE-2026-50135",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2026-50135",
      "aliases": [
        "CVE-2026-50135",
        "GHSA-fw87-fv5r-9fpw",
        "GO-2026-5380"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/gohugoio/hugo",
              "type": "GIT",
              "events": [
                {
                  "introduced": "3c8a4713908e48e6523f058ca126710397aa4ed5"
                },
                {
                  "fixed": "ea8f66a7ce988664dcc84c052fc96757042e2e4a"
                },
                {
                  "fixed": "f8b5fa09a64950c32b803821ede411ebfe772b7a"
                },
                {
                  "fixed": "076dfe13d0f789e3d9586b192f8f7f3329c26990"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:gohugo:hugo:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0.123.0"
                      },
                      {
                        "fixed": "0.161.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "f8b5fa09a64950c32b803821ede411ebfe772b7a"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "076dfe13d0f789e3d9586b192f8f7f3329c26990"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v0.162.0"
                  }
                ]
              }
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-50135.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:39.216602445Z",
      "provider": "osv",
      "references": [
        "https://github.com/gohugoio/hugo/releases/tag/v0.162.0",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/50xxx/CVE-2026-50135.json",
        "https://github.com/gohugoio/hugo/security/advisories/GHSA-fw87-fv5r-9fpw",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-50135",
        "https://github.com/gohugoio/hugo/commit/f8b5fa09a64950c32b803821ede411ebfe772b7a"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-59"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/50xxx/CVE-2026-50135.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-50135",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 506805,
  "published_at": "2026-07-06T19:52:04.561+00:00"
}