Skip to content
SQL injection Advisory Intermediate CVE-2019-5150

YouPHPTube /objects/video.php getVideo search code execution vulnerability

The getVideo function in YouPHPTube builds an SQL query by inserting the search phrase directly into the string when the VideoTags plugin is enabled, so an unauthenticated attacker can inject SQL. Because a column from that query is later used to choose which PHP file is included, the injection can also be used to include local files and potentially run code.

Claudio Bozzato Follow

Originally disclosed on Cisco Talos

High 8.9 View original

An exploitable SQL injection vulnerability exist in YouPHPTube 7.7. When the “VideoTags” plugin is enabled, 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…

Claudio Bozzato, on Cisco Talos

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

Likely the search phrase is concatenated into the SQL string without parameterisation, and a value returned by that query is then used unsanitised as a file path in a require statement.

Impact

An unauthenticated attacker could read or disrupt the database and include local files, which could potentially lead to code execution; the proof of concept only shows a failed include and a delayed response.

What the attacker needed

VideoTags plugin enabled; no authentication needed

The fix

The vendor patched the issue according to the timeline.

How it was found

  1. Send an unauthenticated request to the site's index page with a crafted search parameter.
  2. The search value is placed into the SQL query because the VideoTags plugin is enabled.
  3. The injected query returns a chosen value in the type column.
  4. The page includes a PHP file whose name is built from that value, showing the 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.

The site takes text from a search box and pastes it straight into a database command instead of treating it as plain text. That lets an attacker add their own database instructions, and here the result of the query also decides which file the page loads, so the attacker can point it at files on the server.

What is SQL injection?

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.

More by Claudio Bozzato

View all

185 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

SQL injection

The lesson behind this report.

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.