CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-34368

CVE-2026-34368: TOCTOU Race Condition in WWBN AVideo YPTWallet Plugin

Alon Barad
Alon Barad
Software Engineer

Mar 30, 2026·6 min read·63 visits

Executive Summary (TL;DR)

A race condition in the WWBN AVideo YPTWallet plugin allows authenticated attackers to double-spend funds by submitting concurrent transfer requests. The lack of database-level locking during the read-check-write cycle enables the exploitation.

WWBN AVideo versions up to and including 26.0 suffer from a Time-of-Check-Time-of-Use (TOCTOU) race condition in the YPTWallet plugin's transfer logic. This vulnerability allows authenticated users to bypass balance checks via concurrent requests, enabling unauthorized financial transfers. The flaw is compounded by a secondary vulnerability that permits captcha token reuse.

Vulnerability Overview

WWBN AVideo is an open-source video platform that supports community interaction and content monetization. The application includes a YPTWallet plugin, which provides an internal wallet system for users to hold balances and transfer funds to other accounts. This component exposes an attack surface where authenticated users interact with financial state data.

CVE-2026-34368 identifies a Time-of-Check-Time-of-Use (TOCTOU) race condition within this wallet transfer functionality. The vulnerability resides in the transferBalance() method of the YPTWallet.php file. Due to improper synchronization, the application processes financial transactions in a non-atomic manner.

This flaw is formally classified as CWE-362 (Concurrent Execution using Shared Resource with Improper Synchronization). The vulnerability affects all AVideo installations running version 26.0 and earlier. Successful exploitation allows an authenticated user to bypass balance constraints and perform unauthorized fund transfers, directly impacting the integrity of the application's financial ledger.

Root Cause Analysis

The fundamental issue stems from a lack of database-level concurrency controls during the balance transfer process. The transferBalance() method executes a three-step sequence: read the current balance, verify the balance is sufficient for the requested transfer, and write the updated balance to the database. These operations occur entirely within the application layer without transactional isolation.

Because the application uses a standard SELECT query to retrieve the user's balance, no row-level locks are applied to the corresponding database record. When multiple concurrent requests initiate a transfer for the same account, they independently execute the read operation before any write operation concludes. This results in each request reading the identical initial balance state.

The application then performs the mathematical check to ensure the balance exceeds the transfer amount in PHP memory. Since all concurrent threads read the same initial balance, all threads pass the validation check. The application subsequently writes the new balance to the database using separate UPDATE statements, effectively processing multiple transfers while only deducting the funds corresponding to a single sequential operation.

A secondary vulnerability in objects/captcha.php exacerbates the primary race condition. The validation() method successfully validates a user-provided captcha but fails to destroy the session token ($_SESSION['palavra']) afterward. This oversight permits an attacker to solve a single captcha and reuse the established session state to authorize an arbitrary number of concurrent transfer requests.

Code Analysis

The vulnerable implementation in plugin/YPTWallet/YPTWallet.php relies on distinct, non-isolated queries. The application reads the balance using a standard SELECT statement and later issues an UPDATE. No transaction boundary exists to group these operations, and no database locks prevent concurrent access to the targeted rows.

The patch introduced in commit 34132ad5159784bfc7ba0d7634bb5c79b769202d resolves this by enforcing strict database serialization. The developers introduced a new method, Wallet::getFromUserForUpdate(), which leverages the SQL SELECT ... FOR UPDATE syntax. This places an exclusive lock on the row, forcing concurrent queries to queue until the active transaction resolves.

// Patched logic implementing row-level locking
mysqlBeginTransaction();
$wallet = Wallet::getFromUserForUpdate($users_id);
if ($wallet->getBalance() < $amount) {
    mysqlRollback();
    return false;
}
// Proceed with update and commit...

Additionally, the patch addresses the token reuse vulnerability within objects/captcha.php. By explicitly unsetting the session variable upon successful validation, the application ensures that each captcha token is strictly single-use. The frontend view plugin/YPTWallet/view/transferFunds.php was also updated to force a captcha refresh after every submission attempt.

// Captcha validation fix
if (strcasecmp($_SESSION['palavra'], $captcha) == 0) {
    unset($_SESSION['palavra']); // Ensures single-use
    return true;
}

