Miggo Logo

CVE-2020-7668:
github.com/unknwon/cae Path Traversal vulnerability

7.5

CVSS Score

Basic Information

EPSS Score
-
Published
5/18/2021
Updated
8/30/2023
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/unknwon/caego< 1.0.11.0.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The core vulnerability stems from insecure path handling in extraction functions across both tar (tz) and zip implementations. The commit diff shows critical fixes in ExtractToFunc methods where:

  1. Backslash replacement was upgraded to strings.ReplaceAll (minor)
  2. cae.Clean() was added to resolve path traversal sequences via path.Clean()

These functions directly process archive entry names during extraction. The GHSA/CVE descriptions explicitly call out ExtractTo as vulnerable, and Go's vulnerability database (GO-2020-0041) lists ExtractTo/ExtractToFunc as affected symbols. While syncFiles and Open aren't extraction endpoints themselves, they process filenames early in the pipeline, contributing to the vulnerability chain. Confidence is high for ExtractToFunc methods due to their direct role in path handling during extraction, and medium for initialization functions due to their indirect role.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

T** *xtr**tTo *un*tion *o*sn't s**ur*ly *s**p* *il* p*t*s in zip *r**iv*s w*i** in*lu** l***in* or non-l***in* "..". T*is *llows *n *tt**k*r to *** or r*pl*** *il*s syst*m-wi**.

Reasoning

T** *or* vuln*r**ility st*ms *rom ins**ur* p*t* **n*lin* in *xtr**tion *un*tions **ross *ot* t*r (tz) *n* zip impl*m*nt*tions. T** *ommit *i** s*ows *riti**l *ix*s in *xtr**tTo*un* m*t*o*s w**r*: *. ***ksl*s* r*pl***m*nt w*s up*r**** to strin*s.R*pl*