/

CVE-2026-34374

Severity:

CRITICAL RISK

(9.1)

SQL Injection in WWBN AVideo RTMP Stream Key Authentication

CVE-2026-34374

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Authentication Bypass and Database Compromise via SQL Injection

Severity:

CRITICAL RISK

(9.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

WWBN AVideo contains a SQL injection vulnerability in the Live_schedule::keyExists() method, where a stream key is interpolated directly into a SQL query without parameterization.

When the primary, safely-parameterized lookup in LiveTransmition::keyExists() fails to find a match, the code falls back to this unsafe method, allowing an attacker who controls the stream key value to inject arbitrary SQL during RTMP publish authentication.

Affected context

The vulnerability occurs in WWBN AVideo deployments (up to and including version 26.0) that use RTMP publishing and rely on stream key lookups to authenticate live streams.

Specifically, it affects the fallback code path where LiveTransmition::keyExists() delegates to Live_schedule::keyExists() after a parameterized query returns no results.

In this path, the user-controlled stream key is embedded directly into the SQL query string, exposing the authentication flow and the underlying database to injection risk.

Exploit preconditions

  • Attack surface: RTMP publish authentication or any code path that performs stream key existence checks via Live_schedule::keyExists().
  • Required access: Ability to supply or control a stream key value (e.g., attempting to publish a live stream with a crafted key).
  • Trigger point: Invocation of LiveTransmition::keyExists() that falls back to Live_schedule::keyExists() after the initial parameterized query returns no row.
  • Why exploitation is possible: The fallback method constructs the SQL statement by concatenating the stream key directly into the query string instead of using prepared statements or bound parameters, allowing attacker-controlled input to alter the query structure.

Why this happens

The underlying bug is a classic SQL injection pattern where untrusted input is directly embedded into SQL without parameterization.

While LiveTransmition::keyExists() correctly uses prepared statements, its fallback to Live_schedule::keyExists() bypasses these protections by building a raw SQL query with string interpolation of the stream key.

This maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the database interpreter cannot distinguish data from control because user input is not escaped, validated, or bound through safe APIs.

Potential impact

  • Bypass of stream key–based authentication checks for RTMP publish, potentially allowing unauthorized live streams.
  • Extraction of sensitive data from the application database via crafted SQL queries.
  • Modification or deletion of database records, impacting video metadata, user records, or scheduling information.
  • Escalation of privileges within the application if injected queries manipulate authentication or authorization tables.
  • Potential pivot to server-side code execution in environments where SQL-level compromise can be chained with other misconfigurations.

General mitigation guidance

Effective mitigation focuses on eliminating direct string interpolation in SQL across all code paths, including fallbacks and "helper" methods:

  • Consistently use parameterized queries or prepared statements for every database interaction involving user-controlled values, including stream keys and schedule references.
  • Centralize data-access logic so that all lookup methods (like keyExists()) share a single, parameterized implementation rather than mixing safe and unsafe variants.
  • Treat all stream keys and similar identifiers as untrusted input, applying strict type and format validation (e.g., length limits, allowed character sets) before using them in any query.
  • Apply least-privilege principles at the database level so that the application account only has the minimum necessary operations, reducing the blast radius of any injection.
  • Prefer ORM layers or query builder abstractions that default to parameterization, and discourage ad‑hoc raw SQL concatenation in the codebase.

How teams detect issues like this

Detection typically combines code-level review with policy-driven checks:

  • Use static analysis tools configured with rules targeting CWE-89, flagging any SQL construction that concatenates variables into query strings, especially in authentication and authorization code paths.
  • During code review, look for helper functions or fallback methods (such as Live_schedule::keyExists()) that replicate logic but do not preserve the parameterized access patterns of primary implementations.
  • Implement secure coding guidelines that prohibit raw SQL construction with user-controlled values, and enforce these rules via pre-commit hooks or CI checks.
  • Perform focused dynamic testing on RTMP publish and live scheduling endpoints, using fuzzed or intentionally malformed stream keys to identify unexpected database errors or anomalous behavior indicative of injection.

Sources

SourceLink
github.comgithub.com/WWBN/AVideo/security/advisories/GHSA-xgv5-66wp-ch88

Frequently asked

questions

Yes. In typical deployments, it is remotely reachable through the RTMP publish authentication flow or any interface that accepts stream keys and causes LiveTransmition::keyExists() to run and fall back to Live_schedule::keyExists().

An attacker needs the ability to supply a stream key value—often possible to any authenticated or, in some setups, unauthenticated client attempting to publish a live stream. No direct database access is required; the injection occurs via the application's own database interface.

Replace all string-concatenated SQL in Live_schedule::keyExists() (and similar helpers) with parameterized queries, ensuring that every code path, including fallbacks, uses prepared statements and never interpolates the stream key directly into SQL.

Adopt a strict policy that all database access must use parameterized queries or ORM abstractions, ban raw SQL concatenation with user input in coding standards, and enforce these rules with automated static analysis and thorough code review, especially around authentication and authorization logic.

Find out what's already
exploitable in your codebase.