Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-53574 Overview
EspoCRM, an open source customer relationship management application, contains a blind SQL injection vulnerability in the streamAttachments endpoint. An authenticated non-administrator user can submit a crafted where parameter to the GET entity streamAttachments endpoint. The query path permits complex expressions, enabling boolean-based blind SQL injection [CWE-89]. Attackers can extract arbitrary database content, including active administrator session tokens, which enables full privilege escalation. The flaw affects versions 8.1.0 through 9.3.7 and is fixed in version 9.3.8.
Critical Impact
Authenticated low-privilege users can extract administrator session tokens via blind SQL injection, leading to full account takeover and privilege escalation.
Affected Products
- EspoCRM versions 8.1.0 through 9.3.7
- EspoCRM self-hosted deployments exposing the entity stream API
- EspoCRM instances with multi-user access and non-administrator accounts
Discovery Timeline
- 2026-10-15 - CVE-2026-53574 published to the National Vulnerability Database
- 2026-10-15 - Last updated in NVD database
- 9.3.8 - EspoCRM releases patched version resolving the vulnerability
Technical Details for CVE-2026-53574
Vulnerability Analysis
The vulnerability resides in the entity stream attachments retrieval path. EspoCRM accepts a client-supplied where parameter when fetching stream attachments. The server-side query builder permits complex expressions in this path without sufficient sanitization of attribute identifiers.
An authenticated user with standard permissions can inject crafted expressions that influence the generated SQL. Because responses differ based on boolean conditions in the injected payload, attackers can perform classic boolean-based blind extraction. Repeated requests allow byte-by-byte exfiltration of sensitive table contents, including the authentication tokens table used to persist active administrator sessions.
Root Cause
The root cause is twofold. First, the streamAttachments query path invokes the where-clause builder without calling withComplexExpressionsForbidden(), allowing sub-queries and complex expressions in a context that should accept only simple filters. Second, the where-checker did not reject attribute strings containing the # character, which was used as a delimiter in the injection payloads to break out of the intended expression context.
Attack Vector
The attack requires only a valid non-administrator session. The attacker sends GET requests to the entity stream attachments endpoint with a crafted where parameter encoding a boolean-based SQL predicate. Observing response differences across many requests lets the attacker reconstruct arbitrary database values, including auth_token rows tied to active administrator sessions. The attacker then replaces their session cookie with the stolen token to gain administrator privileges.
// Patch 1: application/Espo/Core/Select/Where/Checker.php
// Rejects attribute names containing the '#' delimiter used in injection payloads
$forbidComplexExpressions = $params->forbidComplexExpressions();
$checkWherePermission = $params->applyPermissionCheck();
+ if ($attribute && str_contains($attribute, '#')) {
+ throw new Forbidden("Not allowed character in attribute.");
+ }
+
if ($forbidComplexExpressions) {
if (in_array($type, $this->subQueryTypeList)) {
throw new Forbidden("Sub-queries are forbidden in where.");
Source: GitHub commit e4a6aea
// Patch 2: application/Espo/Tools/Stream/RecordService.php
// Forbids complex expressions on the streamAttachments query path
->create()
->from(Attachment::ENTITY_TYPE)
->withSearchParams($searchParams)
+ ->withComplexExpressionsForbidden()
->buildQueryBuilder()
->where(
Condition::in(
Source: GitHub commit e4a6aea
Detection Methods for CVE-2026-53574
Indicators of Compromise
- Repeated GET requests to the entity streamAttachments endpoint from the same authenticated user within a short interval.
- URL-encoded where parameters containing the # character, nested conditions, or SQL fragments such as SUBSTRING, ASCII, or SLEEP.
- Non-administrator accounts suddenly performing administrator-only actions after a burst of stream attachment queries.
- New sessions originating from unexpected IP addresses that share auth_token values with legitimate administrator sessions.
Detection Strategies
- Inspect web server and application logs for high-volume access to /api/v1/*/streamAttachments with varying where payloads from a single session.
- Alert on HTTP 403 responses from the where-checker containing "Not allowed character in attribute" after patch deployment, which indicates injection attempts.
- Correlate authentication token reuse across distinct source IPs or user agents within the EspoCRM auth_token table.
Monitoring Recommendations
- Enable verbose request logging on the EspoCRM API gateway and ship logs to a centralized analytics platform.
- Baseline normal where parameter length and complexity per user role, then alert on statistical outliers.
- Monitor privilege changes and administrator session creation events for anomalies tied to non-administrator source accounts.
How to Mitigate CVE-2026-53574
Immediate Actions Required
- Upgrade all EspoCRM instances to version 9.3.8 or later without delay.
- Invalidate all active sessions and force re-authentication for administrator accounts after upgrade.
- Audit the auth_token table and application audit logs for signs of session token theft during the exposure window.
- Review recent privilege changes, role assignments, and administrator-only configuration edits for unauthorized activity.
Patch Information
The fix is included in EspoCRM release 9.3.8. Technical details are documented in GHSA-qgm7-fc9g-fj75. The upstream commit e4a6aea applies two defenses: it rejects attribute identifiers containing # in the where-checker, and it calls withComplexExpressionsForbidden() on the streamAttachments query path.
Workarounds
- Restrict access to the EspoCRM API to trusted networks via firewall or reverse-proxy rules until the upgrade is applied.
- Temporarily remove or disable non-administrator user accounts that do not require active access.
- Deploy a web application firewall rule that blocks requests to streamAttachments containing the # character or nested SQL keywords in the where parameter.
# Example: upgrade EspoCRM via composer/git and verify the fixed version
git fetch --tags
git checkout 9.3.8
php rebuild.php
grep -R "withComplexExpressionsForbidden" application/Espo/Tools/Stream/RecordService.php
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

