CVE-2026-24686

CVE-2026-24686 is a medium-severity path traversal vulnerability in github.com/theupdateframework/go-tuf/v2 (go), affecting versions < 2.4.1. It is fixed in 2.4.1.

Summary

Security Vulnerability: Path Traversal in TAP 4 Multirepo Client

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)

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

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

Reported by: Oleh

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.

Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files. Typical impact: unauthorized file read or write outside the intended directory.

CVE-2026-24686 has a CVSS score of 4.7 (Medium). The vector is requires local access, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2.4.1); upgrading removes the vulnerable code path.

Affected versions

github.com/theupdateframework/go-tuf/v2 (< 2.4.1)

Security releases

github.com/theupdateframework/go-tuf/v2 → 2.4.1 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Upgrade github.com/theupdateframework/go-tuf/v2 to 2.4.1 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2026-24686? CVE-2026-24686 is a medium-severity path traversal vulnerability in github.com/theupdateframework/go-tuf/v2 (go), affecting versions < 2.4.1. It is fixed in 2.4.1. Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files.
  2. How severe is CVE-2026-24686? CVE-2026-24686 has a CVSS score of 4.7 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of github.com/theupdateframework/go-tuf/v2 are affected by CVE-2026-24686? github.com/theupdateframework/go-tuf/v2 (go) versions < 2.4.1 is affected.
  4. Is there a fix for CVE-2026-24686? Yes. CVE-2026-24686 is fixed in 2.4.1. Upgrade to this version or later.
  5. Is CVE-2026-24686 exploitable, and should I be worried? Whether CVE-2026-24686 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-24686 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-24686? Upgrade github.com/theupdateframework/go-tuf/v2 to 2.4.1 or later.

Other vulnerabilities in github.com/theupdateframework/go-tuf/v2

CVE-2026-23992CVE-2026-23991CVE-2024-47534

Stop the waste.
Protect your environment with Kodem.