Vulnerabilities in pkg:golang/github.com/theupdateframework/go-tuf/v2

PACKAGE
Advisory Identifier: GHSA-jqc5-w2xx-5vq4
Advisory Summary

CVE-2026-24686 is a MODERATE (CVSS 4.7) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Github.com/theupdateframework/go tuf/v2 libraries in the Go ecosystem. The issue involves go-tuf path traversal in tap 4 multirepo client allows arbitrary file write via malicious repository names. Remediation is available by upgrading affected packages to version 2.4.1.

4 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/theupdateframework/go-tuf/v2

4 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/theupdateframework/go-tuf/v2. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-jqc5-w2xx-5vq4 CVE-2026-24686 MODERATE go-tuf Path Traversal in TAP 4 Multirepo Client Allows Arbitrary File Write via Malicious Repository Names
GHSA-fphv-w9fq-2525 CVE-2026-23992 MODERATE go-tuf improperly validates the configured threshold for delegations
GHSA-846p-jg2w-w324 CVE-2026-23991 MODERATE go-tuf affected by client DoS via malformed server response
GHSA-4f8r-qqr9-fq8j CVE-2024-47534 HIGH Incorrect delegation lookups can make go-tuf download the wrong artifact

CVE-2026-24686 at a Glance

CVE Identifier CVE-2026-24686
GHSA Identifier GHSA-jqc5-w2xx-5vq4
Severity MODERATE
CVSS v3.1 Base Score 4.7
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Github.com/theupdateframework/go tuf/v2
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 4.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N).

Attack Vector Local (AV:L)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2026-24686

To remediate this vulnerability, upgrade all affected Github.com/theupdateframework/go tuf/v2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/theupdateframework/go-tuf/v2 fixed: 2.4.1
Upgrade github.com/theupdateframework/go-tuf/v2 to 2.4.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/theupdateframework/go-tuf/v2

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-24686, inspect your project dependencies for Github.com/theupdateframework/go tuf/v2:

inspect dependencies for github.com/theupdateframework/go-tuf/v2

Analyze the terminal output to locate any version of Github.com/theupdateframework/go tuf/v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.4.1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Github.com/theupdateframework/go tuf/v2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

# Security Vulnerability: Path Traversal in TAP 4 Multirepo Client ## Summary go-tuf's TAP 4 Multirepo Client uses the map file repository name string (`repoName`) as a filesystem path component when selecting the local metadata cache directory. If an application accepts a map file from an untrusted source, an attacker can supply a `repoName` containing traversal (e.g., `../escaped-repo`) and cause go-tuf to create directories and write the root metadata file outside the intended `LocalMetadataDir` cache base, within the running process's filesystem permissions. ## Affected Component | Field | Value | |-------|-------| | **File** | `metadata/multirepo/multirepo.go` | | **Function** | `(*MultiRepoClient) initTUFClients() error` | | **Callsite** | `metadataDir := filepath.Join(client.Config.LocalMetadataDir, repoName)` (around line 129 at the pinned commit) | ## Impact When the TAP 4 map file content is attacker-controlled, this enables arbitrary file write relative to the process permissions (via metadata persistence during client initialization). This can be used to overwrite files writable by the process (for example, configuration files in writable directories) and may enable further compromise depending on the deployment environment. > **Note:** Exploitability is deployment-dependent. If the map file is always local and trusted (not attacker-controlled), this reduces to a misconfiguration risk rather than a remotely triggerable issue. ## Attacker Model - Attacker can cause the application to load a TAP 4 map file whose `repositories` keys are attacker-controlled (for example: fetched from a URL, supply-chain substituted, or otherwise attacker-influenced input). - Local caching is enabled (`DisableLocalCache=false`) and the configured `LocalMetadataDir` is writable by the running process. **Claim Ceiling:** HIGH when the map file is attacker-controlled; if the map file is always local and trusted, this is closer to a configuration footgun and likely lands as MEDIUM/LOW. | Field | Value | |-------|-------| | **Affected Versions** | ≤ 2.4.0 | | **Verified On** | Commit `bde5f18dc95dfac365fc452ee4e278e5fd66d4b4` (tag v2.4.0) | > **Note:** First affected version has not been bisected. ## Reproduction Attachments include `poc.zip` with: - `canonical.log` (contains `[CALLSITE_HIT]`, `[PROOF_MARKER]`) - `control.log` (contains `[CALLSITE_HIT]`, `[NC_MARKER]`, does not contain `[PROOF_MARKER]`) - `fix.patch` (minimal validation sketch) **Expected:** Multirepo repository names are treated as identifiers; a TAP 4 map file containing traversal or absolute paths is rejected (or safely normalized so that all writes stay under `LocalMetadataDir`). **Actual:** A traversal `repoName` escapes `LocalMetadataDir` and go-tuf persists `root.json` under the escaped path during initialization. ### Run Local Repro ```bash rm -rf _poc mkdir -p _poc unzip -q -o poc.zip -d _poc cd _poc/poc make canonical make control ``` ## Workarounds 1. Treat TAP 4 map files as trusted configuration only (do not fetch from untrusted sources). 2. Validate repo names before passing the map file to go-tuf (reject absolute paths, path separators, and traversal components like `.` / `..`). 3. If acceptable for the application, disable local caching to avoid writing metadata to disk (`DisableLocalCache=true`). ## Suggested Remediation Validate multirepo repository names as identifiers (not paths) before using them in `filepath.Join`. Reject: - Absolute paths - Path separators (`/` and `\`) - Traversal components (`.` and `..`) If it is important to accept a wider set of repo names, a safer alternative is to map repo names to a stable, validated directory name (for example via encoding or hashing) and to ensure all writes stay under the cache base directory. ## Triage Questions 1. Is the TAP 4 map file expected to ever be fetched from untrusted sources in supported deployments? 2. Should invalid repo names be treated as a hard error (reject initialization), or as a soft error (skip that repository entry)? ## Attachments - [poc.zip](https://github.com/user-attachments/files/24849854/poc.zip) - [addendum.md](https://github.com/user-attachments/files/24849855/addendum.md) - [e2e.zip](https://github.com/user-attachments/files/24849856/e2e.zip) - [PR_DESCRIPTION.md](https://github.com/user-attachments/files/24849858/PR_DESCRIPTION.md) --- *Reported by: Oleh*

