Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS02OXd4LXhjNmotMjh2M84AA-MV

Admidio has Blind SQL Injection in ecard_send.php

Description:

An 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.

The 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.

Impact:

SQL 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.

Remediation:

Use 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.
OR
Sanitize the input before including it in the SQL Query.

Steps to Reproduce:

Proof Of Concept:

image
Figure 1: Code Vulnerable to SQL Injection

image
Figure 2: Code Vulnerable to SQL Injection

image
Figure 3: SQLi to trigger time delay

image
Figure 4: Data Exfiltration via Condition-based Time Delays

Permalink: https://github.com/advisories/GHSA-69wx-xc6j-28v3
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS02OXd4LXhjNmotMjh2M84AA-MV
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Critical
Classification: General
Published: 4 months ago
Updated: 4 months ago


CVSS Score: 10.0
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Identifiers: GHSA-69wx-xc6j-28v3, CVE-2024-37906
References: Repository: https://github.com/Admidio/admidio
Blast Radius: 0.0

Affected Packages

packagist:admidio/admidio
Dependent packages: 1
Dependent repositories: 1
Downloads: 17 total
Affected Version Ranges: < 4.3.9
Fixed in: 4.3.9
All affected versions: 4.1.0, 4.1.3, 4.2.0, 4.2.1, 4.2.2, 4.2.3, 4.2.4, 4.2.5, 4.2.6, 4.2.7, 4.2.8, 4.2.9, 4.2.10, 4.2.11, 4.2.12, 4.2.13, 4.2.14, 4.3.0, 4.3.1, 4.3.2, 4.3.3, 4.3.4, 4.3.5, 4.3.6, 4.3.7, 4.3.8
All unaffected versions: 4.3.9, 4.3.10, 4.3.11, 4.3.12