Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2026-33767

AVideo has SQL Injection via Partial Prepared Statement — videos_id Concatenated Directly into Query
Back to all
CVE

CVE-2026-33767

AVideo has SQL Injection via Partial Prepared Statement — videos_id Concatenated Directly into Query

Summary

In objects/like.php, the getLike() method constructs a SQL query using a prepared statement placeholder (?) for users_id but directly concatenates $this->videos_id into the query string without parameterization. An attacker who can control the videos_id value (via a crafted request) can inject arbitrary SQL, bypassing the partial prepared-statement protection.

Details

File: objects/like.php

Vulnerable code:

$sql = "SELECT * FROM likes WHERE users_id = ? AND videos_id = ".$this->videos_id." LIMIT 1;";
$res = sqlDAL::readSql($sql, "i", [$this->users_id]);

The query mixes a parameterized placeholder for users_id with raw string concatenation for videos_id. The $this->videos_id value originates from user-supplied request input (typically a POST/GET parameter identifying the video being liked/disliked) and is not cast to integer or validated before being embedded in the SQL string.

All other queries in the same file correctly use ? placeholders for both columns:

// Correct pattern used elsewhere:
$sql = "SELECT count(*) as total FROM likes WHERE videos_id = ? AND like = 1";

The inconsistency means any attacker who can submit a like/dislike action with a crafted videos_id can inject SQL. Since like/dislike actions are typically available to any authenticated user, the attack surface is broad.

PoC

An attacker sends a like request with an injected videos_id:

POST /objects/likeAjax.json.php
videos_id=1 UNION SELECT user,password,3,4,5,6,7,8 FROM users-- -

This causes the backend to execute:

SELECT * FROM likes WHERE users_id = 1 AND videos_id = 1 UNION SELECT user,password,3,4,5,6,7,8 FROM users-- - LIMIT 1;

Result: full database read — user credentials, emails, private content, and any other data accessible to the MySQL user.

Impact

  • Severity: High
  • Authentication required: Yes (must be logged in to like a video), but all registered users qualify
  • Impact: Full database read via UNION-based injection; potential for data modification or deletion depending on DB user privileges
  • Fix: Replace the concatenation with a second ? placeholder and pass $this->videos_id as a bound integer parameter

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
7.1
-
4.0
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
C
H
U
0
-
C
H
U
-

Related Resources

No items found.

References

https://github.com/WWBN/AVideo/security/advisories/GHSA-fj74-qxj7-r3vc, https://nvd.nist.gov/vuln/detail/CVE-2026-33767, https://github.com/WWBN/AVideo/commit/0215d3c4f1ee748b8880254967b51784b8ac4080, https://github.com/WWBN/AVideo

Severity

8.8

CVSS Score
0
10

Basic Information

Ecosystem
Base CVSS
8.8
EPSS Probability
0.00025%
EPSS Percentile
0.07633%
Introduced Version
0
Fix Available
26.0

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading