☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 9.8 🐛 CWE-89
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-40614

CVE-2024-40614 SQL Injection in Egroupware
📅 PUBLISHED: 2024-07-07 00:00 UTC 🔄 UPDATED: 2026-10-18 18:58 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.68%
👁️
0.68% probability
16.9× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
9.8
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-40614 is a critical SQL injection vulnerability in EGroupware, an open-source groupware suite. The flaw resides in the Nextmatch::ajax_get_rows method, specifically in how it handles the sort.id parameter within an ORDER BY clause. An authenticated attacker can inject arbitrary SQL commands through the json.php endpoint, targeting the Address Book or InfoLog modules. This allows for unauthorized data extraction, modification, or potential privilege escalation. The vulnerability is present in all versions before 23.1.20240624. No public proof-of-concept (PoC) or exploit code has been released at this time.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

EGroupware is a PHP-based application. The vulnerability is not in a third-party package but in the core application logic. Organizations using EGroupware should treat this as a high-priority internal application security issue.

CVSS Breakdown & Threat Level

The CVSS score is listed as 0.0, which is likely a placeholder. Based on the nature of the vulnerability (authenticated SQL injection), a realistic CVSS v3.1 score would be approximately 8.8 (High).

  • Attack Vector (AV): Network (N)
  • Attack Complexity (AC): Low (L)
  • Privileges Required (PR): Low (L) - Requires authentication
  • User Interaction (UI): None (N)
  • Scope (S): Unchanged (U)
  • Confidentiality (C): High (H)
  • Integrity (I): High (H)
  • Availability (A): High (H)

Threat Level: High. An authenticated attacker can fully compromise the database, leading to data theft, manipulation, and potential lateral movement within the network.

Deep Dive & Mechanics

The vulnerability is located in the Nextmatch::ajax_get_rows function, which is called via the json.php endpoint with the menuaction=EGroupware/Api/Etemplate/Widget/Nextmatch::ajax_get_rows parameter. The function is responsible for fetching and sorting data for the Address Book and InfoLog widgets.

The issue is that the sort.id parameter, which specifies the column to sort by, is not properly sanitized before being used in an SQL ORDER BY clause. The ORDER BY clause is particularly dangerous because it can accept complex expressions, not just column names. An attacker can inject SQL code that will be executed by the database.

Vulnerable Code Path:

  1. User sends a POST request to json.php with menuaction=EGroupware/Api/Etemplate/Widget/Nextmatch::ajax_get_rows and a crafted sort[id] parameter.
  2. The application extracts the sort[id] value.
  3. This value is directly concatenated into an SQL query like: SELECT ... FROM ... ORDER BY [user_input].
  4. The database executes the injected SQL.

Example Injection: An attacker could set sort[id] to:

(SELECT CASE WHEN (SELECT 1 FROM information_schema.tables WHERE table_schema=database() LIMIT 1)=1 THEN 1 ELSE 1 END)

This would allow the attacker to extract data from the database by observing the sort order or using time-based techniques.

Vulnerable vs. Patched Code

Vulnerable Code (before 23.1.20240624): The vulnerable code likely directly used the sort.id parameter in the SQL query without proper escaping or validation. A simplified example:

$sort = $_POST['sort']['id'];
$query = "SELECT * FROM egw_addressbook ORDER BY $sort";

Patched Code (23.1.20240624 and later): The patched code sanitizes the sort.id parameter. It likely uses a whitelist of allowed column names or properly escapes the input. A simplified example:

$allowed_sorts = ['contact_id', 'n_family', 'n_given', 'tel'];
$sort = $_POST['sort']['id'];
if (in_array($sort, $allowed_sorts)) {
    $query = "SELECT * FROM egw_addressbook ORDER BY $sort";
} else {
    // Handle invalid sort
}

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • Valid user credentials for the EGroupware instance.
  • Network access to the EGroupware web interface.

Exploitation Steps:

  1. Authenticate: Log in to the EGroupware web interface.
  2. Craft Payload: Create a malicious sort[id] parameter. For example, to extract the database version:
    (SELECT @@version)
    
  3. Send Request: Use a tool like curl to send the request:
    curl -X POST 'https://target-egroupware/json.php' \
    -H 'Content-Type: application/x-www-form-urlencoded' \
    -d 'menuaction=EGroupware/Api/Etemplate/Widget/Nextmatch::ajax_get_rows&sort[id]=(SELECT @@version)'
    
  4. Observe Response: The response will contain the sorted data, which may reveal the database version in the order of the results.

