Miggo Logo

CVE-2022-0962: Cross-site Scripting in ShowDoc

5.4

CVSS Score
3.1

Basic Information

EPSS Score
0.57734%
Published
3/15/2022
Updated
1/27/2023
KEV Status
No
Technology
TechnologyPHP

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
showdoc/showdoccomposer< 2.10.42.10.4

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from improper file extension validation. The commit diff shows critical changes to AttachmentModel::upload (added $check_filename parameter) and AttachmentModel::isAllowedFilename (removed .webmv/.swf). The upload() function's unconditional filename check in vulnerable versions, combined with isAllowedFilename()'s permissive allow-list, enabled malicious file uploads. The .webma extension mentioned in the advisory may reflect a discrepancy (e.g., typo) or an unobserved code path, but the structural weakness in these functions is clear.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

S*ow*o* prior to *.**.* is vuln*r**l* to stor** *ross-sit* s*riptin* vi* `.w**m*` *il* uplo**.

Reasoning

T** vuln*r**ility st*ms *rom improp*r *il* *xt*nsion v*li**tion. T** *ommit *i** s*ows *riti**l ***n**s to `*tt***m*ntMo**l::uplo**` (***** $****k_*il*n*m* p*r*m*t*r) *n* `*tt***m*ntMo**l::is*llow***il*n*m*` (r*mov** .w**mv/.sw*). T** `uplo**()` *un*