Miggo Logo

CVE-2022-24800: October CMS upload process vulnerable to RCE via Race Condition

8.1

CVSS Score
3.1

Basic Information

EPSS Score
0.83741%
Published
7/13/2022
Updated
1/27/2023
KEV Status
No
Technology
TechnologyPHP

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
october/systemcomposer< 1.0.4761.0.476
october/systemcomposer>= 1.1.0, < 1.1.121.1.12
october/systemcomposer>= 2.0.0, < 2.2.152.2.15

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the File::fromData method's handling of user-supplied filenames. The original code used the user-provided filename directly to create a temporary file path (via temp_path(basename($filename))), allowing attackers to predict the temporary file's location. This predictability enabled a race condition where an attacker could write a malicious payload to the temporary file and execute it before the system deleted it. The patch introduced a randomized temporary filename (via uniqid()), breaking the predictability. The commit diff confirms this critical change occurred in the fromData method's logic.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t T*is **visory *****ts plu*ins t**t *xpos* t** `O*to**r\R*in\**t***s*\*tt***\*il*::*rom**t*` *s * pu*li* int*r****. T*is vuln*r**ility *o*s not *****t v*nill* inst*ll*tions o* O*to**r *MS sin** t*is m*t*o* is not *xpos** or us** *y t** sys

Reasoning

T** vuln*r**ility st*ms *rom t** *il*::*rom**t* m*t*o*'s **n*lin* o* us*r-suppli** *il*n*m*s. T** ori*in*l *o** us** t** us*r-provi*** *il*n*m* *ir**tly to *r**t* * t*mpor*ry *il* p*t* (vi* `t*mp_p*t*(**s*n*m*($*il*n*m*))`), *llowin* *tt**k*rs to pr*