Autoptimize <= 2.7.7 - Arbitrary File Upload (and Remote Code Execution) via Import Settings

Unrestricted Upload of File with Dangerous Type
CVE CVE-2021-24376
CVSS Critical (9.8)
Publicly Published October 9, 2020
Last Updated January 22, 2024
Researcher Marcin Węgłowski
Description

The Autoptimize WordPress plugin before 2.7.8 attempts to delete malicious files (such as .php) form the uploaded archive via the "Import Settings" feature, after its extraction. However, the extracted folders are not checked and it is possible to upload a zip which contained a directory with PHP file in it and then it is not removed from the disk. It is a bypass of CVE-2020-24948 which allows sending a PHP file via the "Import Settings" functionality to achieve Remote Code Execution.

References

1 affected software package

Software Type Plugin
Software Slug autoptimize (view on wordpress.org)
Patched? Yes
Affected Version
  • <= 2.7.8
Patched Version
  • 2.7.8
This record contains material that is subject to copyright

Copyright 2012-2026 Defiant Inc.
License: Defiant hereby grants you a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute this software vulnerability information. Any copy of the software vulnerability information you make for such purposes is authorized provided that you include a hyperlink to this vulnerability record and reproduce Defiant's copyright designation and this license in any such copy. License Detail.