Affected versions
- Affected versions
- <=5.2.6
- Fixed version
- 5.2.7
Exploitation
Description
The OMGF Pro plugin for WordPress is vulnerable to Unrestricted File Type Upload in all versions up to, and including, 5.2.6. This is due to the ExternalStylesheets::optimize() method extracting attacker-controlled @import URLs from the rendered HTML, fetching their contents via wp_remote_get(), and writing those contents to disk via file_put_contents() at a path derived directly from the attacker-controlled URL host/path — with no file-extension allowlist, MIME check, or capability/nonce gate on the omgf_optimize and omgf_pro_auto_config GET parameters that trigger the pipeline. This makes it possible for unauthenticated attackers to upload arbitrary files (including PHP) into the uploads directory on the affected site's server which makes remote code execution possible.
Links
Credits
- Nguyen Ngoc Duc (duc193)
- NETZLICHT

