CVE-2024-37906: Admidio/admidio SQL Injection Vulnerability
CRITICALCVE-2024-37906 is a CRITICAL (CVSS 9.9) sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Admidio/admidio libraries in the Packagist ecosystem. The issue involves admidio has blind sql injection in ecard_send.php. Remediation is available by upgrading affected packages to version 4.3.9.
CVE-2024-37906 at a Glance
Security Impact
CVSS: 9.9
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:C/C:H/I:H/A:H).
How to Fix CVE-2024-37906
To remediate this vulnerability, upgrade all affected Admidio/admidio dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade admidio/admidio to 4.3.9
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for admidio/admidio
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-37906, inspect your project dependencies for Admidio/admidio:
inspect dependencies for admidio/admidio
Analyze the terminal output to locate any version of Admidio/admidio in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.3.9), 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 Admidio/admidio, 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
CVE-2024-37906 Affected Admidio/admidio Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
admidio/admidio
|
Packagist |
< 4.3.9
|
4.3.9
|
References
Frequently Asked Questions
What is CVE-2024-37906?
Which Admidio/admidio versions are affected?
What version fixes CVE-2024-37906?
Is admidio/admidio affected?
What is the CVSS score of CVE-2024-37906?
What CWE is associated with CVE-2024-37906?
How can I check Packagist dependencies for CVE-2024-37906?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-69wx-xc6j-28v3",
"modified" : "2024-07-29T16:31:46Z",
"published" : "2024-07-29T16:31:46Z",
"aliases" : [ "CVE-2024-37906" ],
"summary" : "Admidio has Blind SQL Injection in ecard_send.php",
"details" : "### Description:\nAn SQL Injection has been identified in the `/adm_program/modules/ecards/ecard_send.php` source file of the Admidio Application. The SQL Injection results in a compromise of the application's database. The value of `ecard_recipients `POST parameter is being directly concatenated with the SQL query in the source code causing the SQL Injection.\n\nThe SQL Injection can be exploited by a member user, using blind condition-based, time-based, and Out of band interaction SQL Injection payloads. I successfully exploited SQL Injections by causing Time Delays. Advancing the payload, I was able to exfiltrate data from the database based on trial and error conditions and step-wise enumerating the characters of the database name. This was done as a POC of SQL Injection. An attacker could simply drop the database by providing a single payload, steal data, and potentially update the database according to their will. \n\n### Impact:\nSQL injection (SQLi) vulnerabilities can have serious consequences for the security of a web application and its underlying database. Attackers can use SQLi to access sensitive data, and modify, delete, or add data to the database. SQLi can also be potentially used to perform RCE. \n\n### Remediation:\nUse parameterized queries or prepared statements instead of concatenating user input directly into SQL queries. Parameterized queries ensure that user input is treated as data and not executable queries. \nOR \nSanitize the input before including it in the SQL Query.\n\n### Steps to Reproduce:\n- Intercept the POST request to `/adm_program/modules/ecards/ecard_send.php`, which is used to send photo as greeting card.\n- Change the value of `ecard_recipients%5B%5D` POST parameter to `2%2bsleep(10)`.\n- Sending the request will cause a time delay.\n\n### Proof Of Concept:\n\n\nFigure 1: Code Vulnerable to SQL Injection\n\n\nFigure 2: Code Vulnerable to SQL Injection\n\n\nFigure 3: SQLi to trigger time delay\n\n\nFigure 4: Data Exfiltration via Condition-based Time Delays",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "admidio/admidio"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.3.9"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Admidio/admidio/security/advisories/GHSA-69wx-xc6j-28v3"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-37906"
}, {
"type" : "WEB",
"url" : "https://github.com/Admidio/admidio/commit/3ff02b0c64a6911ab3e81cd61077f392c0b25248"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Admidio/admidio"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-89" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2024-07-29T16:31:46Z",
"nvd_published_at" : "2024-07-29T15:15:10Z"
}
}