MEDIUM

CVE-2026-48946

Joomlaworks K2 2026-06-25 CVSS v3.1
CVSS
6.3

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.

Weakness (CWE)

CWE-434 Unrestricted File Upload

EPSS Score

0.28%
Probability of exploitation in next 30 days
21.1th percentile

References

View on dbcve.org
Base CVE data derived from NVD (public domain). Enrichment by dbcve.org (CC-BY-4.0). Fetched via API.
Back to CVE