Exploitation Mechanics

Exploiting this TOCTOU race condition requires an attacker to synchronize multiple HTTP requests precisely. The attacker must first authenticate to the AVideo application and obtain a valid session cookie. They must then navigate to the transfer interface and solve the mandatory captcha, capturing the valid request payload.

To bypass PHP's default file-based session locking, which typically serializes requests from the same session ID, the attacker must establish multiple independent authenticated sessions. The failure to invalidate the captcha token allows the attacker to broadcast the exact same HTTP POST payload across all concurrent connections simultaneously.

Upon receiving the concurrent requests, the web server allocates separate worker threads. If the requests arrive within the same time window, multiple threads execute the SELECT query before any thread issues an UPDATE. The attacker successfully transfers multiples of their total balance to the designated recipient account, effectively synthesizing unauthorized funds.

Impact Assessment

The security impact of CVE-2026-34368 is strictly isolated to the integrity of the application's internal financial ledger. An attacker can arbitrarily inflate the balance of controlled recipient accounts without possessing the requisite sender funds. This constitutes a direct violation of the platform's business logic and financial trust model.

The CVSS v3.1 base score is calculated as 5.3 (Medium), reflecting the localized impact. The attack requires low privileges (an authenticated standard user) and no user interaction. However, the attack complexity is rated High because successful exploitation depends on precise network timing and the successful manipulation of concurrent HTTP state.

The vulnerability does not compromise the confidentiality or availability of the host system. The attacker cannot achieve remote code execution, access arbitrary database records, or disrupt platform services. The damage is confined to the specific trust boundaries of the YPTWallet plugin and the accuracy of user account balances.

Remediation and Mitigation

System administrators must update WWBN AVideo installations to a version strictly greater than 26.0, or ensure that commit 34132ad5159784bfc7ba0d7634bb5c79b769202d is applied to their codebase. This patch introduces the necessary mysqlBeginTransaction() and SELECT ... FOR UPDATE mechanisms required to enforce atomic operations.

For organizations unable to deploy the update immediately, mitigating the risk requires disabling the YPTWallet plugin entirely. Since the vulnerability is inherent to the core transfer logic, no configuration changes or Web Application Firewall (WAF) rules can effectively prevent the race condition without breaking the underlying functionality.

Developers implementing similar financial transaction systems must ensure that all read-check-write sequences are encapsulated within database transactions. Utilizing row-level locking or optimistic concurrency control is mandatory to prevent TOCTOU vulnerabilities in concurrent environments. All authorization tokens, including captchas, must be aggressively invalidated immediately after their first successful use.

Fix Analysis (1)

Technical Appendix

CVSS Score
5.3/ 10
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N
EPSS Probability
0.03%
Top 93% most exploited

Affected Systems

WWBN AVideo installations running version 26.0 or earlier with the YPTWallet plugin enabled.

Affected Versions Detail

Product
Affected Versions
Fixed Version
AVideo
WWBN
<= 26.0> 26.0
AttributeDetail
CWE IDCWE-362
Attack VectorNetwork
CVSS Score5.3 (Medium)
EPSS Score0.00026
ImpactIntegrity Violation (Double-Spending)
Exploit StatusProof of Concept
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1068Exploitation for Privilege Escalation
Privilege Escalation
CWE-362
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another concurrent code sequence that is operating improperly.

Vulnerability Timeline

Vulnerability published and fix commit pushed
2026-03-27
GitHub Advisory GHSA-h54m-c522-h6qr released
2026-03-27
CVE-2026-34368 assigned and published
2026-03-27
Vulnerability data analyzed by NVD
2026-03-30

References & Sources

  • [1]GitHub Security Advisory (GHSA-h54m-c522-h6qr)
  • [2]Fix Commit (34132ad5)
  • [3]Raw Patch Content
  • [4]NVD Record

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 3 hours ago•CVE-2026-58254
6.5

CVE-2026-58254: Authorization Bypass in NATS Server Message Tracing for Leaf Node Connections

