EGroupware Nextmatch Filter Authenticated SQL Injection (CVE-2026-22243)
by Łukasz Rybak (GitHub: lukasz-rybak) · 2026-07-05
- Severity
- Critical
- CVE
- CVE-2026-22243
- Category
- web
- Affected product
- EGroupware (groupware/collaboration suite)
- Affected versions
- < 23.1.20260113; >= 26.0.20251208 and < 26.0.20260113
- Disclosed
- 2026-07-05
- Patch status
- patched
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-04 |
| Author / Researcher | Łukasz Rybak (GitHub: lukasz-rybak) |
| CVE / Advisory | CVE-2026-22243 |
| Category | web |
| Severity | Critical |
| CVSS Score | Not specified in source (advisory lists severity as HIGH) |
| Status | PoC |
| Tags | sql-injection, egroupware, php-type-juggling, authenticated, error-based-sqli, nextmatch, json |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | EGroupware (groupware/collaboration suite) |
| Versions Affected | < 23.1.20260113; >= 26.0.20251208 and < 26.0.20260113 |
| Language / Platform | PHP (application), Python (PoC exploit script) |
| Authentication Required | Yes (any authenticated, low-privileged user) |
| Network Access Required | Yes |
Summary
CVE-2026-22243 is a critical authenticated SQL injection in EGroupware’s Nextmatch widget filter processing (used across modules such as InfoLog and Address Book). The application’s database layer (Api\Db, Api\Storage\Base, infolog_so) treats array keys of the col_filter parameter as trusted raw SQL fragments whenever is_int($key) returns true. Because PHP’s json_decode() automatically converts numeric string keys (e.g., "0") into native integers, an attacker can submit a JSON POST body whose col_filter map has numeric-string keys, causing the application to treat the corresponding values as safe and concatenate them directly into the SQL WHERE clause. The included Python PoC logs in, extracts a required exec_id token from the address book UI, and performs error-based SQL injection (via EXTRACTVALUE) against the Nextmatch::ajax_get_rows JSON endpoint to exfiltrate the database version, name, current user, and stored account credentials.
Vulnerability Details
Root Cause
is_int() checks used to decide whether a col_filter array key represents a trusted raw-SQL fragment are bypassed because json_decode() silently casts numeric string keys (e.g., "0") to PHP integers, so attacker-supplied JSON keys pass the “trusted” check and their values are appended unsanitized to the generated SQL query.
Attack Vector
- Authenticate to EGroupware as any valid user (even without special privileges).
- Load an authenticated page (e.g., Address Book) to obtain the per-session
exec_idtoken embedded in the page source. - Send a JSON POST request to
json.php?menuaction=EGroupware\Api\Etemplate\Widget\Nextmatch::ajax_get_rowswith acol_filterobject using a numeric string key (e.g.,"0") whose value is anEXTRACTVALUE-based error-based SQL injection payload. - Parse the resulting XPath syntax error message returned by MySQL/MariaDB, which leaks a chunk of the requested query’s output; repeat with
SUBSTRINGoffsets to reconstruct full result strings.
Impact
Full database compromise for any authenticated user: reading arbitrary data including password hashes and session tokens, and potential modification or deletion of application data.
Environment / Lab Setup
Target: EGroupware instance (Docker or hosted) running an affected version
Attacker: Python 3 with the `requests` library
Proof of Concept
PoC Script
See
exploit.pyin this folder (extracted from the researcher’s README, where it was published inline).
| |
Logs in with the supplied credentials, extracts the exec_id token from the Address Book UI, then issues chunked EXTRACTVALUE-based error injections against the Nextmatch AJAX endpoint to print the database version, database name, current DB user, and the stored password hash for the sysop account.
Detection & Indicators of Compromise
Signs of compromise:
- Web/WAF logs showing many rapid POSTs to the Nextmatch
ajax_get_rowsendpoint with numeric-stringcol_filterkeys and SQL functions in the values - MySQL/MariaDB error log entries for XPATH-related errors triggered by application queries
- Unexpected reads of
egw_accountsor other sensitive tables outside normal application query patterns
Remediation
| Action | Detail |
|---|---|
| Primary fix | Upgrade to EGroupware 23.1.20260113 / 26.0.20260113 or later |
| Interim mitigation | Enforce a strict allowlist of permitted filter column names and use parameter binding instead of relying on is_int() type checks for trust decisions |
References
Notes
Mirrored from https://github.com/lukasz-rybak/CVE-2026-22243 on 2026-07-05.
| |