| عنوان | https://github.com/picocms/pico pico-content-editor 02d5ad6c820c5050c542ab9505819b5e0a0ba1af Unrestricted Upload |
|---|
| الوصف | Summary: PicoContentEditor, a third-party WYSIWYG content editor plugin for Pico CMS, grants edit, save, and upload rights to every visitor by default. These rights are only restricted when the optional companion plugin PicoUsers is also installed and detected at runtime. Since PicoUsers is not a required dependency and is documented as optional, any installation of PicoContentEditor without PicoUsers allows unauthenticated visitors to upload arbitrary files, including PHP scripts, with no extension or MIME-type validation, directly into a web-accessible, PHP-executable directory. This results in unauthenticated remote code execution.
Vulnerable component: PicoContentEditor upload and authorization subsystem (src/Auth.php, src/Uploads.php)
Affected file(s) and parameter(s): src/Auth.php (class Auth, properties canEdit/canSave/canUpload, method init(), lines 21-31 and 51-60); src/Uploads.php (method saveFile(), lines 59-82); HTTP multipart field "PicoContentEditorUpload" sent to the Pico site root.
Technical description: Auth::$canEdit, Auth::$canSave and Auth::$canUpload default to true. Auth::init() only tightens these values when class_exists('PicoUsers') returns true; PicoUsers is not listed in composer.json's "require" section, making it an optional dependency. When PicoUsers is not installed, every anonymous visitor implicitly has full edit, save and upload rights. Uploads::saveFile() then writes the uploaded file with move_uploaded_file() to the configured uploadpath (default "images/", located inside the Pico document root) without validating the file extension or performing real MIME-type inspection (e.g. via finfo). A file named "shell.php" is accepted and stored as-is, and because the destination directory is served by Apache with PHP execution enabled, the uploaded file executes as PHP code when requested.
Steps to reproduce:
1. Install the PicoContentEditor plugin into a Pico CMS instance's plugins/ directory, following the plugin's own README instructions, without installing the PicoUsers plugin.
2. As an unauthenticated client (no cookies, no credentials), send a multipart/form-data POST request to the site root with a field named "PicoContentEditorUpload" containing a file "shell.php" with PHP content, e.g.: <?php echo "PWNED-RCE-TEST:".shell_exec("id"); ?>
3. Observe the JSON response confirming the file was saved and returning its public URL (e.g. http://target/images/shell.php). Request that URL directly and observe the PHP payload's output, confirming arbitrary command execution on the server.
Impact: An unauthenticated remote attacker gains full remote code execution as the web server user. This allows reading and writing any file reachable by that user, defacing the site, planting persistent backdoors, and pivoting to other services on the same host. No authentication and no user interaction are required; the attack is fully automatable with a single HTTP request. |
|---|
| المصدر | ⚠️ https://github.com/vinniboy021-blip/Advisory/blob/main/pico-content-editor-unauth-rce.md |
|---|
| المستخدم | vinniboy021 (UID 100165) |
|---|
| ارسال | 26/10/2026 07:09 PM (29 أيام منذ) |
|---|
| الاعتدال | 24/11/2026 07:50 PM (29 days later) |
|---|
| الحالة | تمت الموافقة |
|---|
| إدخال VulDB | 443235 [nliautaud pico-content-editor حتى 02d5ad6c820c5050c542ab9505819b5e0a0ba1af Authorization Subsystem src/Uploads.php init PicoContentEditorUpload تجاوز الصلاحيات] |
|---|
| النقاط | 20 |
|---|