Advanced Exploitation:

  • Use UNION-based injection to extract data directly.
  • Use time-based blind injection to extract data character by character.
  • Use INTO OUTFILE to write a webshell (if database permissions allow).

Blue Team (Detection & Response)

Detection:

  • Monitor for unusual sort[id] parameters containing SQL keywords (SELECT, UNION, FROM, WHERE, etc.).
  • Monitor for requests to json.php with menuaction=EGroupware/Api/Etemplate/Widget/Nextmatch::ajax_get_rows from authenticated users.
  • Look for database errors in logs that may indicate failed injection attempts.

Response:

  1. Isolate: Immediately isolate the affected EGroupware server from the network.
  2. Analyze: Review database logs for any unauthorized queries.
  3. Contain: Change all user passwords and rotate database credentials.
  4. Patch: Apply the vendor patch by upgrading to version 23.1.20240624 or later.
  5. Monitor: Continue monitoring for any signs of persistence or lateral movement.

Indicators of Compromise (IOCs)

Network IOCs:

  • HTTP POST requests to /json.php with menuaction=EGroupware/Api/Etemplate/Widget/Nextmatch::ajax_get_rows and a sort[id] parameter containing SQL syntax.
  • Unusual database error messages in HTTP responses (e.g., "You have an error in your SQL syntax").

Host IOCs:

  • Unexpected database queries in the database server logs.
  • New files in the web root (possible webshells).
  • Unusual processes running on the EGroupware server.

Log IOCs:

  • Web server logs showing requests with SQL-like patterns in the sort[id] parameter.
  • Database logs showing queries with ORDER BY clauses containing subqueries or functions like @@version.

Detection Engineering

YARA Rule

rule CVE_2024_40614_EGroupware_SQLi {
    meta:
        description = "Detects SQL injection attempts targeting CVE-2024-40614 in EGroupware"
        author = "Valters IT"
        date = "2024-07-15"
        reference = "CVE-2024-40614"
    strings:
        $sqli_pattern = /sort\[id\]\s*=\s*.*(SELECT|UNION|INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|EXEC|OR\s+1=1|AND\s+1=1)/i
        $endpoint = "menuaction=EGroupware/Api/Etemplate/Widget/Nextmatch::ajax_get_rows"
    condition:
        $endpoint and $sqli_pattern
}

Sigma Rule

title: CVE-2024-40614 EGroupware SQL Injection
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects SQL injection attempts against EGroupware Nextmatch widget
author: Valters IT
date: 2024/07/15
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-method: 'POST'
        cs-uri-query|contains: 'menuaction=EGroupware/Api/Etemplate/Widget/Nextmatch::ajax_get_rows'
        cs-uri-query|re: 'sort\[id\]=.*(SELECT|UNION|INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|EXEC|OR\s+1=1|AND\s+1=1)'
    condition: selection
falsepositives:
    - Legitimate use of complex sorting (unlikely)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (
    msg:"CVE-2024-40614 EGroupware SQL Injection Attempt";
    flow:to_server,established;
    content:"POST"; http_method;
    content:"/json.php"; http_uri;
    content:"menuaction=EGroupware/Api/Etemplate/Widget/Nextmatch::ajax_get_rows"; http_client_body;
    pcre:"/sort\[id\]=.*(SELECT|UNION|INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|EXEC|OR\s+1=1|AND\s+1=1)/i";
    sid:1000001;
    rev:1;
)

Remediation & Mitigation

Immediate Actions:

  1. Patch: Upgrade EGroupware to version 23.1.20240624 or later. This is the only complete fix.
  2. Workaround: If patching is not immediately possible, implement a Web Application Firewall (WAF) rule to block requests containing SQL keywords in the sort[id] parameter.
  3. Restrict Access: Limit access to the json.php endpoint to only trusted IP addresses if possible.

Long-Term Mitigations:

  • Input Validation: Implement strict input validation for all user-supplied data, especially parameters used in SQL queries.
  • Prepared Statements: Use parameterized queries (prepared statements) for all database interactions.
  • Least Privilege: Ensure the database user used by EGroupware has the minimum necessary privileges (e.g., no FILE privilege).
  • Regular Audits: Conduct regular security audits and code reviews.
  • Monitoring: Implement robust logging and monitoring for all database queries.

Valters IT Signature

This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters-it.com.

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-40614/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.