/

CVE-2026-29103

Severity:

CRITICAL RISK

(9.1)

Code Injection RCE in SuiteCRM Module Loader

CVE-2026-29103

Analyzed

Vulnerability type

Category:

Code Injection / Remote Code Execution

CWE:

CWE-94, CWE-358

Impact:

Remote Code Execution by authenticated administrators, leading to full server compromise

Severity:

CRITICAL RISK

(9.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A critical remote code execution vulnerability in SuiteCRM 7.15.0 and 8.9.2 allows authenticated administrators to execute arbitrary system commands by bypassing the Module Loader protections.

Due to flawed PHP token parsing in ModuleScanner.php, attackers can conceal dangerous function calls inside variable assignments or string concatenations so they are not detected by the security scanner, leading to arbitrary code execution on the server.

Affected context

The vulnerability appears in SuiteCRM's Module Loader / ModuleScanner feature, which is intended to scan and restrict custom PHP code or modules uploaded through the administrative interface.

It affects deployments where:

  • Administrators are allowed to upload or modify custom modules, extensions, or PHP-based logic, and
  • The security model relies on ModuleScanner.php to detect and block dangerous PHP functions or patterns.

In these contexts, the scanner's state machine incorrectly resets whenever it encounters single-character tokens like =, ., or ;, creating blind spots where dangerous calls can be embedded.

Exploit preconditions

  • Attack surface: SuiteCRM web interface, specifically the Module Loader or any administrative workflow that accepts or evaluates custom PHP code controlled by an authenticated user.
  • Required access: Authenticated SuiteCRM administrator (or a user with equivalent module-upload/custom-code privileges).
  • Trigger point: Uploading, installing, or otherwise introducing custom PHP code that is processed by ModuleScanner.php, with dangerous function calls obscured by variable assignment or string concatenation.
  • Why exploitation is possible: The ModuleScanner's token-based parser uses a $checkFunction flag to track when to inspect function calls. This flag is erroneously reset on any single-character token, allowing dangerous functions such as system() or exec() to be hidden within syntactically valid PHP constructs that the scanner fails to recognize as risky.

Why this happens

The core issue is an incomplete and stateful PHP token parsing mechanism in ModuleScanner.php that attempts to vet code for unsafe function usage.

Instead of performing robust, context-aware analysis of PHP syntax, the scanner uses a simple state flag ($checkFunction) to decide when to treat a token as a function invocation.

When the scanner encounters any single-character token (e.g., =, ., ;), it incorrectly resets this flag, effectively losing context about subsequent tokens.

Attackers can craft code so that calls to dangerous functions are split across or preceded by such tokens, causing the scanner to miss them entirely.

This aligns with:

  • CWE-94: Improper Control of Generation of Code ('Code Injection') — user-controlled PHP code passes through an incomplete validation layer, enabling execution of injected functionality.
  • CWE-358: Improperly Implemented Security Check for Standard — the ModuleScanner's implementation does not faithfully enforce the intended security standard or policy for disallowing dangerous PHP calls.

Potential impact

  • Authenticated administrators may execute arbitrary system commands on the CRM server.
  • Full compromise of the underlying operating system account running the web server or PHP interpreter.
  • Reading, modifying, or deleting CRM data, including customer records and business-sensitive information.
  • Installation of persistent backdoors or web shells within the SuiteCRM environment.
  • Lateral movement to other systems reachable from the compromised host.
  • Disruption of CRM operations through data corruption or service interruption.

General mitigation guidance

Effective mitigation focuses on strengthening code handling paths and reducing reliance on fragile token-based scanners:

  • Replace ad-hoc PHP token parsing with a safer, more deterministic approach (e.g., whitelisted APIs, declarative configuration, or metadata-driven module definitions instead of arbitrary PHP).
  • Apply strict, allowlist-based controls on which functions and language constructs custom modules may use, and enforce these via a well-tested parser or runtime sandbox rather than homegrown token checks.
  • Treat administrator-supplied code as untrusted by default and isolate its execution:
  • Run SuiteCRM under a locked-down OS account with minimal privileges.
  • Use separate execution contexts, containers, or PHP-FPM pools for user-supplied code, enforcing least privilege and filesystem separation.
  • Minimize or disable runtime upload of executable code where business requirements allow, preferring pre-reviewed, signed modules from trusted sources.
  • Incorporate defense-in-depth controls such as application-level feature flags for custom code execution, and logging/alerting for module uploads or changes that introduce new PHP files.

How teams detect issues like this

Detection relies on identifying both flawed scanning logic and suspicious custom code:

  • Static analysis of the scanner itself:
  • Review ModuleScanner.php for stateful parsing logic that makes assumptions about token sequences.
  • Flag any implementation where function detection depends on single-character tokens or fragile state flags.
  • Static analysis of custom modules:
  • Scan uploaded modules for direct use of dangerous functions (e.g., system, exec, shell_exec, passthru, popen, backticks) regardless of ModuleScanner decisions.
  • Look for obfuscated patterns such as function names built via string concatenation or variable variables.
  • Code review signals:
  • Custom modules that perform command execution, file management outside expected paths, or arbitrary evaluation of user input should receive heightened scrutiny.
  • Any code paths that bypass or short-circuit ModuleScanner or similar security layers should be considered high risk.
  • Policy and tooling:
  • Enforce CI/CD policies that require static security checks on all custom SuiteCRM modules before deployment.
  • Use application security testing tools capable of understanding PHP syntax and detecting code injection sinks, configured to run on all uploaded or custom code repositories.
  • Monitor logs for repeated module upload attempts and for commands being executed by the webserver user, correlating anomalous activity with administrative actions in the CRM.

Sources

SourceLink
docs.suitecrm.comdocs.suitecrm.com/admin/releases/7.15.x
github.comgithub.com/SuiteCRM/SuiteCRM/security/advisories/GHSA-5jjq-9qch-9rg7

Frequently asked

questions

Exploitation requires authenticated administrator-level access or equivalent privileges that allow uploading or editing custom modules or PHP code through SuiteCRM's administrative interfaces. It is not exploitable by anonymous users in a default configuration, but any compromised admin account can leverage it for full server takeover.

The attacker must be able to authenticate as an administrator (or a similarly privileged role) and use features like the Module Loader or other custom-code entry points. From that position, they can craft PHP code that evades ModuleScanner and reaches sensitive execution sinks.

The safest approach is to avoid relying on homegrown token-level scanners for security enforcement. Instead, restrict or eliminate direct execution of administrator-supplied PHP, use whitelisted functionality, employ robust parsing or sandboxing for any extension mechanism, and ensure that dangerous functions cannot be invoked from custom modules at all.

Prevention hinges on designing extension systems that are secure by construction: favor declarative configuration over executable code, use mature parsing and policy engines rather than ad-hoc token logic, enforce least privilege around any dynamic code execution, and integrate automated security testing for all extension mechanisms as part of the development and release process.

Find out what's already
exploitable in your codebase.