GHSA-mf5c-hw34-4hpp: Path Traversal

Published Aug 28, 2026
·
Updated

Summary

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, OCREATE|OWRONLY), which follows the attacker-planted symlink.

A 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.

Details

Affected file: pkg/unarchive/archives.go

Affected function: (handler).HandleFile

The vulnerable logic is the combination of:

go os.Symlink(f.LinkTarget, dstPath)

for symlink entries, followed by:

go h.fs.OpenFile(dstPath, os.OCREATE|os.OWRONLY, f.Mode())

for 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.

The attached PoC uses a two-entry tar.gz archive:

1. symlink pwn -> <outside target>; 2. regular file pwn containing attacker-controlled bytes.

The same mholt/archives extraction flow is used for the vulnerable handler and for a negative-control handler using a destination-root jail.

PoC

Attachment: submissionaquaarchivesymlinktraversalv2final.zip

Run:

bash go run mkarchive.go /tmp/aqua-outside-target go build -o aqua-archive-poc . mkdir -p /tmp/aqua-dest ./aqua-archive-poc vuln /tmp/aqua-dest malicious.tar.gz cat /tmp/aqua-outside-target

mkdir -p /tmp/aqua-dest-safe ./aqua-archive-poc safe /tmp/aqua-dest-safe malicious.tar.gz

Expected vulnerable result:

text /tmp/aqua-outside-target contains PWNEDBYAQUASYMLINKTRAVERSAL

Expected safe-control result:

text The escaping symlink / write is rejected and the outside target is unchanged.

Impact

An 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.

This report does not claim privilege escalation beyond the aqua process privileges.

Affected Software

1 affected componentFixes available
go/github.com/aquaproj/aqua/v2<2.60.1
2.60.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/github.com/aquaproj/aqua/v2 to a version that resolves this vulnerability.

    Fixed in 2.60.1

Event History

Aug 28, 2026
Advisory Published
via GitHub·04:27 PM
Data Sourced
via GitHub·04:27 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Who is exposed to this issue?

Users who run aqua and extract a malicious or compromised package or release asset are exposed. The attacker-controlled write occurs with the privileges of the user running aqua.

2

What must an attacker control to exploit it?

The attacker needs to provide an archive containing a symlink whose target is outside the extraction directory, followed by a regular-file entry at the same archive path. When aqua processes the later file entry, it follows the planted symlink and writes the attacker-controlled file contents to the external target.

3

How can I determine whether an archive attempted this technique?

Inspect downloaded archives for a symlink entry followed by a regular-file entry using the same path. A symlink target that resolves outside the extraction destination is the condition that enables the external write.

4

What version contains the fix?

The advisory references the v2.60.1 release and commit d5b02b220188de376a661b3aabfa912202a1a59a.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203