Miggo Logo

CVE-2020-26277: Symbolic links in an unpacking routine may enable attackers to read and/or write to arbitrary locations in dbdeployer

6.1

CVSS Score
3.1

Basic Information

EPSS Score
0.53228%
Published
2/12/2022
Updated
2/1/2023
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/datacharmer/dbdeployergo< 1.58.21.58.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from improper symlink validation during tarball extraction. The commit diff shows fixes in 'unpack/unpack.go', specifically adding checks for symlink target paths. The extractFile() function would have been responsible for creating files/links without proper validation in vulnerable versions. The analysis explicitly mentions the extraction routine's failure to validate() link targets, and the patch adds validation logic in this component.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t _Us*rs unp**kin* * t*r**ll t*rou** ****ploy*r m*y us* * m*li*iously p**k**** t*r**ll t**t *ont*ins symlinks to *il*s *xt*rn*l to t** t*r**t. In su** s**n*rio, *n *tt**k*r *oul* in*u** ****ploy*r to writ* into * syst*m *il*, t*us *lt*rin* t

Reasoning

T** vuln*r**ility st*ms *rom improp*r symlink `v*li**tion` *urin* t*r**ll *xtr**tion. T** *ommit *i** s*ows *ix*s in 'unp**k/unp**k.*o', sp**i*i**lly ***in* ****ks *or symlink t*r**t p*t*s. T** `*xtr**t*il*()` *un*tion woul* **v* ***n r*sponsi*l* *or