/

CVE-2026-69140

Severity:

HIGH RISK

(8.3)

SQL Injection (CWE-89) in SuiteCRM Revision Handler

CVE-2026-69140

Undergoing Analysis

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Database data disclosure and unauthorized modification of linked document records

Severity:

HIGH RISK

(8.3)

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

SuiteCRM's document revision handler inserts a request value directly into an SQL UPDATE statement, allowing a low-privileged user with Documents module access to interfere with database queries. The issue may enable database data disclosure and unauthorized updates to linked document records; this vector does not support stacked statements or arbitrary DROP or INSERT operations.

SuiteCRM's document revision handler inserts a request value directly into an SQL UPDATE statement, allowing a low-privileged user with Documents module access to interfere with database queries. The issue may enable database data disclosure and unauthorized updates to linked document records; this vector does not support stacked statements or arbitrary DROP or INSERT operations.

Affected context

The issue occurs in GetLatestRevision.php when get_latest_for_id is interpolated into an SQL UPDATE statement. It affects SuiteCRM versions before 7.15.2 and 8.10.2. Risk depends on access to the Documents module and on the application processing the affected value through the vulnerable query path.

The issue occurs in GetLatestRevision.php when get_latest_for_id is interpolated into an SQL UPDATE statement. It affects SuiteCRM versions before 7.15.2 and 8.10.2. Risk depends on access to the Documents module and on the application processing the affected value through the vulnerable query path.

Exploit preconditions

  • Attack surface: The document revision functionality in the SuiteCRM application
  • Required access: A low-privileged account with Documents module access
  • Trigger point: Processing get_latest_for_id in GetLatestRevision.php
  • Why exploitation is possible: The input can reach the SQL statement with a literal quote despite the normal quote-encoding behavior of securexss(), allowing SQL query structure to be altered
  • Attack surface: The document revision functionality in the SuiteCRM application
  • Required access: A low-privileged account with Documents module access
  • Trigger point: Processing get_latest_for_id in GetLatestRevision.php
  • Why exploitation is possible: The input can reach the SQL statement with a literal quote despite the normal quote-encoding behavior of securexss(), allowing SQL query structure to be altered

Why this happens

The handler interpolates externally influenced input directly into an SQL UPDATE statement rather than treating it strictly as data. Although securexss() normally entity-encodes quotes, the described AntiXSS processing behavior can select a processed value that retains a literal quote. This is CWE-89: SQL Injection, caused by constructing a query with untrusted input instead of using parameterized database operations.

The handler interpolates externally influenced input directly into an SQL UPDATE statement rather than treating it strictly as data. Although securexss() normally entity-encodes quotes, the described AntiXSS processing behavior can select a processed value that retains a literal quote. This is CWE-89: SQL Injection, caused by constructing a query with untrusted input instead of using parameterized database operations.

Potential impact

  • An attacker may disclose database data accessible through the affected query.
  • An attacker could mass-update linked document records.
  • The described vector does not support stacked statements or arbitrary DROP or INSERT operations.
  • An attacker may disclose database data accessible through the affected query.
  • An attacker could mass-update linked document records.
  • The described vector does not support stacked statements or arbitrary DROP or INSERT operations.

General mitigation guidance

Defensive patterns focus on ensuring untrusted values cannot change SQL query structure:

  • Use parameterized queries or prepared statements for database operations.
  • Validate inputs against the expected type and format before processing.
  • Treat output encoding and XSS filters as separate from SQL injection defenses.
  • Apply least-privilege database permissions to limit the effects of unauthorized queries or updates.
  • Restrict access to document-management functionality according to user roles.

Defensive patterns focus on ensuring untrusted values cannot change SQL query structure:

  • Use parameterized queries or prepared statements for database operations.
  • Validate inputs against the expected type and format before processing.
  • Treat output encoding and XSS filters as separate from SQL injection defenses.
  • Apply least-privilege database permissions to limit the effects of unauthorized queries or updates.
  • Restrict access to document-management functionality according to user roles.

How teams detect issues like this

  • Use static analysis to flag SQL statements built through string interpolation or concatenation with request-derived values.
  • Review database access code for consistent use of parameterized queries and validation at trust boundaries.
  • Enforce code-review or CI policies that prohibit unsafe query construction.
  • Monitor for unexpected bulk changes to linked document records and unusual database access patterns.
  • Use static analysis to flag SQL statements built through string interpolation or concatenation with request-derived values.
  • Review database access code for consistent use of parameterized queries and validation at trust boundaries.
  • Enforce code-review or CI policies that prohibit unsafe query construction.
  • Monitor for unexpected bulk changes to linked document records and unusual database access patterns.

Sources

SourceLink
github.comgithub.com/SuiteCRM/SuiteCRM-Core/commit/a11f50180d939f639cc468b5d536e8ad714dfb68
github.comgithub.com/SuiteCRM/SuiteCRM-Core/releases/tag/v8.10.2
github.comgithub.com/SuiteCRM/SuiteCRM/commit/d6bca97a0159ec019a969b86eca32affab3beb7c
github.comgithub.com/SuiteCRM/SuiteCRM/releases/tag/v7.15.2
github.comgithub.com/SuiteCRM/SuiteCRM/security/advisories/GHSA-xg3m-xvc9-j55j

Frequently asked

questions

The described issue affects the document revision query path and may allow data disclosure or mass updates to linked document records. The vector does not support stacked statements or arbitrary DROP or INSERT operations.

The attacker needs a low-privileged account with access to the Documents module and must be able to reach the affected functionality.

Use parameterized queries so input is handled as data, not incorporated into SQL syntax.

Review database query construction, validate values against expected types, and enforce secure query patterns through code review and automated checks.

The described issue affects the document revision query path and may allow data disclosure or mass updates to linked document records. The vector does not support stacked statements or arbitrary DROP or INSERT operations.

The attacker needs a low-privileged account with access to the Documents module and must be able to reach the affected functionality.

Use parameterized queries so input is handled as data, not incorporated into SQL syntax.

Review database query construction, validate values against expected types, and enforce secure query patterns through code review and automated checks.

Find out what's already
exploitable in your codebase.