Register for the AI for Security Summit: Join Figma, Perplexity & Wiz

CVE-2026-39178
SOGo vulnerability analysis and mitigation

Overview

CVE-2026-39178 is a SQL injection vulnerability in SOGo, an open-source groupware server developed by Alinto, affecting all versions before 5.12.7. Authenticated users can execute arbitrary SQL statements by manipulating the search parameter of the allContactSearch endpoint. The vulnerability was published on July 8, 2026, with a patch released the same day in SOGo v5.12.7. It carries a CVSS v3.1 base score of 6.3 (Medium) as assessed by CISA-ADP (Github Advisory, NVD).

Technical details

The root cause is CWE-89 (Improper Neutralization of Special Elements used in an SQL Command), where the fetchContactsMatching method in SoObjects/SOGo/SQLSource.m constructed SQL queries by directly interpolating the user-supplied filter/search parameter without using a proper SQL adaptor for parameterization. The fix replaced raw string interpolation with EOQualifier-based SQL construction using the database adaptor's escaping mechanisms (appendSQLToString:withAdaptor:), and switched from a manual asSafeSQLLikeString approach to asSafeSQLString with proper qualifier formatting. Exploitation requires network access and valid credentials (low-privilege authenticated user), with no user interaction needed (GitHub Commit, Github Advisory).

Impact

Successful exploitation allows any authenticated SOGo user to execute arbitrary SQL statements against the backend database, resulting in low-to-moderate impacts on confidentiality, integrity, and availability. An attacker could extract sensitive data (e.g., contact records, user credentials, calendar data), modify or delete database records, or potentially disrupt service availability. Depending on database permissions and configuration, there is a risk of broader data exposure beyond the attacker's own account scope (Github Advisory, NVD).

Exploitability

There is no public proof-of-concept exploit code and no evidence of in-the-wild exploitation at this time, as confirmed by CISA's SSVC assessment (exploitation: none) (NVD). The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. The EPSS score is approximately 0.149–0.157%, indicating a low near-term exploitation probability (Github Advisory). Exploitation is not automatable per CISA's assessment, as it requires authenticated access.

Exploitation steps

  1. Obtain credentials: Acquire valid SOGo user credentials through phishing, credential stuffing, or other means, since the vulnerability requires authentication.
  2. Authenticate to SOGo: Log in to the target SOGo instance via the web interface or API to obtain a valid session token or cookie.
  3. Identify the vulnerable endpoint: Locate the allContactSearch endpoint, typically accessible at a URL such as /SOGo/so/<username>/Contacts/allContactSearch.
  4. Craft a malicious search parameter: Inject SQL syntax into the search query parameter. For example, append a payload like ' OR '1'='1 or a UNION-based statement to manipulate the underlying SQL query.
  5. Send the crafted request: Submit an HTTP GET or POST request to the endpoint with the injected search parameter, e.g., GET /SOGo/so/user/Contacts/allContactSearch?search=test%27%20OR%20%271%27%3D%271.
  6. Extract or manipulate data: Analyze the server response to confirm injection success, then refine payloads to enumerate database tables, extract sensitive records, or modify data as desired (GitHub Commit, Github Advisory).

Indicators of compromise

  • Network: Unusual or repeated HTTP requests to the allContactSearch endpoint containing SQL metacharacters (e.g., single quotes ', OR, UNION, SELECT, --) in the search parameter; unexpected outbound database connections from the SOGo server.
  • Logs: SOGo or web server access logs showing requests to /SOGo/so/<user>/Contacts/allContactSearch with encoded or anomalous search values; database error messages or stack traces related to malformed SQL queries in application logs.
  • Database: Unexpected or anomalous SQL queries in database query logs, particularly those involving UNION SELECT, comment sequences (--, /**/), or queries returning data from unrelated tables.

Mitigation and workarounds

The primary remediation is to upgrade SOGo to version 5.12.7 or later, which addresses the SQL injection by replacing direct string interpolation with proper SQL adaptor-based parameterization (SOGo Release, GitHub Commit). As a temporary workaround prior to patching, administrators should restrict access to the allContactSearch endpoint to trusted users only (e.g., via network-level controls or reverse proxy rules) and monitor database query logs for suspicious SQL patterns. Applying the principle of least privilege to the SOGo database account can also limit the potential impact of exploitation.

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

sogo: 5.8.0-2+deb12u3

Fixed

sid

sogo: 5.12.7-1

Fixed

trixie

sogo: 5.12.1-3+deb13u2

Fixed

Ubuntu

Unknown

bionic (esm-apps)

sogo

Unknown

devel

sogo

Unknown

focal (esm-apps)

sogo

Unknown

jammy

sogo

Unknown

jammy (esm-apps)

sogo

Unknown

resolute

sogo

Unknown

resolute (esm-apps)

sogo

Unknown

xenial (esm-apps-legacy)

sogo

Unknown

SourceThis report was generated using AI

Related SOGo vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-93453HIGH8.7
  • SOGo logoSOGo
  • cpe:2.3:a:alinto:sogo
NoYesSep 18, 2026
CVE-2026-8851HIGH8.6
  • SOGo logoSOGo
  • sogo
NoYesMay 18, 2026
CVE-2026-46446HIGH7.1
  • SOGo logoSOGo
  • sogo
NoYesMay 14, 2026
CVE-2026-39179MEDIUM6.3
  • SOGo logoSOGo
  • sogo
NoYesJul 08, 2026
CVE-2026-39178MEDIUM6.3
  • SOGo logoSOGo
  • sogo
NoYesJul 08, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management