YouPHPTube /objects/video.php getVideo videoName code execution vulnerability
An unauthenticated SQL injection in YouPHPTube's getVideo function allows an attacker to inject SQL via the videoName parameter, potentially leading to database exfiltration, denial of service, and local file inclusion that could further lead to code execution.
Originally disclosed on Cisco Talos
An exploitable SQL injection vulnerability exist in YouPHPTube 7.7. A specially crafted unauthenticated HTTP request can cause a SQL injection, possibly leading to denial of service, exfiltration of the database and local file inclusion, which could potentially further lead to code execution.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The getVideo function directly concatenates the user-supplied videoName parameter into a SQL query without sanitisation or parameterisation.
Impact
An attacker could exfiltrate the database, cause denial of service, and include local files, potentially leading to code execution.
What the attacker needed
None
The fix
The vulnerability was fixed by the vendor.
How it was found
- Send an unauthenticated HTTP request to /index.php with a crafted videoName parameter containing SQL injection.
- The injected SQL alters the query result, controlling the vType column.
- The view modeYoutube.php uses vType to include a local PHP file, demonstrating local file inclusion.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
SQL injection is when user input is inserted into a database query without proper handling, letting an attacker change the query's meaning. Here, the videoName parameter is placed directly into a SQL query, so an attacker can manipulate the database and even control which file gets included, potentially running code.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.