Miggo Logo

CVE-2022-29637: Arbitrary command execution in Minidoc

7.8

CVSS Score
3.1

Basic Information

EPSS Score
0.52454%
Published
5/27/2022
Updated
1/27/2023
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/mindoc-org/mindocgo<= 2.1-beta.5

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from improper handling of ZIP file extraction in ziptil.go, as explicitly referenced in the GitHub issue. The attack vector involves crafting ZIP files with path traversal sequences, which would be processed by the ZIP extraction logic. The function responsible for writing extracted files (likely ExtractOrCreateFile) fails to validate/sanitize file paths, allowing attackers to write arbitrary files to any location. This matches the CWE-434 pattern and the described exploit mechanism.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

*n *r*itr*ry *il* uplo** vuln*r**ility in Min*o* v*.*-**t*.* *llows *tt**k*rs to *x**ut* *r*itr*ry *omm*n*s vi* * *r**t** Zip *il*.

Reasoning

T** vuln*r**ility st*ms *rom improp*r **n*lin* o* `ZIP` *il* *xtr**tion in `ziptil.*o`, *s *xpli*itly r***r*n*** in t** *it*u* issu*. T** *tt**k v**tor involv*s *r**tin* `ZIP` *il*s wit* p*t* tr*v*rs*l s*qu*n**s, w*i** woul* ** pro**ss** *y t** `ZIP`