GO-2021-0228

Source
https://pkg.go.dev/vuln/GO-2021-0228
Import Source
https://vuln.go.dev/ID/GO-2021-0228.json
JSON Data
https://api.test.osv.dev/v1/vulns/GO-2021-0228
Aliases
Published
2022-01-14T17:30:28Z
Modified
2024-05-20T16:03:47Z
Summary
Path traversal in github.com/unknwon/cae
Details

The ExtractTo function doesn't securely escape file paths in zip archives which include leading or non-leading "..". This allows an attacker to add or replace files system-wide.

Database specific
{
    "review_status": "REVIEWED",
    "url": "https://pkg.go.dev/vuln/GO-2021-0228"
}
References
Credits
    • Georgios Gkitsas of Snyk Security Team

Affected packages

Go / github.com/unknwon/cae

Package

Name
github.com/unknwon/cae
View open source insights on deps.dev
Purl
pkg:golang/github.com/unknwon/cae

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.0.1

Ecosystem specific

{
    "imports": [
        {
            "path": "github.com/unknwon/cae/tz",
            "symbols": [
                "Create",
                "ExtractTo",
                "Open",
                "OpenFile",
                "TzArchive.Close",
                "TzArchive.ExtractTo",
                "TzArchive.ExtractToFunc",
                "TzArchive.Flush",
                "TzArchive.Open",
                "TzArchive.syncFiles"
            ]
        },
        {
            "path": "github.com/unknwon/cae/zip",
            "symbols": [
                "Create",
                "ExtractTo",
                "ExtractToFunc",
                "Open",
                "OpenFile",
                "ZipArchive.Close",
                "ZipArchive.ExtractTo",
                "ZipArchive.ExtractToFunc",
                "ZipArchive.Flush",
                "ZipArchive.Open"
            ]
        }
    ]
}