/

CVE-2026-27832

Severity:

HIGH RISK

(8.8)

SQL Injection in Group-Office Email Template Selection

CVE-2026-27832

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Authenticated Data Exfiltration via SQL Injection

Severity:

HIGH RISK

(8.8)

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 SQL injection vulnerability in Group-Office allows an authenticated user to manipulate the advancedQueryData[comparator] parameter on the emailSelection endpoint, influencing how SQL conditions are constructed.

When exploited, this flaw can be used for blind boolean-based exfiltration of sensitive data from the core_auth_password table under specific authenticated conditions.

Affected context

The vulnerability occurs in Group-Office's email template selection functionality, specifically at index.php?r=email/template/emailSelection, when advanced search or filtering uses the advancedQueryData structure.

It is relevant in deployments where authenticated users can interact with this endpoint and where user-supplied comparator values are passed into SQL condition builders without strict validation or allowlisting.

The risk is higher in environments where the backing database holds sensitive credential or authentication-related tables accessible to the application.

Exploit preconditions

  • Attack surface: Authenticated web interface of Group-Office, via the emailSelection endpoint.
  • Required access: Valid authenticated account with permission to trigger email template selection using advanced query filters.
  • Trigger point: Supplying crafted values in the advancedQueryData comparator field, which is consumed when the server builds SQL conditions.
  • Why exploitation is possible: The comparator value is forwarded directly, or with insufficient normalization, into SQL condition-building logic without a strict allowlist or robust input validation, enabling attackers to influence the structure of SQL queries and perform boolean-based blind inference.

Why this happens

This issue stems from dynamically constructing SQL conditions based on user-controlled input without enforcing strong constraints on what values are permitted.

The advancedQueryData[comparator] field is treated as a trusted fragment that controls the comparison operator or condition, which is then interpolated into SQL statements.

This pattern maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the application fails to neutralize or constrain dangerous characters or operators, allowing the user to alter the query logic beyond its intended scope.

Potential impact

  • Attackers may exfiltrate sensitive authentication data from the core_auth_password table using blind boolean-based techniques.
  • Compromise of user account confidentiality if password hashes or related authentication material are disclosed.
  • Facilitation of offline password cracking attempts against extracted credential data.
  • Broader disclosure of other database records accessible through the same query context, depending on schema design and application permissions.

General mitigation guidance

Mitigation typically focuses on separating user input from query structure and tightly constraining dynamic query options.

Recommended defensive patterns include:

  • Using parameterized queries or ORM query builders where all user-controlled fields are treated as data, not as SQL operators or fragments.
  • Implementing a strict allowlist for allowed comparator values (e.g., =, !=, <, >, LIKE) and mapping user choices to static server-side constants rather than passing raw input into the query.
  • Centralizing query-building logic so that all dynamic filters pass through a vetted API that enforces type checks and known-safe operators.
  • Reducing the exposure of sensitive tables and columns by applying least-privilege database accounts and minimizing direct access to credential-related data from user-facing features.

How teams detect issues like this

Detection commonly involves both code-level and runtime perspectives:

  • Static analysis rules that flag string concatenation or interpolation in SQL-building code paths, especially where user-derived parameters such as advancedQueryData influence operators or conditions.
  • Code review practices that require all dynamic query construction to use parameter binding and predefined operator maps, and that scrutinize any "generic filter" features taking arbitrary comparator input.
  • Application-level logging and monitoring for anomalous query patterns, such as repetitive boolean-style probes, time-based probing, or unusually complex comparator values.
  • Use of web application firewalls or request validation layers configured to block suspicious SQL-like patterns in fields that are not expected to contain SQL syntax.

Sources

SourceLink
github.comgithub.com/Intermesh/groupoffice/security/advisories/GHSA-vfgv-8w8v-qpxr

Frequently asked

questions

It is exploitable through the web interface but requires a valid authenticated session; an unauthenticated external user cannot directly exploit the issue without first obtaining credentials or leveraging another flaw.

An attacker needs an account with access to the email template selection functionality that accepts advancedQueryData, typically a regular user capable of using advanced search or filtering options on that endpoint.

The safest approach is to ensure that query structure is fully controlled by the server, using parameterized queries and a strict server-side mapping of allowed comparator options, so that user input only supplies values, never SQL operators or fragments.

Establish a standard data-access layer that mandates parameter binding, enforce allowlists for user-selectable operators, conduct regular code reviews with a focus on dynamic query construction, and integrate automated checks (such as SAST and dependency scanning) into the development pipeline to flag risky patterns early.

Find out what's already
exploitable in your codebase.