AVideo: Arbitrary Stripe Subscription Cancellation via Debug Endpoint and retrieveSubscriptions() Bug
Summary
The StripeYPT plugin includes a test.php debug endpoint that is accessible to any logged-in user, not just administrators. This endpoint processes Stripe webhook-style payloads and triggers subscription operations, including cancellation. Due to a bug in the retrieveSubscriptions() method that cancels subscriptions instead of merely retrieving them, any authenticated user can cancel arbitrary Stripe subscriptions by providing a subscription ID.
Details
At plugin/StripeYPT/test.php:4, the endpoint checks only for a logged-in user, not for admin privileges:
if (!User::isLogged())
At lines 27-29, the endpoint accepts a JSON payload from the request and processes it through the Stripe metadata handler:
$obj = StripeYPT::getMetadataOrFromSubscription(json_decode($_REQUEST['payload']));
The call chain proceeds as follows:
test.phpcallsgetMetadataOrFromSubscription()- Which calls
getSubscriptionId()to extract the subscription ID - Which calls
retrieveSubscriptions()to interact with the Stripe API
At StripeYPT.php:933, the retrieveSubscriptions() method contains a critical bug where it cancels the subscription instead of just retrieving it:
$response = $sub->cancel();
This same bug also affects the production webhook processing path via processSubscriptionIPN(), meaning both the debug endpoint and the live webhook handler can trigger unintended cancellations.
Proof of Concept
-
Log in as any regular (non-admin) user and obtain a session cookie.
-
Send a crafted payload to the test endpoint with a target subscription ID:
curl -b "PHPSESSID=USER_SESSION" \
"https://your-avideo-instance.com/plugin/StripeYPT/test.php" \
-d 'payload={"data":{"object":{"id":"sub_TARGET_SUBSCRIPTION_ID","customer":"cus_CUSTOMER_ID"}}}'
-
The endpoint processes the payload, calls
retrieveSubscriptions(), and the subscription is cancelled via the Stripe API. -
To enumerate subscription IDs, check if the application exposes them through other endpoints or use predictable patterns:
# Check user subscription details if accessible
curl -b "PHPSESSID=USER_SESSION" \
"https://your-avideo-instance.com/plugin/StripeYPT/listSubscriptions.php"
- The Stripe subscription is now cancelled. The affected user loses access to their paid features.
Impact
Any logged-in user can cancel arbitrary Stripe subscriptions belonging to other users. This causes direct financial damage to the platform operator (lost subscription revenue) and service disruption for paying subscribers who lose access to premium features. The debug endpoint should have been removed from production or restricted to admin-only access, and the retrieveSubscriptions() method should retrieve rather than cancel subscriptions.
- CWE-862: Missing Authorization
- Severity: Medium
Recommended Fix
Two changes are needed:
1. Restrict the debug endpoint to admins at plugin/StripeYPT/test.php:4:
// plugin/StripeYPT/test.php:4
if (!User::isAdmin())
Change User::isLogged() to User::isAdmin() so only administrators can access the debug endpoint.
2. Fix the retrieval bug at StripeYPT.php:933:
Remove the $sub->cancel() call from retrieveSubscriptions() so that the function only retrieves subscription data without cancelling it:
// StripeYPT.php:933 - remove the following line:
// $response = $sub->cancel();
The retrieveSubscriptions() method should retrieve subscription information, not cancel subscriptions as a side effect.
Found by aisafe.io
Czego dotyczy
Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.
| Platforma | Paczka | Podatne wersje | Poprawka w wersji |
|---|---|---|---|
| Paczka Composer | wwbn/avideo | <= 26.0 | brak poprawki |
Odnośniki
- Wektor CVSS
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N- Słabość (CWE)
CWE-862- Platforma
- Composer
- Paczka
wwbn/avideo- Ujawniono
- 01.04.2026
- Aktualizacja
- 11.10.2026 10:22
Źródła i licencje
OSV / GitHub Advisory Database - GHSA-38rh-4v39-vfxv - CC BY 4.0
Historia podatności: wwbn/avideo
Wszystkie opisane podatności tej paczki (Paczka Composer), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.
- Wszystkich wpisów
- 160
- Pierwsza → ostatnia
- 04.2022 06.2026
- Bez poprawki
- 143
- Wykorzystywana w atakach
- 0
Rozkład istotności
- Krytyczna 14
- Wysoka 61
- Średnia 83
- Niska 2
Ujawnienia w latach
- 2022: 2
- 2023: 5
- 2024: 5
- 2025: 0
- 2026: 148
-
AVideo: Arbitrary Stripe Subscription Cancellation via Debug Endpoint and retrieveSubscriptions() Bug ten wpis
Dowiedz się, które podatności dotyczą Twojej aplikacji
Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.