CVE-2023-22952 — Multiple SugarCRM Products Remote Code Execution Vulnerability

CVE-2023-22952

SugarCRM Multiple Products — PHP Code Injection via EmailTemplates Module → Authenticated RCE; SA-2023-001; February 2023 KEV

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:

  1. 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
  2. Craft a malicious template request — submit a specially crafted request to the EmailTemplates API endpoint containing embedded PHP code in the template body
  3. Trigger server-side execution — the SugarCRM server evaluates the template content in a PHP context, executing the attacker-controlled PHP code
  4. 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

  1. 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.
  2. Audit CRM user accounts — remove unused or unnecessary CRM accounts; because PR:L means any CRM user can exploit the vulnerability, minimizing the user base reduces exposure.
  3. Review web server logs for unusual POST requests to EmailTemplates endpoints or unexpected outbound connections from the CRM server that may indicate prior exploitation.
  4. 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.
  5. Enable web application firewall (WAF) rules for SugarCRM to detect and block PHP injection patterns in template submissions as a compensating control.

Key Details

PropertyValue
CVE ID CVE-2023-22952
Vendor / Product SugarCRM — Multiple Products
NVD Published2023-01-11
NVD Last Modified2025-11-03
CVSS 3.1 Score8.8
CVSS 3.1 VectorCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
SeverityHIGH
CWE CWE-20 find similar ↗
CISA KEV Added2023-02-02
CISA KEV Deadline2023-02-23
Known Ransomware Use No

CVSS 3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Required Action

CISA BOD 22-01 Deadline: 2023-02-23. Apply updates per vendor instructions.

Timeline

DateEvent
2023-01-11CVE-2023-22952 published; SugarCRM releases security advisory SA-2023-001 patching the EmailTemplates PHP code injection vulnerability
2023-02-02CISA adds CVE-2023-22952 to the Known Exploited Vulnerabilities catalog — three weeks after patch release
2023-02-23CISA BOD 22-01 remediation deadline

References

ResourceType
NVD — CVE-2023-22952 Vulnerability Database
CISA KEV Catalog Entry US Government