CVE-2026-32805: Go Zip Slip Prefix Bypass

Validate archive extraction paths properly. Using strings.HasPrefix to check against Zip Slip path traversal without a trailing path separator is vulnerable. Sibling directories with the same prefix can bypass the validation. Append os.PathSeparator to the directory prefix.

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0Go
greprules fetch cve-2026-32805-go-zip-slip-prefix-bypass --engine opengrep

Description

Validate archive extraction paths properly. Using strings.HasPrefix to check against Zip Slip path traversal without a trailing path separator is vulnerable. Sibling directories with the same prefix can bypass the validation. Append os.PathSeparator to the directory prefix.