chore(deps): update module github.com/theupdateframework/go-tuf/v2 to v2.4.1 [security] #161
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v2.3.1->v2.4.1GitHub Vulnerability Alerts
CVE-2026-24686
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 arepoNamecontaining traversal (e.g.,../escaped-repo) and cause go-tuf to create directories and write the root metadata file outside the intendedLocalMetadataDircache base, within the running process's filesystem permissions.Affected Component
metadata/multirepo/multirepo.go(*MultiRepoClient) initTUFClients() errormetadataDir := 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.
Attacker Model
repositorieskeys are attacker-controlled (for example: fetched from a URL, supply-chain substituted, or otherwise attacker-influenced input).DisableLocalCache=false) and the configuredLocalMetadataDiris 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.
bde5f18dc95dfac365fc452ee4e278e5fd66d4b4(tag v2.4.0)Reproduction
Attachments include
poc.zipwith: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
repoNameescapesLocalMetadataDirand go-tuf persistsroot.jsonunder 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 controlWorkarounds
./..).DisableLocalCache=true).Suggested Remediation
Validate multirepo repository names as identifiers (not paths) before using them in
filepath.Join. Reject:/and\).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
Attachments
Reported by: Oleh
Release Notes
theupdateframework/go-tuf (github.com/theupdateframework/go-tuf/v2)
v2.4.1Compare Source
What's Changed
Full Changelog: theupdateframework/go-tuf@v2.4.0...v2.4.1
v2.4.0Compare Source
What's Changed
Full Changelog: theupdateframework/go-tuf@v2.3.1...v2.4.0
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.