{"id":"CVE-2026-55569","aliases":["CVE-2026-55569","GHSA-mf5c-hw34-4hpp","GO-2026-6314"],"related":[],"kind":"vulnerability","state":"published","title":"aqua: Archive extraction in aqua follows attacker-planted symlinks, allowing writes outside the install directory","summary":"aqua is a declarative command-line version manager written in Go. Prior to 2.60.1, pkg/unarchive/archives.go in the handler.HandleFile method calls os.Symlink with archives.FileInfo.LinkTarget without verifying that the target remains under the extraction destination. A later regular-file entry at the same archive path is opened with OpenFile using O_CREATE and O_WRONLY, which follows the attacker-planted symlink. A malicious or compromised package archive can therefore write attacker-controlled bytes outside aqua's extraction directory with the privileges of the user running aqua, potentially overwriting shell startup files, tool configuration, or writable executable paths. This issue is fixed in version 2.60.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"aqua is a declarative command-line version manager written in Go. Prior to 2.60.1, pkg/unarchive/archives.go in the handler.HandleFile method calls os.Symlink with archives.FileInfo.LinkTarget without verifying that the target remains under the extraction destination. A later regular-file entry at the same archive path is opened with OpenFile using O_CREATE and O_WRONLY, which follows the attacker-planted symlink. A malicious or compromised package archive can therefore write attacker-controlled bytes outside aqua's extraction directory with the privileges of the user running aqua, potentially overwriting shell startup files, tool configuration, or writable executable paths. This issue is fixed in version 2.60.1.","source":"cvelist"},{"lang":"en","text":"### Summary\n\n`aquaproj/aqua` extracts downloaded tool archives through `pkg/unarchive/archives.go` using `github.com/mholt/archives`. The archive handler creates symlink entries with `os.Symlink(f.LinkTarget, dstPath)` without validating that the symlink target resolves inside the extraction destination. A subsequent regular-file archive entry with the same path is opened with `OpenFile(dstPath, O_CREATE|O_WRONLY)`, which follows the attacker-planted symlink.\n\nA malicious or compromised aqua package / release asset can therefore write attacker-controlled bytes outside aqua's extraction directory, with the privileges of the user running aqua.\n\n### Details\n\nAffected file: `pkg/unarchive/archives.go`\n\nAffected function: `(*handler).HandleFile`\n\nThe vulnerable logic is the combination of:\n\n```go\nos.Symlink(f.LinkTarget, dstPath)\n```\n\nfor symlink entries, followed by:\n\n```go\nh.fs.OpenFile(dstPath, os.O_CREATE|os.O_WRONLY, f.Mode())\n```\n\nfor a later regular file entry at the same archive path. The symlink target is not jailed to the extraction destination, and the later file open follows the symlink.\n\nThe attached PoC uses a two-entry `tar.gz` archive:\n\n1. symlink `pwn -> <outside target>`;\n2. regular file `pwn` containing attacker-controlled bytes.\n\nThe same `mholt/archives` extraction flow is used for the vulnerable handler and for a negative-control handler using a destination-root jail.\n\n### PoC\n\nAttachment: `submission_aqua_archive_symlink_traversal_v2_final.zip`\n\nRun:\n\n```bash\ngo run mkarchive.go /tmp/aqua-outside-target\ngo build -o aqua-archive-poc .\nmkdir -p /tmp/aqua-dest\n./aqua-archive-poc vuln /tmp/aqua-dest malicious.tar.gz\ncat /tmp/aqua-outside-target\n\nmkdir -p /tmp/aqua-dest-safe\n./aqua-archive-poc safe /tmp/aqua-dest-safe malicious.tar.gz\n```\n\nExpected vulnerable result:\n\n```text\n/tmp/aqua-outside-target contains PWNED_BY_AQUA_SYMLINK_TRAVERSAL\n```\n\nExpected safe-control result:\n\n```text\nThe escaping symlink / write is rejected and the outside target is unchanged.\n```\n\n### Impact\n\nAn attacker who controls an archive that aqua installs can write attacker-controlled content to paths outside the extraction destination, limited by the filesystem permissions of the user running aqua. This can lead to user-level code execution if the overwritten path is later executed or interpreted, for example a shell startup file, a tool configuration file, or a writable PATH entry.\n\nThis report does not claim privilege escalation beyond the aqua process privileges.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Aqua's archive extraction follows attacker-planted symlinks, allowing writes outside the install directory in github.com/aquaproj/aqua","format":"markdown","source":"go"}],"published":"2026-08-28T16:26:51.328Z","modified":"2026-09-09T21:09:13.080Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L","score":6.6,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L","score":6.6,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L","score":6.6,"rating":"MEDIUM"}],"cwes":["CWE-22","CWE-59"],"affected":[{"ranges":[{"version":"< 2.60.1","status":"affected"}],"vendor":"aquaproj","product":"aqua","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.60.1"}],"ecosystem":"Go","package":"github.com/aquaproj/aqua/v2","purl":"pkg:golang/github.com/aquaproj/aqua/v2","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/aquaproj/aqua","purl":"pkg:golang/github.com/aquaproj/aqua","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.60.1"}],"ecosystem":"Go","package":"github.com/aquaproj/aqua/v2","purl":"pkg:golang/github.com/aquaproj/aqua/v2","source":"go"}],"references":[{"url":"https://github.com/aquaproj/aqua/security/advisories/GHSA-mf5c-hw34-4hpp","tags":["advisory","exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/aquaproj/aqua/commit/d5b02b220188de376a661b3aabfa912202a1a59a","tags":["fix","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/aquaproj/aqua/releases/tag/v2.60.1","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/aquaproj/aqua","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-09-01T01:43:55.402Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-55569","url":"https://www.cve.org/CVERecord?id=CVE-2026-55569","licence":"CVE Terms of Use","modified":"2026-09-01T01:44:40.571Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-mf5c-hw34-4hpp","url":"https://github.com/advisories/GHSA-mf5c-hw34-4hpp","licence":"CC-BY-4.0","modified":"2026-09-02T19:55:33.283Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-6314","url":"https://pkg.go.dev/vuln/GO-2026-6314","licence":"CC-BY-4.0","modified":"2026-09-02T19:45:12.632Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-55569","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-55569","licence":"Public domain","modified":"2026-09-09T21:09:13.080Z"}],"updatedAt":"2026-11-25T22:59:35.693Z","epss":{"score":0.00255,"percentile":0.18255,"date":"2026-12-01T12:00:22.000Z"}}