NATS Server prior to versions 2.12.8 and 2.14.3 contains an incorrect authorization vulnerability (CWE-863) in its message tracing subsystem. When evaluating whether a connection is permitted to publish trace events to a destination subject specified in the Nats-Trace-Dest header, the server only checks standard client permissions and omits permission checks for leaf node connections. This allows a connected leaf node operator with restricted publishing privileges to emit internal trace events to unauthorized subjects and suppress standard message delivery using the Nats-Trace-Only header.

Alon Barad
Alon Barad
3 views•10 min read
•about 4 hours ago•CVE-2026-63341
7.5

CVE-2026-63341: Unauthenticated Denial of Service via Unbounded Topic Depth in Aedes MQTT Broker

CVE-2026-63341 is a high-severity Denial of Service (DoS) vulnerability in the Aedes MQTT broker for Node.js affecting all versions prior to 1.1.1. The flaw stems from missing input validation on the hierarchical depth of incoming MQTT topic strings before they are passed to the underlying topic-matching engine, qlobber. Because qlobber enforces a hardcoded limit of 100 topic levels and throws a synchronous exception when this threshold is exceeded, an attacker can send a single MQTT packet containing 101 or more forward-slash-separated levels to trigger an uncaught exception that immediately terminates the Node.js broker process.

Alon Barad
Alon Barad
3 views•12 min read
•about 5 hours ago•CVE-2026-61725
6.1

CVE-2026-61725: Path Traversal and Arbitrary File Overwrite in sevenz-rust2

CVE-2026-61725 is a path traversal vulnerability (CWE-22) in the sevenz-rust2 Cargo package prior to version 0.21.1. The vulnerability occurs because the decompression utility fails to validate or sanitize archive entry filenames before joining them with the destination directory path via std::path::Path::join. An attacker who supplies a crafted 7z archive containing parent directory traversal sequences or absolute paths can write or overwrite arbitrary files on the host filesystem with the privileges of the extracting process.

Alon Barad
Alon Barad
4 views•12 min read
•about 6 hours ago•CVE-2026-77309
8.8

CVE-2026-77309: Unauthenticated Remote Code Execution in NASA-AMMOS AIT-GUI via Incomplete File Cleanup and Path Traversal

CVE-2026-77309 (GHSA-jrjx-9jjw-747m) is a high-severity unauthenticated remote code execution vulnerability affecting NASA-AMMOS AIT-GUI versions 1.0.0 through 2.5.0. The flaw results from chaining an incomplete file cleanup error in the telemetry query endpoint (/tlm/query) with a directory traversal flaw in the script execution endpoint (/script/run). An attacker on an adjacent network can stage arbitrary Python statements into a static file on disk and execute that file under the privileges of the AIT-GUI web server process.

Amit Schendel
Amit Schendel
4 views•10 min read
•about 7 hours ago•CVE-2026-77332
2.3

CVE-2026-77332: Surfaced-Memory Envelope Injection and Stored Prompt Injection in memtomem-stm

A vulnerability classified under CWE-116 (Improper Encoding or Escaping of Output) exists in memtomem-stm versions 0.1.0 through 0.1.33. The software acts as a Model Context Protocol (MCP) short-term memory proxy gateway for AI agent architectures. When surfacing retrieved memories and scratchpad items into downstream Large Language Model (LLM) context envelopes, the SurfacingFormatter component fails to properly sanitize untrusted memory attributes. An attacker with the ability to plant untrusted content into the agent's long-term or working memory store can inject arbitrary structural delimiters, close the <surfaced-memories> XML boundary prematurely, visually obscure instructions using Unicode bidirectional overrides, and execute stored prompt injection attacks against downstream LLM agents.

Alon Barad
Alon Barad
7 views•10 min read
•about 8 hours ago•CVE-2026-77331
2.0

CVE-2026-77331: Race Condition and Session State Corruption in memtomem-stm

CVE-2026-77331 (GHSA-72jh-722p-rqr3) is a concurrency and session-state synchronization vulnerability in memtomem-stm, a short-term memory proxy gateway for AI agents. In versions 0.1.2 prior to 0.1.34, concurrent Model Context Protocol (MCP) Remote Procedure Call (RPC) failures or mid-flight task cancellations can initiate duplicate reconnect loops and permit dirty or cancelled transport sessions to be reused. This deficiency results in session-state integrity loss and local service degradation.

Amit Schendel
Amit Schendel
5 views•9 min read