What is SugarCRM?
SugarCRM is an open-core customer relationship management (CRM) platform widely deployed by organizations in sales, marketing, and customer support operations. It stores contact records, opportunity pipelines, email communications, and customer interaction histories. SugarCRM Community Edition is open-source while Sugar Pro, Enterprise, and Ultimate are commercial tiers with extended features. The EmailTemplates module allows users to create HTML email templates used in automated CRM workflows — campaigns, lead nurturing, follow-up sequences — which are later rendered and sent by the CRM on behalf of users or automated processes. Code injection vulnerabilities in template processors arise when user-supplied content is passed to a PHP evaluation context without sufficient sanitization.
Overview
CVE-2023-22952 is an improper input validation vulnerability (CWE-20) in SugarCRM's EmailTemplates module that allows an authenticated attacker with low-level CRM access to inject and execute arbitrary PHP code on the SugarCRM server. Using a specially crafted HTTP request to the EmailTemplates endpoint, an attacker can embed PHP code in a template body that is subsequently evaluated server-side. SugarCRM addressed the vulnerability in security advisory SA-2023-001, published January 11, 2023. CISA added CVE-2023-22952 to the KEV catalog on February 2, 2023 — just three weeks after the patch, confirming rapid exploitation in the wild.
Affected Versions
| Product | Affected | Fixed |
|---|---|---|
| SugarCRM CE (Community Edition) | Versions prior to SA-2023-001 patch | Apply SA-2023-001 patch |
| Sugar Pro | Versions prior to SA-2023-001 patch | Apply SA-2023-001 patch |
| Sugar Enterprise | Versions prior to SA-2023-001 patch | Apply SA-2023-001 patch |
| Sugar Ultimate | Versions prior to SA-2023-001 patch | Apply SA-2023-001 patch |
Technical Details
The vulnerability is in SugarCRM's EmailTemplates module. The improper input validation (CWE-20) occurs when template content submitted by a CRM user is processed in a context that allows PHP code evaluation. The attack flow is:
- Authenticate to SugarCRM — an attacker with any low-privilege CRM account (sales user, contact manager, etc.) can exploit the vulnerability; no admin access is required
- Craft a malicious template request — submit a specially crafted request to the EmailTemplates API endpoint containing embedded PHP code in the template body
- Trigger server-side execution — the SugarCRM server evaluates the template content in a PHP context, executing the attacker-controlled PHP code
- Achieve RCE — the PHP code runs with the web server process's privileges, enabling shell command execution, file system access, and lateral movement
The PR:L (low privilege required) constraint limits exposure to organizations where SugarCRM accounts are tightly controlled — but in multi-tenant or cloud CRM deployments where many users have accounts, the effective attack surface is wide.
Discovery
SugarCRM published security advisory SA-2023-001 on January 11, 2023 disclosing CVE-2023-22952. The rapid KEV addition three weeks later reflects either that proof-of-concept code was quickly developed from the advisory, or that threat actors who had pre-discovered the vulnerability were already deploying exploits at the time of disclosure.
Exploitation Context
CRM platforms are high-value targets for exploitation because they contain sensitive sales data, customer PII, deal pipelines, and email communication histories. Remote code execution on a CRM server provides:
- Access to all CRM data stored in the application's database
- The server's network vantage point for lateral movement to internal systems
- Potential access to email account credentials or OAuth tokens configured for CRM email integration
- Persistence on a system with outbound email capability, useful for phishing further targets
SugarCRM's open-source Community Edition deployment broadens the attack surface: any organization that installed SugarCRM CE without applying SA-2023-001 is exposed, and CRM instances are frequently internet-accessible by design.
Remediation
- Apply the SA-2023-001 patch — apply the fix from SugarCRM's security advisory immediately; the patch corrects the input validation in the EmailTemplates module.
- Audit CRM user accounts — remove unused or unnecessary CRM accounts; because
PR:Lmeans any CRM user can exploit the vulnerability, minimizing the user base reduces exposure. - Review web server logs for unusual POST requests to EmailTemplates endpoints or unexpected outbound connections from the CRM server that may indicate prior exploitation.
- Restrict CRM internet exposure — if SugarCRM does not need to be internet-accessible (e.g., it is used only by internal staff), place it behind a VPN or corporate network boundary.
- Enable web application firewall (WAF) rules for SugarCRM to detect and block PHP injection patterns in template submissions as a compensating control.
Key Details
| Property | Value |
|---|---|
| CVE ID | CVE-2023-22952 |
| Vendor / Product | SugarCRM — Multiple Products |
| NVD Published | 2023-01-11 |
| NVD Last Modified | 2025-11-03 |
| CVSS 3.1 Score | 8.8 |
| CVSS 3.1 Vector | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| Severity | HIGH |
| CWE | CWE-20 find similar ↗ |
| CISA KEV Added | 2023-02-02 |
| CISA KEV Deadline | 2023-02-23 |
| Known Ransomware Use | No |
CVSS 3.1 Breakdown
Required Action
Timeline
| Date | Event |
|---|---|
| 2023-01-11 | CVE-2023-22952 published; SugarCRM releases security advisory SA-2023-001 patching the EmailTemplates PHP code injection vulnerability |
| 2023-02-02 | CISA adds CVE-2023-22952 to the Known Exploited Vulnerabilities catalog — three weeks after patch release |
| 2023-02-23 | CISA BOD 22-01 remediation deadline |
References
| Resource | Type |
|---|---|
| NVD — CVE-2023-22952 | Vulnerability Database |
| CISA KEV Catalog Entry | US Government |