CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-22243

Typecast Catastrophe: The EGroupware JSON-to-SQL Pipeline

Alon Barad
Alon Barad
Software Engineer

Jan 28, 2026·6 min read·48 visits

Executive Summary (TL;DR)

EGroupware trusted JSON integers to be safe. They weren't. By sending native integers in a JSON payload, attackers bypass input sanitization that expects strings, injecting unquoted values directly into SQL queries. This allows for database type confusion and unauthorized data access.

A high-severity SQL injection vulnerability in EGroupware's Nextmatch widget allows authenticated attackers to manipulate database queries via JSON type juggling. By leveraging PHP's strict integer handling against a database's implicit casting, attackers can bypass quoting mechanisms and potentially exfiltrate sensitive data or modify records.

The Hook: When Types Don't Match

In the world of web security, we often obsess over strings. We strip tags, we escape quotes, and we panic over apostrophes. But what happens when the input isn't a string? EGroupware, a robust collaboration platform used by enterprises, fell into a classic trap: assuming that if something looks like a number and smells like a number, it can't possibly be a weapon.

The vulnerability resides in the Nextmatch widget, the core component responsible for rendering lists, calendars, and address books. It's the gatekeeper that decides what you see. To handle complex filtering, Nextmatch accepts JSON payloads. And this is where the plot thickens. JSON supports native types—booleans, nulls, and most importantly, integers.

PHP, being the loosely-typed chaotic neutral language we all love (and fear), interacts with these JSON types in interesting ways. When a developer writes code expecting a standard HTTP POST request (where everything is a string), they might not anticipate the behavior of json_decode. This cognitive gap turned a routine filter feature into a high-severity hole, earning it a CVSS score of 8.7.

The Flaw: The Integer Bypass

The root cause of CVE-2026-22243 is a subtle logic error in how filters are sanitized. The application logic followed a seemingly sound principle: strict validation. Before putting a user-supplied value into a SQL WHERE clause, the code checked its type.

Here is the logic in pseudocode: "If the value is an integer, it's safe. Append it. If it's anything else (like a string), quote and escape it." This relies on the PHP function is_int(). In a standard web request (application/x-www-form-urlencoded), every input is a string. Even id=123 arrives as the string "123". In that scenario, is_int("123") returns false, and the value gets safely quoted as '123'.

But JSON is different. When json_decode processes {"id": 123}, it creates a native PHP integer. Now, is_int(123) returns true. The application sees this, says "Trust me, I'm an engineer," and concatenates the value directly into the SQL string without quotes. This removes the protective layer of quotes, exposing the database to Type Confusion attacks or logic manipulation via numeric literals.

The Code: The Smoking Gun

Let's look at the vulnerable pattern. The code likely resembled this simplified logic inside Nextmatch.php:

// VULNERABLE LOGIC
$filter = json_decode($json_input, true);
$query = "SELECT * FROM contacts WHERE ";
 
foreach ($filter as $col => $val) {
    // If it's a native integer, use it directly
    if (is_int($val)) {
        $query .= $col . " = " . $val;
    } else {
        // Otherwise, escape and quote it
        $query .= $col . " = '" . $db->quote($val) . "'";
    }
}

The fix implementation (released Jan 13, 2026) forces strict handling regardless of the input type. It stops treating integers as a special "safe" class that deserves unquoted access. The patch ensures that all user inputs, regardless of their JSON data type, are treated with suspicion and properly parameterized or cast explicitly before query construction.

// FIXED LOGIC
// Treat everything as a parameter or force quoting
$query .= $col . " = '" . $db->quote((string)$val) . "'";
// OR better yet, use prepared statements binding

The Exploit: Boolean Blindness

So how do we exploit this? We can't inject UNION SELECT because is_int() is strict—it won't accept strings containing SQL keywords. However, we can perform Database Type Juggling. This is where the PHP type juggling vulnerability hands the baton to the Database type juggling vulnerability.

Imagine a query filtering by a text column, like username. Normally, the query is WHERE username = 'admin'. If we inject a 0 via JSON ({"username": 0}), the query becomes WHERE username = 0 (no quotes).

In many database configurations (especially older MySQL/MariaDB versions or specific modes), comparing a string column to the integer 0 results in true for every row that doesn't start with a number. This effectively becomes WHERE true.

Attack Scenario:

  1. Recon: Attacker logs in and intercepts the Nextmatch filter request.
  2. Modify: They change a filter for a sensitive text column (e.g., status or owner) to the integer 0 or a boolean true (which PHP might cast to 1).
  3. Execute: The server generates SELECT * FROM secret_table WHERE owner = 0.
  4. Result: The database implicitly casts the owner string column to integers. Strings like "admin" become 0. The condition matches. The attacker sees data they shouldn't.

The Impact: Why Panic?

While this isn't a "drop table" RCE (Remote Code Execution) scenario immediately, the impact is severe for confidentiality and integrity. The vulnerability allows an authenticated user—potentially a low-privileged employee—to bypass horizontal privilege escalation controls.

By manipulating filters:

  • Data Leakage: A user could view calendar entries, contacts, or internal notes belonging to other users or administrators by nullifying the owner_id checks.
  • Logic Bypass: In workflows where status=1 means "Approved", injecting unquoted integers might allow manipulating workflow states if the application relies on string comparisons that are subverted by the injection.

The CVSS score of 8.7 reflects this high impact on confidentiality and integrity without requiring user interaction.

The Fix: Casting Calls

