CVE-2024-40614: Egroupware/egroupware EGroupware Mishandles An ORDER BY Vulnerability

HIGH
Advisory Identifier: GHSA-phg7-8mm9-gj88
CVSS 6.5
CWE-89
Published
Advisory Summary

CVE-2024-40614 is a HIGH (CVSS 6.5) egroupware mishandles an order by vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Egroupware/egroupware libraries in the Packagist ecosystem. The issue involves egroupware mishandles an order by clause. Remediation is available by upgrading affected packages to version 23.1.20240624.

CVE-2024-40614 at a Glance

CVE Identifier CVE-2024-40614
GHSA Identifier GHSA-phg7-8mm9-gj88
Severity HIGH
CVSS v3.1 Base Score 6.5
CWE Classification CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected Product Egroupware/egroupware
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N).

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

How to Fix CVE-2024-40614

To remediate this vulnerability, upgrade all affected Egroupware/egroupware dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

egroupware/egroupware fixed: 23.1.20240624
Upgrade egroupware/egroupware to 23.1.20240624
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for egroupware/egroupware

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-40614, inspect your project dependencies for Egroupware/egroupware:

inspect dependencies for egroupware/egroupware

Analyze the terminal output to locate any version of Egroupware/egroupware in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 23.1.20240624), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In Egroupware/egroupware, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

EGroupware before 23.1.20240624 mishandles an ORDER BY clause. This leads to json.php menuaction=EGroupware\Api\Etemplate\Widget\Nextmatch::ajax_get_rows sort.id SQL injection by authenticated users for Address Book or InfoLog sorting.

CVE-2024-40614 Affected Egroupware/egroupware Versions

1 component(s)
Fixed Versions:
23.1.20240624
Product / Package Ecosystem Affected Versions Fixed Version
egroupware/egroupware
Packagist
< 23.1.20240624
23.1.20240624

References

Frequently Asked Questions

What is CVE-2024-40614?
CVE-2024-40614 is a security vulnerability in Egroupware/egroupware involving EGroupware mishandles an ORDER BY clause under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Which Egroupware/egroupware versions are affected?
Affected versions include releases prior to 23.1.20240624 across affected packages: egroupware/egroupware.
What version fixes CVE-2024-40614?
Upgrading to 23.1.20240624 (or the latest patched release for your respective branch) resolves the vulnerability.
Is egroupware/egroupware affected?
Yes, egroupware/egroupware is affected in releases prior to 23.1.20240624. Upgrade your dependency to 23.1.20240624 or later.
What is the CVSS score of CVE-2024-40614?
CVE-2024-40614 has a CVSS v3.1 base score of 6.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2024-40614?
CVE-2024-40614 is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') (The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.).
How can I check Packagist dependencies for CVE-2024-40614?
Run the dependency tree command: 'inspect dependencies for egroupware/egroupware'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-phg7-8mm9-gj88",
  "modified" : "2024-11-18T16:26:49Z",
  "published" : "2024-07-07T15:31:12Z",
  "aliases" : [ "CVE-2024-40614" ],
  "summary" : "EGroupware mishandles an ORDER BY clause",
  "details" : "EGroupware before 23.1.20240624 mishandles an ORDER BY clause. This leads to json.php menuaction=EGroupware\\Api\\Etemplate\\Widget\\Nextmatch::ajax_get_rows sort.id SQL injection by authenticated users for Address Book or InfoLog sorting.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "egroupware/egroupware"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "23.1.20240624"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-40614"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/EGroupware/egroupware/commit/553829d30cc2ccdc0e5a8c5a0e16fa03a3399a3f"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/EGroupware/egroupware"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/EGroupware/egroupware/compare/23.1.20240430...23.1.20240624"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/EGroupware/egroupware/releases/tag/23.1.20240624"
  }, {
    "type" : "WEB",
    "url" : "https://help.egroupware.org/t/egroupware-maintenance-security-release-23-1-20240624/78438"
  }, {
    "type" : "WEB",
    "url" : "https://syss.de"
  }, {
    "type" : "WEB",
    "url" : "https://www.syss.de/fileadmin/dokumente/Publikationen/Advisories/SYSS-2024-047.txt"
  }, {
    "type" : "WEB",
    "url" : "https://www.syss.de/pentest-blog/sql-injection-schwachstelle-in-egroupware-syss-2024-047"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-89" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-07-08T15:00:36Z",
    "nvd_published_at" : "2024-07-07T15:15:09Z"
  }
}