CVE-2026-77306: go-witness: File attestor follows symlinks outside the base path and records out-of-tree files
go-witness and witness are Go modules for generating attestations. Prior to version 0.12.0, RecordArtifacts resolves a symbolic link with filepath.EvalSymlinks and then recurses into the resolved path with no check that the target stays within the base path being attested. A symlink in the attested directory tree that points outside it causes the file attestor to open, hash, and record the out-of-tree target. Running witness run over an attacker-influenced directory (a checked-out repository, a pull-request build, an unpacked archive) therefore reads files outside the intended workspace (secrets, system files) and records their digests and paths into the attestation. This issue has been patched in version 0.12.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 0.12.0
Event History
Frequently Asked Questions
Which environments are realistically exposed?
Environments that run witness run over attacker-influenced directories are exposed, including checked-out repositories, pull-request builds, and unpacked archives. A symlink within the attested tree can cause the attestor to read targets outside the intended workspace.
What does an attacker need to exploit this issue?
An attacker needs to place or control a symbolic link in the directory tree being attested, with that link pointing to a path outside the base directory. When RecordArtifacts processes the link, it resolves and recursively records the external target without verifying that it remains under the base path.
What is the impact if exploitation succeeds?
The file attestor can open and hash files outside the intended workspace, such as secrets or system files. Their digests and paths can then be recorded in the generated attestation.
What should be done if upgrading is not immediately possible?
Do not run witness run against directories influenced by untrusted repositories, pull requests, or archives. Restrict the attested tree to content that cannot contain attacker-controlled symlinks pointing outside the workspace.
How can I determine whether my deployment is affected?
Deployments using go-witness or witness versions earlier than 0.12.0 are affected when RecordArtifacts attests a tree containing symlinks. Version 0.12.0 contains the patch.