Mitigation is straightforward but requires code changes. You cannot fix this with a WAF easily because the payload ({"id": 0}) looks perfectly legitimate. The fix must occur in the PHP logic.

For Administrators: Update EGroupware immediately to version 23.1.20260113 or 26.0.20260113. If you are running an older version, you are exposed.

For Developers: Stop trusting is_int(), is_numeric(), or gettype() for security decisions regarding SQL generation. Always use Prepared Statements (parameterized queries). If you must build dynamic SQL strings (which you shouldn't), treat every input as hostile and ensure it is enclosed in quotes, regardless of whether PHP thinks it's a harmless integer.

Official Patches

EGroupwareRelease notes for version 23.1.20260113
EGroupwareRelease notes for version 26.0.20260113

Technical Appendix

CVSS Score
8.7/ 10
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Affected Systems

EGroupware Community EditionEGroupware EPL (Enterprise)

Affected Versions Detail

Product
Affected Versions
Fixed Version
EGroupware
EGroupware
< 23.1.2026011323.1.20260113
EGroupware
EGroupware
< 26.0.2026011326.0.20260113
AttributeDetail
CWE IDCWE-89 (SQL Injection)
Attack VectorNetwork (Authenticated)
CVSS Score8.7 (High)
Exploit StatusNo Public PoC
Root CausePHP Type Juggling / JSON Decoding
Affected ComponentNextmatch Filter Widget

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1068Exploitation for Privilege Escalation
Privilege Escalation
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Vulnerability Timeline

Vendor releases patched versions 23.1.20260113 and 26.0.20260113
2026-01-13
CVE-2026-22243 Published
2026-01-28
GHSA-rvxj-7f72-mhrx Released
2026-01-28

References & Sources

  • [1]GitHub Security Advisory
  • [2]Positive Technologies Analysis

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 7 hours ago•CVE-2026-63462
7.5

CVE-2026-63462: Unauthenticated Stack Overflow Denial of Service in Unleash Server

An unauthenticated remote denial of service vulnerability exists in the Unleash feature management platform. By submitting a crafted JSON payload containing deeply nested structures to an OpenAPI-validated endpoint, an attacker can trigger uncontrolled recursion within the error formatting module. This leads to a call-stack exhaustion (RangeError: Maximum call stack size exceeded) inside the Node.js runtime, causing the service to crash immediately without recovery.

Alon Barad
Alon Barad
4 views•6 min read
•about 8 hours ago•CVE-2026-63004
5.5

CVE-2026-63004: Server-Side Request Forgery in Unleash Addon and Integration Subsystem

CVE-2026-63004 is a server-side request forgery (SSRF) vulnerability in the Unleash feature management platform. Authenticated administrators with CREATE_ADDON or UPDATE_ADDON privileges can exploit this vulnerability to initiate requests to loopback addresses, private networks, and cloud metadata endpoints, potentially leading to information disclosure and credential extraction.

Amit Schendel
Amit Schendel
4 views•8 min read
•about 9 hours ago•CVE-2026-63466
4.1

CVE-2026-63466: Process-Wide Security Degradation via Global Module Mutation in Unleash

Prior to version 8.0.3, Unleash's Markdown event formatter directly mutated the global template-escaping function of the shared mustache Node.js module, resulting in a process-wide security degradation where HTML/Markdown escaping was permanently disabled for the application lifetime.

Alon Barad
Alon Barad
3 views•6 min read
•about 10 hours ago•CVE-2026-76904
9.8

CVE-2026-76904: Unauthenticated SQL Injection in GeoTools PostGIS DataStore Component

A critical SQL injection vulnerability exists in the GeoTools open-source Java library. This vulnerability is situated within the post-processing phase of OGC Filter conversion inside the PostGIS DataStore module. Specifically, the `jsonArrayContains` function does not validate or sanitize its arguments before constructing PostgreSQL SQL/JSON path evaluation queries. An unauthenticated remote attacker can exploit this weakness by submitting crafted filters via standard OGC services like WFS or WMS to execute arbitrary SQL commands on the underlying database system.

Alon Barad
Alon Barad
4 views•5 min read
•about 11 hours ago•CVE-2026-61824
8.2

CVE-2026-61824: High-Severity Cross-Site Scripting (XSS) via Unsanitized Site Extractors in Defuddle

CVE-2026-61824 is a high-severity Cross-Site Scripting (XSS) vulnerability in kepano/defuddle before version 0.19.1. Custom site extractors for platforms such as X/Twitter, Substack, and YouTube constructed HTML representations via template string interpolation without output escaping. This allowed malicious pages to bypass standard parser sanitization routines and execute arbitrary JavaScript.

Amit Schendel
Amit Schendel
4 views•7 min read
•about 12 hours ago•CVE-2026-63421
7.5

CVE-2026-63421: Query Limit Bypass via Negative Integer Input in KeystoneJS core resolvers

A high-severity vulnerability exists in KeystoneJS, a popular Node.js CMS and GraphQL framework, where the query resolution engine fails to validate signed negative integers within the pagination subsystem. Unauthenticated remote attackers can leverage this flaw to bypass the 'graphql.maxTake' safety boundary. By sending large negative values in the 'take' query parameter, the underlying Prisma ORM interprets the value as an instruction to fetch rows from the end of the collection, allowing malicious actors to bypass pagination limits, trigger database resource exhaustion, and execute application-level Denial of Service (DoS) attacks.

Alon Barad
Alon Barad
4 views•6 min read