Media

AVideo: IDOR in PayPalYPT Plugin Allows Any Authenticated User to Cancel Arbitrary PayPal Subscription Agreements

  • Publicada: 05.05.2026
  • Actualizado: 11.10.2026 10:22

Summary

plugin/PayPalYPT/agreementCancel.json.php cancels a PayPal billing agreement using an attacker-supplied agreement parameter without verifying that the authenticated user owns the agreement. A low-privilege authenticated user who learns or obtains another user's PayPal billing agreement ID can silently suspend the victim's recurring subscription, causing revenue loss to the platform and loss of paid service to the victim.

Details

AVideo's PayPalYPT plugin ships two near-duplicate endpoints that cancel a PayPal billing agreement. Only one of them enforces ownership:

  • plugin/PayPalYPT/PayPalAgreementCancel.json.php:19 — correctly requires either admin or the agreement's owner:

    php
    if (!User::isAdmin() && !Subscription::isAgreementFromUser($_POST['agreement_id'], User::getId())) {
        $obj->msg = "Only the owner can delete his agreement";
        die(json_encode($obj));
    }
  • plugin/PayPalYPT/agreementCancel.json.php:9-26 — only checks User::isLogged() (in fact twice, redundantly) and then calls the cancellation directly:

    php
    if (!User::isLogged()) { ... die; }              // line 9
    if (empty($_REQUEST['agreement'])) { ... die; }   // line 14
    if (!User::isLogged()) { ... die; }              // line 19 — duplicate; no ownership check
    $plugin = AVideoPlugin::loadPluginIfEnabled("PayPalYPT");
    $agreement = PayPalYPT::cancelAgreement($_REQUEST['agreement']);  // line 26

PayPalYPT::cancelAgreement() at plugin/PayPalYPT/PayPalYPT.php:548-566 resolves the agreement ID against PayPal and calls $createdAgreement->suspend($agreementStateDescriptor, $apiContext) unconditionally — the server does not verify that the logged-in user's users_id matches the owner recorded in PayPalYPT_log (or wherever the agreement was registered):

php
public static function cancelAgreement($agreement_id)
{
    ...
    $createdAgreement = self::getBillingAgreement($agreement_id);
    try {
        $createdAgreement->suspend($agreementStateDescriptor, $apiContext);
        return Agreement::get($createdAgreement->getId(), $apiContext);
    } catch (Exception $ex) {
        return false;
    }
}

The intended UI caller is subscriptions_list.php:84 which posts the current user's own agreement IDs — but the server accepts any agreement parameter from any logged-in user. Agreement IDs can leak via _error_log entries written in agreementCancel.json.php:34 and webhook.php during normal operation, via PayPal receipt emails, or via other administrative and payment-log screens. No CSRF token is required, but the root defect is missing authorization, not CSRF.

PoC

  1. Log in as any low-privilege user (registered subscriber, commenter, free-tier account created via signUp).

  2. Obtain the target's PayPal agreement ID (e.g., I-ABCD1234XYZ). This may come from server error logs, email receipts, admin/payment screens, or other disclosures.

  3. Send the request with the victim's agreement ID:

    bash
    curl -X POST 'https://target.example/plugin/PayPalYPT/agreementCancel.json.php' \
      -b 'PHPSESSID=<attacker_session>' \
      -d 'agreement=I-ABCD1234XYZ'
  4. Expected response:

    js
    {"error":false,"msg":""}

    The victim's billing agreement is suspended at PayPal via Agreement::suspend() (PayPalYPT.php:560). The victim stops being billed; AVideo subsequently reflects the subscription as inactive.

Impact

  • Any authenticated user can silently cancel another user's active PayPal recurring billing agreement.
  • Revenue disruption for the platform operator — any affected subscribers stop being billed.
  • Service disruption for the victim — their paid subscription lapses.
  • The defect is purely an authorization gap; the sister endpoint PayPalAgreementCancel.json.php demonstrates that the owner/admin check was intentional for this action but was not applied to this duplicate.

Recommended Fix

Port the ownership check from the sister endpoint into agreementCancel.json.php:

php
if (!User::isAdmin() && !Subscription::isAgreementFromUser($_REQUEST['agreement'], User::getId())) {
    $obj->msg = "Only the owner can cancel this agreement";
    die(json_encode($obj));
}

Alternative, preferred remediation: delete the duplicate agreementCancel.json.php entirely and point the cancelAgreement() JS helper in subscriptions_list.php:84 at the already-protected PayPalAgreementCancel.json.php endpoint (sending the expected agreement_id POST field). While patching, also remove the redundant second User::isLogged() branch at line 19.

Software afectado

Haz clic en una tecnología para ver todas sus vulnerabilidades.

PlataformaPaqueteVersiones vulnerablesCorregida en
Paquete de Composer wwbn/avideo <= 29.0 sin corrección

Referencias

Puntuación CVSS 4.2/10
Vector CVSS
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:L
Debilidad (CWE)
CWE-639
Plataforma
Composer
Paquete
wwbn/avideo
Publicada
05.05.2026
Actualizado
11.10.2026 10:22

Fuentes y licencias

OSV / GitHub Advisory Database - GHSA-958h-qp3x-q4gj - CC BY 4.0

Historial de vulnerabilidades: wwbn/avideo

Todas las vulnerabilidades publicadas de este paquete (Paquete de Composer), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.

Todas (160) en el archivo
Entradas en total
160
Primera → última
04.2022 06.2026
Sin corrección
143
Explotada en ataques
0

Distribución por gravedad

  • Crítica 14
  • Alta 61
  • Media 83
  • Baja 2

Divulgaciones por año

  1. 2022: 2
  2. 2023: 5
  3. 2024: 5
  4. 2025: 0
  5. 2026: 148
Gravedad:
  1. Alta · 8.8 CVE-2026-45578 <= 29.0 sin corrección
  2. AVideo: IDOR in PayPalYPT Plugin Allows Any Authenticated User to Cancel Arbitrary PayPal Subscription Agreements esta entrada
    Media · 4.2 CVE-2026-43883 <= 29.0 sin corrección
  3. Alta · 9.8 CVE-2026-41304 <= 29.0 sin corrección
  4. Alta · 9.3 CVE-2026-41064 <= 29.0 sin corrección
Mostrar más (20) Mostrando 20 de 76

Identifica las vulnerabilidades de tu aplicación

Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.

Conectar tu aplicación
Newsletter DockRay

La seguridad de tus aplicaciones en tu correo

Vulnerabilidades importantes, recomendaciones concretas y consejos prácticos para tus aplicaciones. Elige tus tecnologías y sigue lo que importa para tu proyecto.

  • Un resumen diario de nuevas vulnerabilidades, también las críticas.
  • Avisos sobre actualizaciones importantes.
  • Consejos prácticos sobre seguridad y monitorización de aplicaciones.

Déjalo vacío para recibir avisos de todas las tecnologías.

Suscripción gratuita. Date de baja con un clic en cualquier correo.