Miggo Logo

CVE-2025-46347: YesWiki Remote Code Execution via Arbitrary PHP File Write and Execution

5.8

CVSS Score
4.0

Basic Information

EPSS Score
0.67368%
Published
4/29/2025
Updated
4/29/2025
KEV Status
No
Technology
TechnologyPHP

Technical Details

CVSS Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Package NameEcosystemVulnerable VersionsFirst Patched Version
yeswiki/yeswikicomposer<= 4.5.34.5.4

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability description clearly states that an arbitrary file write occurs when creating a new graphical configuration. The provided PoC shows a POST request to /?api/templates/custom-presets/test.css. The commit diff shows that the addCustomCSSPreset method in ApiController.php is responsible for handling this request. The patch adds a check to ensure that the file extension is .css. Before this patch, the function would write a file with any extension provided in $presetFilename, including .php, and the content of the file was derived from $_POST parameters, which could include malicious PHP code. Therefore, ApiController::addCustomCSSPreset is the vulnerable function.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Summ*ry *n *r*itr*ry *il* writ* **n ** us** to writ* * *il* wit* * P*P *xt*nsion, w*i** t**n **n ** *rows** to in or**r to *x**ut* *r*itr*ry *o** on t** s*rv*r. *ll t*stin* w*s p*r*orm** on * lo**l *o*k*r s*tup runnin* t** l*t*st v*rsion o* t**

Reasoning

T** vuln*r**ility **s*ription *l**rly st*t*s t**t *n *r*itr*ry *il* writ* o**urs w**n *r**tin* * n*w *r*p*i**l *on*i*ur*tion. T** provi*** Po* s*ows * POST r*qu*st to `/?*pi/t*mpl*t*s/*ustom-pr*s*ts/t*st.*ss`. T** *ommit *i** s*ows t**t t** `****usto