GO-2026-6984: Extractor writes outside chroot through existing symbolic link in github.com/saracen/fastzip
Extractor.Extract checks archive entry paths lexically against the destination chroot and then creates files, directories, and symbolic links using path-based os calls that follow symbolic links already present under the chroot, allowing writes and metadata changes outside the destination directory.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
go/github.com/saracen/fastzipto a version that resolves this vulnerability.Fixed in 0.2.1
Event History
Frequently Asked Questions
What conditions are required for exploitation?
An attacker needs an archive that is processed by Extractor.Extract and a symbolic link already present beneath the extraction destination. Path-based filesystem calls can then follow that link outside the destination directory.
What can an attacker change outside the extraction directory?
The issue can allow writes and metadata changes outside the destination directory when an existing symbolic link redirects an extraction operation there.
What can be done while an update is not available?
Do not extract untrusted archives into destination trees that contain symbolic links, and use a fresh extraction directory without pre-existing links where possible.
How can I assess whether an extraction environment is exposed?
Check whether the application uses github.com/saracen/fastzip's Extractor.Extract and whether its extraction destination or subdirectories contain symbolic links before extraction.