
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2025-25034 is a PHP object injection vulnerability in SugarCRM's REST API that allows unauthenticated remote attackers to execute arbitrary code. It affects SugarCRM versions prior to 6.5.24, 6.7.13, 7.5.2.5, 7.6.2.2, and 7.7.1.0, with the flaw residing in the SugarRestSerialize.php script. The vulnerability was originally disclosed in 2016 (referenced in SugarCRM advisories sugarcrm-sa-2016-001 and sugarcrm-sa-2016-008), but a prior patch was incomplete and failed to address all attack vectors; it was formally assigned CVE-2025-25034 and published on June 20, 2025. It carries a CVSS v4.0 base score of 9.3 (Critical) (Feedly, VulnCheck).
The root cause is improper validation of PHP serialized input (CWE-502: Deserialization of Untrusted Data), specifically in /service/core/REST/SugarRestSerialize.php. The vulnerable code passes the rest_data POST parameter directly to PHP's unserialize() function without sanitization, enabling PHP object injection. An attacker can craft a serialized payload containing a malicious SugarCacheFile object; when deserialized, the object's __destruct() magic method is triggered, writing arbitrary PHP code into the /custom/ directory of the web application. The exploit targets the REST API endpoint at /service/v4/rest.php with input_type=Serialize and requires no authentication or user interaction (Metasploit Module, KarmaInsecurity).
Successful exploitation grants an unauthenticated attacker arbitrary PHP code execution within the web server's security context, resulting in full compromise of confidentiality, integrity, and availability of the affected SugarCRM instance. An attacker can read, modify, or delete CRM data (including sensitive customer and business records), plant persistent web shells, and potentially pivot to other internal systems accessible from the web server. The attack is fully remote, requires no privileges, and no user interaction, making it highly automatable (Feedly, VulnCheck).
A fully functional Metasploit module (sugarcrm_rest_unserialize_exec.rb) is publicly available in the Metasploit Framework, and a standalone exploit (Exploit-DB ID 40344) has been publicly accessible since 2016 (Metasploit Module, Exploit-DB). The Shadowserver Foundation observed exploitation evidence on 2024-09-13 UTC, confirming in-the-wild exploitation activity (Feedly). The EPSS score is approximately 0.086% (low probability model estimate), though the existence of a weaponized Metasploit module and confirmed exploitation significantly elevates practical risk. No specific threat actor attribution is publicly available, and the vulnerability is not currently listed in the CISA KEV catalog based on available data.
/service/v4/rest.php).SugarCacheFile class. The payload encodes a malicious object that, upon deserialization, will write a PHP web shell to the /custom/ directory. Example payload structure from the Metasploit module:O:+14:"SugarCacheFile":23:{S:17:"\00*\00_cacheFileName";s:<len>:"../<path>.php";S:16:"\00*\00_cacheChanged";b:1;S:14:"\00*\00_localStore";a:1:{i:0;s:55:"<php_payload>";}}/service/v4/rest.php with parameters method=login, input_type=Serialize, and rest_data=<serialized_payload>. No authentication is required.__destruct() and write web shell: PHP's unserialize() processes the crafted object; when the object is garbage-collected, SugarCacheFile::__destruct() writes the embedded PHP code to the specified file path under /custom/./sugarcrm/custom/<random>.php) with the payload encoded in a request header, achieving remote code execution as the web server user (Metasploit Module, KarmaInsecurity)./service/v4/rest.php (or similar REST API paths) with input_type=Serialize and a rest_data parameter containing PHP serialized object strings (e.g., starting with O:+14:"SugarCacheFile")./custom/ directory with unusual filenames (random alphanumeric strings with .php extension)./custom/ directory with random alphanumeric names not matching legitimate SugarCRM customization files.eval(), base64_decode(), or system() calls within the /custom/ directory.rest.php with large or encoded rest_data values, followed by GET requests to newly created PHP files in /custom/.bash, curl, wget, python, nc) indicating command execution via the web shell (Metasploit Module, Feedly).Upgrade SugarCRM to a patched version: 6.5.24, 6.7.13, 7.5.2.5, 7.6.2.2, or 7.7.1.0 or later. As interim mitigations, deploy a Web Application Firewall (WAF) to detect and block requests containing PHP serialized object strings in the rest_data parameter, and implement network segmentation to restrict access to the SugarCRM REST API from untrusted networks. Additionally, monitor the /custom/ directory for unexpected PHP file creation and audit web server logs for anomalous POST requests to rest.php (VulnCheck, Feedly).
The vulnerability was assigned by VulnCheck and published in June 2025, drawing attention from the security community given its roots in a 2016 incomplete patch. Nuclei Templates (ProjectDiscovery) added detection templates for CVE-2025-25034 across multiple commits, indicating active community interest in automated detection (Nuclei Templates). Qualys included detection for this CVE in their July 2025 web application detection updates (Qualys). Social media activity on Bluesky and LinkedIn noted the vulnerability's significance given the availability of a Metasploit module and confirmed exploitation evidence from Shadowserver.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."