Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2025-12201

CVE-2025-12201: User-Management-PHP-MYSQL RCE Vulnerability

CVE-2025-12201 is a remote code execution vulnerability in Ajayrandhawa User-Management-PHP-MYSQL caused by unrestricted file upload in the admin panel. This article covers technical details, affected versions, and mitigation.

Published:

CVE-2025-12201 Overview

CVE-2025-12201 is an unrestricted file upload vulnerability in the ajayrandhawa User-Management-PHP-MYSQL project. The flaw resides in the /admin/edit-user.php script within the User Management Interface component. Attackers can manipulate the image argument to upload arbitrary files to the server. The vulnerability is exploitable remotely and requires high privileges on the target application. The project follows a rolling release model, so no fixed version identifier is available. The vendor was contacted about the disclosure but did not respond. A public exploit report has been published, increasing the risk of opportunistic abuse.

Critical Impact

Authenticated administrators can upload arbitrary files through the image parameter in /admin/edit-user.php, potentially enabling web shell deployment and remote code execution on affected deployments.

Affected Products

  • ajayrandhawa User-Management-PHP-MYSQL (rolling release up to commit fedcf58797bf2791591606f7b61fdad99ad8bff1)
  • Component: User Management Interface (/admin/edit-user.php)
  • Deployments serving the affected commit or earlier revisions

Discovery Timeline

  • 2025-10-27 - CVE-2025-12201 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2025-12201

Vulnerability Analysis

The vulnerability is classified under [CWE-434] Unrestricted Upload of File with Dangerous Type and [CWE-284] Improper Access Control. The /admin/edit-user.php endpoint accepts an image parameter used to update a user's profile picture. The upload handler fails to enforce content-type validation, extension allowlists, or filename sanitization on the submitted file. An attacker with administrative access can therefore submit a PHP file disguised as an image and place it into a web-accessible directory. The EPSS probability of 0.513% reflects current exploitation likelihood based on the public report.

Root Cause

The root cause is missing server-side validation of uploaded file metadata and content. The application trusts the client-supplied MIME type and file extension without verifying magic bytes or restricting executable file types. Because the upload directory is served directly by the PHP interpreter, any uploaded .php file becomes executable on request.

Attack Vector

Exploitation requires an authenticated administrator session, so the attack vector depends on prior credential compromise, weak default credentials, or insider access. Once authenticated, the attacker submits a crafted multipart POST request to /admin/edit-user.php with the image field pointing to a PHP payload. After upload, the attacker requests the file URL to trigger code execution in the web server context. A public write-up documenting the flaw is available on the GitHub File Upload Report and cataloged as VulDB #329871.

No verified proof-of-concept code is republished here. See the referenced report for technical reproduction steps.

Detection Methods for CVE-2025-12201

Indicators of Compromise

  • New files with executable extensions (.php, .phtml, .phar) appearing in profile-image or upload directories under the application root
  • POST requests to /admin/edit-user.php containing multipart payloads with non-image MIME content or double extensions such as avatar.jpg.php
  • Web server access logs showing GET requests to newly created files in upload paths shortly after admin POSTs
  • Outbound network connections initiated by the PHP-FPM or Apache worker process to unfamiliar hosts

Detection Strategies

  • Inspect web server logs for POST requests to /admin/edit-user.php followed by GET requests to files under the image upload directory
  • Use file integrity monitoring on upload directories to alert on creation of scripts or non-image content
  • Deploy a web application firewall rule blocking uploads whose declared extension does not match the file's magic bytes

Monitoring Recommendations

  • Enable verbose access logging for the /admin/ path and forward logs to a centralized SIEM for correlation
  • Alert on process creation events where the web server user spawns shells, curl, wget, or interpreters
  • Monitor authentication logs for anomalous admin logins preceding file upload activity

How to Mitigate CVE-2025-12201

Immediate Actions Required

  • Restrict access to /admin/edit-user.php to trusted IP ranges via web server ACLs until a fix is available
  • Rotate administrator credentials and enforce strong password requirements to reduce the risk of privileged account compromise
  • Configure the web server to prevent PHP execution within user upload directories using directives such as php_flag engine off or equivalent location blocks
  • Audit upload directories for unexpected script files and remove any unauthorized content

Patch Information

The vendor operates a rolling release model and did not respond to the disclosure. No official patch identifier or fixed version is published. Administrators should track the upstream repository for post-fedcf58797bf2791591606f7b61fdad99ad8bff1 commits addressing upload validation, or apply source-level fixes locally to enforce MIME checking, extension allowlisting, and randomized filenames.

Workarounds

  • Implement server-side allowlisting of image extensions (.jpg, .png, .gif) and verify magic bytes with finfo_file() before persisting uploads
  • Store uploaded files outside the web root and serve them through a controlled handler that sets Content-Type: image/*
  • Rename uploads to server-generated identifiers and strip original extensions to prevent double-extension attacks
  • Place the application behind a web application firewall with rules that block executable uploads to /admin/edit-user.php
bash
# Apache configuration example: disable PHP execution in upload directory
<Directory "/var/www/user-management/admin/uploads">
    php_admin_flag engine off
    AddType text/plain .php .phtml .phar .php5 .php7
    <FilesMatch "\.(php|phtml|phar|php5|php7)$">
        Require all denied
    </FilesMatch>
</Directory>

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.