CVE-2026-48946
Description
The K2 frontend article-attachment upload path accepts files whose extension is `.php`, and Apache's standard mod_php matches `\.php$` and executes them under the K2 web user. A K2 Author can upload a `shell.php`, then fetch `/media/k2/attachments/shell.php` and execute arbitrary PHP code in the web server's context.
Summary dbcve.org
The K2 Joomla component allows authenticated Authors to upload file attachments without proper extension filtering, permitting .php files to be stored in /media/k2/attachments/. Apache with mod_php automatically executes these files when accessed, enabling remote code execution under the web server's user context.
Mitigation
Block PHP execution in the /media/k2/attachments/ directory using .htaccess with 'php_flag engine off' or RemoveHandler directives, and implement server-side extension validation in the upload handler.