CVE-2026-24686 Affected Github.com/theupdateframework/go tuf/v2 Versions

1 component(s)
Fixed Versions:
2.4.1
Product / Package Ecosystem Affected Versions Fixed Version
github.com/theupdateframework/go-tuf/v2
Go
< 2.4.1
2.4.1

References

Frequently Asked Questions

What is CVE-2026-24686?
CVE-2026-24686 is a security vulnerability in Github.com/theupdateframework/go tuf/v2 involving go-tuf Path Traversal in TAP 4 Multirepo Client Allows Arbitrary File Write via Malicious Repository Names under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Github.com/theupdateframework/go tuf/v2 versions are affected?
Affected versions include releases prior to 2.4.1 across affected packages: github.com/theupdateframework/go-tuf/v2.
What version fixes CVE-2026-24686?
Upgrading to 2.4.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/theupdateframework/go-tuf/v2 affected?
Yes, github.com/theupdateframework/go-tuf/v2 is affected in releases prior to 2.4.1. Upgrade your dependency to 2.4.1 or later.
What is the CVSS score of CVE-2026-24686?
CVE-2026-24686 has a CVSS v3.1 base score of 4.7 (MODERATE) with vector string CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2026-24686?
CVE-2026-24686 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check Go dependencies for CVE-2026-24686?
Run the dependency tree command: 'inspect dependencies for github.com/theupdateframework/go-tuf/v2'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-jqc5-w2xx-5vq4",
  "modified" : "2026-01-29T03:26:24Z",
  "published" : "2026-01-26T23:49:55Z",
  "aliases" : [ "CVE-2026-24686" ],
  "summary" : "go-tuf Path Traversal in TAP 4 Multirepo Client Allows Arbitrary File Write via Malicious Repository Names",
  "details" : "# Security Vulnerability: Path Traversal in TAP 4 Multirepo Client\n\n## Summary\n\ngo-tuf's TAP 4 Multirepo Client uses the map file repository name string (`repoName`) as a filesystem path component when selecting the local metadata cache directory. If an application accepts a map file from an untrusted source, an attacker can supply a `repoName` containing traversal (e.g., `../escaped-repo`) and cause go-tuf to create directories and write the root metadata file outside the intended `LocalMetadataDir` cache base, within the running process's filesystem permissions.\n\n## Affected Component\n\n| Field | Value |\n|-------|-------|\n| **File** | `metadata/multirepo/multirepo.go` |\n| **Function** | `(*MultiRepoClient) initTUFClients() error` |\n| **Callsite** | `metadataDir := filepath.Join(client.Config.LocalMetadataDir, repoName)` (around line 129 at the pinned commit) |\n\n## Impact\n\nWhen the TAP 4 map file content is attacker-controlled, this enables arbitrary file write relative to the process permissions (via metadata persistence during client initialization). This can be used to overwrite files writable by the process (for example, configuration files in writable directories) and may enable further compromise depending on the deployment environment.\n\n> **Note:** Exploitability is deployment-dependent. If the map file is always local and trusted (not attacker-controlled), this reduces to a misconfiguration risk rather than a remotely triggerable issue.\n\n## Attacker Model\n\n- Attacker can cause the application to load a TAP 4 map file whose `repositories` keys are attacker-controlled (for example: fetched from a URL, supply-chain substituted, or otherwise attacker-influenced input).\n- Local caching is enabled (`DisableLocalCache=false`) and the configured `LocalMetadataDir` is writable by the running process.\n\n**Claim Ceiling:** HIGH when the map file is attacker-controlled; if the map file is always local and trusted, this is closer to a configuration footgun and likely lands as MEDIUM/LOW.\n\n| Field | Value |\n|-------|-------|\n| **Affected Versions** | ≤ 2.4.0 |\n| **Verified On** | Commit `bde5f18dc95dfac365fc452ee4e278e5fd66d4b4` (tag v2.4.0) |\n\n> **Note:** First affected version has not been bisected.\n\n## Reproduction\n\nAttachments include `poc.zip` with:\n- `canonical.log` (contains `[CALLSITE_HIT]`, `[PROOF_MARKER]`)\n- `control.log` (contains `[CALLSITE_HIT]`, `[NC_MARKER]`, does not contain `[PROOF_MARKER]`)\n- `fix.patch` (minimal validation sketch)\n\n**Expected:** Multirepo repository names are treated as identifiers; a TAP 4 map file containing traversal or absolute paths is rejected (or safely normalized so that all writes stay under `LocalMetadataDir`).\n\n**Actual:** A traversal `repoName` escapes `LocalMetadataDir` and go-tuf persists `root.json` under the escaped path during initialization.\n\n### Run Local Repro\n\n```bash\nrm -rf _poc\nmkdir -p _poc\nunzip -q -o poc.zip -d _poc\ncd _poc/poc\nmake canonical\nmake control\n```\n\n## Workarounds\n\n1. Treat TAP 4 map files as trusted configuration only (do not fetch from untrusted sources).\n2. Validate repo names before passing the map file to go-tuf (reject absolute paths, path separators, and traversal components like `.` / `..`).\n3. If acceptable for the application, disable local caching to avoid writing metadata to disk (`DisableLocalCache=true`).\n\n## Suggested Remediation\n\nValidate multirepo repository names as identifiers (not paths) before using them in `filepath.Join`. Reject:\n- Absolute paths\n- Path separators (`/` and `\\`)\n- Traversal components (`.` and `..`)\n\nIf it is important to accept a wider set of repo names, a safer alternative is to map repo names to a stable, validated directory name (for example via encoding or hashing) and to ensure all writes stay under the cache base directory.\n\n## Triage Questions\n\n1. Is the TAP 4 map file expected to ever be fetched from untrusted sources in supported deployments?\n2. Should invalid repo names be treated as a hard error (reject initialization), or as a soft error (skip that repository entry)?\n\n## Attachments\n\n- [poc.zip](https://github.com/user-attachments/files/24849854/poc.zip)\n- [addendum.md](https://github.com/user-attachments/files/24849855/addendum.md)\n- [e2e.zip](https://github.com/user-attachments/files/24849856/e2e.zip)\n- [PR_DESCRIPTION.md](https://github.com/user-attachments/files/24849858/PR_DESCRIPTION.md)\n\n---\n\n*Reported by: Oleh*",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/theupdateframework/go-tuf/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.4.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/theupdateframework/go-tuf/security/advisories/GHSA-jqc5-w2xx-5vq4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-24686"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/theupdateframework/go-tuf/commit/d361e2ea24e427581343dee5c7a32b485d79fcc0"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/theupdateframework/go-tuf"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-01-26T23:49:55Z",
    "nvd_published_at" : "2026-01-27T01:16:02Z"
  }
}