CVE-2025-66571
Executive Summary
CVE-2025-66571 is a critical PHP Object Injection vulnerability affecting UNA CMS versions 9.0.0-RC1 through 14.0.0-RC4. The flaw resides in the BxBaseMenuSetAclLevel.php file, where the profile_id POST parameter is passed directly to PHP's unserialize() function without proper sanitization or validation. This allows a remote, unauthenticated attacker to inject arbitrary PHP objects, potentially leading to arbitrary code execution, data exfiltration, or complete server compromise. The vulnerability has a CVSS v3.1 base score of 9.8 (Critical) due to its network attack vector, low attack complexity, and no required privileges or user interaction. No public proof-of-concept (PoC) or exploit code has been released at this time, but the risk remains high given the widespread use of UNA CMS in community and social networking platforms.
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 a package manager (NPM, PyPI, Go, Ruby) but is a direct issue within the UNA CMS core application. Organizations using UNA CMS should treat this as a critical supply chain risk, as the software is often deployed as a standalone web application. No official patch or advisory has been released by the vendor (Una) as of this report.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Base Score: 9.8 (Critical)
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): None (N) – No authentication needed.
- User Interaction (UI): None (N) – No user action required.
- Scope (S): Unchanged (U) – The vulnerable component and the impacted component are the same.
- Confidentiality (C): High (H) – Full data access possible.
- Integrity (I): High (H) – Full data modification possible.
- Availability (A): High (H) – Full system disruption possible.
Threat Level: Critical. The combination of remote, unauthenticated access and the potential for arbitrary code execution makes this a top-priority vulnerability for patching or mitigation.
Deep Dive & Mechanics
The vulnerability is a classic PHP Object Injection (CWE-502) arising from the insecure use of unserialize() on user-supplied input. In BxBaseMenuSetAclLevel.php, the application handles a POST request to set the Access Control List (ACL) level for a user profile. The profile_id parameter is expected to be a serialized PHP object representing the user's profile data.
Vulnerable Code Path:
- The application receives a POST request with
profile_idas a parameter. - The value of
profile_idis passed directly tounserialize()without any filtering or validation. - An attacker can craft a malicious serialized PHP object that, when unserialized, triggers PHP magic methods (e.g.,
__wakeup(),__destruct(),__toString()) to execute arbitrary code. - Common exploitation techniques include using PHPGGC (PHP Generic Gadget Chains) to generate payloads that leverage existing classes in the application or its dependencies to achieve Remote Code Execution (RCE).
Why it works:
- PHP's
unserialize()reconstructs PHP objects from a string representation. If the string contains references to classes that have dangerous magic methods, those methods are automatically invoked during the unserialization process. - The attacker does not need to upload a file; they only need to send a crafted POST request.
Vulnerable vs. Patched Code
Since no official patch is available, the following is a hypothetical secure implementation.
Vulnerable Code (BxBaseMenuSetAclLevel.php):
<?php
// Vulnerable: Direct unserialize of user input
$profile_id = $_POST['profile_id'];
$profile = unserialize($profile_id);
// ... rest of the code
?>
Patched Code (Hypothetical):
<?php
// Patched: Use JSON instead of serialization, or validate input
$profile_id = $_POST['profile_id'];
// Option 1: Use json_decode instead of unserialize
$profile = json_decode($profile_id, true);
// Option 2: Validate that the input is an integer (if profile_id should be numeric)
if (is_numeric($profile_id)) {
$profile_id = (int)$profile_id;
// ... proceed with integer-based logic
} else {
// Reject invalid input
http_response_code(400);
exit('Invalid profile ID');
}
?>
Key Differences:
- The patched code avoids
unserialize()entirely, usingjson_decode()or strict type validation. - Input is sanitized and validated before any processing.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- A target running UNA CMS version 9.0.0-RC1 to 14.0.0-RC4.
- PHPGGC installed (or manual gadget chain construction).
- Ability to send HTTP POST requests (e.g., curl, Burp Suite, Python).
Exploitation Steps:
Identify a vulnerable endpoint: The vulnerable endpoint is typically
/menu/set_acl_levelor similar, depending on the UNA CMS routing. Use a web scanner or manual inspection to find the exact URL.Craft a malicious serialized object: Use PHPGGC to generate a payload for a known gadget chain. For example, if the application uses Monolog, you might use:
phpggc Monolog/RCE1 system 'id' | base64This generates a base64-encoded serialized payload that executes the
idcommand.Send the exploit:
curl -X POST http://target.com/menu/set_acl_level \ -d "profile_id=$(phpggc Monolog/RCE1 system 'id' | base64 -w0)"Verify execution: Check the response or server logs for the output of the
idcommand.
Note: Since no public PoC exists, the above is a generic example. Actual exploitation may require custom gadget chain analysis.
Blue Team (Defensive)
Detection:
- Monitor for POST requests to endpoints related to
set_acl_levelorBxBaseMenuSetAclLevel. - Look for unusual
profile_idvalues that contain serialized PHP object syntax (e.g.,O:,a:,s:). - Use WAF rules to block requests containing
O:followed by a digit (indicating an object serialization).
Mitigation:
- Apply the hypothetical patch: replace
unserialize()withjson_decode()or strict type validation. - If patching is not possible, disable the vulnerable endpoint via
.htaccessor Nginx configuration. - Implement input validation: ensure
profile_idis an integer if that is the expected format.
Indicators of Compromise (IOCs)
Network IOCs:
- POST requests to
/menu/set_acl_levelor similar endpoints withprofile_idparameter containing serialized PHP objects (e.g.,O:8:"stdClass":0:{}). - Unusual base64-encoded strings in POST data.
- Outbound connections to unknown IPs or domains from the web server (post-exploitation).
- POST requests to
File System IOCs:
- Unexpected files in the web root (e.g.,
shell.php,backdoor.php). - Modified
.htaccessor configuration files. - New cron jobs or systemd services.
- Unexpected files in the web root (e.g.,
Log IOCs:
- PHP error logs showing
unserialize()errors or unexpected class loading. - Web server access logs with repeated POST requests to the vulnerable endpoint.
- PHP error logs showing
Detection Engineering
YARA Rule
rule CVE_2025_66571_PHP_Object_Injection {
meta:
description = "Detects PHP object injection attempts targeting CVE-2025-66571 in UNA CMS"
author = "Valters IT"
date = "2025-01-01"
reference = "CVE-2025-66571"
strings:
$serialized_pattern = /O:\d+:"[^"]+":\d+:\{/
$profile_id_param = "profile_id"
condition:
$profile_id_param and $serialized_pattern
}
Sigma Rule
title: CVE-2025-66571 UNA CMS PHP Object Injection
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects POST requests with serialized PHP objects in the profile_id parameter
author: Valters IT
date: 2025-01-01
logsource:
category: webserver
product: apache
detection:
selection:
http_method: POST
c-uri|contains: "set_acl_level"
request_body|contains: "profile_id="
request_body|re: "O:\\d+:"
condition: selection
falsepositives:
- Legitimate use of serialized data (unlikely in this context)
level: critical
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-66571 UNA CMS PHP Object Injection Attempt"; flow:to_server,established; content:"POST"; http_method; content:"set_acl_level"; http_uri; content:"profile_id="; http_client_body; pcre:"/O:\d+:\"[^\"]+\":\d+:\{/"; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the vulnerable endpoint: If possible, block access to the
set_acl_levelendpoint via web server configuration (e.g., Nginxlocationblock or ApacheRewriteRule). - Apply input validation: If you have access to the source code, replace
unserialize()withjson_decode()or validate thatprofile_idis an integer. - Monitor logs: Actively monitor web server and PHP error logs for exploitation attempts.
Long-Term Fix:
- Wait for an official patch from the vendor (Una). As of this report, no patch is available.
- Consider migrating to a different CMS if the vendor does not provide timely security updates.
Workaround:
- Use a Web Application Firewall (WAF) with rules to block serialized PHP objects in POST parameters.
- Implement a custom PHP wrapper that overrides
unserialize()to only allow safe classes (using theallowed_classesparameter in PHP 7.0+).
Valters IT
Securing Digital Frontiers