GHSA-HJ5H-5623-GWHW
Vulnerability from github – Published: 2026-03-19 17:25 – Updated: 2026-03-25 18:34Summary
WWBN/AVideo contains an open redirect vulnerability in the login flow where a user-supplied redirectUri parameter is reflected directly into a JavaScript document.location assignment without JavaScript-safe encoding. After a user completes the login popup flow, a timer callback executes the redirect using the unvalidated value, sending the victim to an attacker-controlled site.
Details
In view/userLogin.php, the application accepts a redirectUri GET parameter, passes it through a function called isSafeRedirectURL(), and stores the result in $safeRedirectUri. This value is then embedded into an inline JavaScript block:
var logintimer = setInterval(function() {
if (win.closed) {
clearInterval(logintimer);
document.location = "<?php print $safeRedirectUri; ?>";
}
}, 1000);
The value is printed directly into a JavaScript string literal with no call to json_encode(), htmlspecialchars(), or any JavaScript-context escaping. Even if isSafeRedirectURL() is intended to filter dangerous values, protocol-relative URLs such as //evil.com satisfy many naive URL validation checks because they carry no explicit scheme, yet browsers will resolve them as https://evil.com when embedded in a navigation target. Additional bypass vectors include subdomain confusion of the form https://trusted.com.evil.com and path-prefix matching weaknesses. Because the reflected value lands inside a JavaScript string rather than an HTML attribute, HTML-level encoding would not prevent exploitation either. Once the popup window is closed, the setInterval callback fires every second, and the first time win.closed is truthy the victim's main page is redirected to the attacker's URL.
PoC
https://victim.com/view/userLogin.php?redirectUri=//evil.com
import requests
base = "https://victim.com/view/userLogin.php"
payload = "//evil.com"
r = requests.get(base, params={"redirectUri": payload})
assert payload in r.text, "Payload not reflected"
print("Reflected payload found in response")
Impact
An unauthenticated attacker can craft a login URL and distribute it to victims. After the victim interacts with the login popup and closes it, the main page is silently navigated to an attacker-controlled domain. This enables phishing attacks where the victim is presented with a credential-harvesting page that visually mimics the original site. All users of any AVideo installation are potentially affected because no authentication is required to trigger the redirect. The attack requires only that the victim follow the crafted link and complete or dismiss the popup, making it practical in targeted phishing campaigns.
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "wwbn/avideo"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "25.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-33296"
],
"database_specific": {
"cwe_ids": [
"CWE-601"
],
"github_reviewed": true,
"github_reviewed_at": "2026-03-19T17:25:28Z",
"nvd_published_at": "2026-03-22T17:17:09Z",
"severity": "LOW"
},
"details": "### Summary\n\nWWBN/AVideo contains an open redirect vulnerability in the login flow where a user-supplied redirectUri parameter is reflected directly into a JavaScript `document.location` assignment without JavaScript-safe encoding. After a user completes the login popup flow, a timer callback executes the redirect using the unvalidated value, sending the victim to an attacker-controlled site.\n\n### Details\n\nIn `view/userLogin.php`, the application accepts a redirectUri GET parameter, passes it through a function called `isSafeRedirectURL()`, and stores the result in $safeRedirectUri. This value is then embedded into an inline JavaScript block:\n\n```php\nvar logintimer = setInterval(function() {\n if (win.closed) {\n clearInterval(logintimer);\n document.location = \"\u003c?php print $safeRedirectUri; ?\u003e\";\n }\n}, 1000);\n```\n\nThe value is printed directly into a JavaScript string literal with no call to `json_encode()`, `htmlspecialchars()`, or any JavaScript-context escaping. Even if `isSafeRedirectURL()` is intended to filter dangerous values, protocol-relative URLs such as `//evil.com` satisfy many naive URL validation checks because they carry no explicit scheme, yet browsers will resolve them as `https://evil.com` when embedded in a navigation target. Additional bypass vectors include subdomain confusion of the form `https://trusted.com.evil.com` and path-prefix matching weaknesses. Because the reflected value lands inside a JavaScript string rather than an HTML attribute, HTML-level encoding would not prevent exploitation either. Once the popup window is closed, the setInterval callback fires every second, and the first time `win.closed` is truthy the victim\u0027s main page is redirected to the attacker\u0027s URL.\n\n### PoC\n\n```\nhttps://victim.com/view/userLogin.php?redirectUri=//evil.com\n```\n\n```python\nimport requests\n\nbase = \"https://victim.com/view/userLogin.php\"\npayload = \"//evil.com\"\nr = requests.get(base, params={\"redirectUri\": payload})\nassert payload in r.text, \"Payload not reflected\"\nprint(\"Reflected payload found in response\")\n```\n\n### Impact\n\nAn unauthenticated attacker can craft a login URL and distribute it to victims. After the victim interacts with the login popup and closes it, the main page is silently navigated to an attacker-controlled domain. This enables phishing attacks where the victim is presented with a credential-harvesting page that visually mimics the original site. All users of any AVideo installation are potentially affected because no authentication is required to trigger the redirect. The attack requires only that the victim follow the crafted link and complete or dismiss the popup, making it practical in targeted phishing campaigns.",
"id": "GHSA-hj5h-5623-gwhw",
"modified": "2026-03-25T18:34:36Z",
"published": "2026-03-19T17:25:28Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/WWBN/AVideo/security/advisories/GHSA-hj5h-5623-gwhw"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-33296"
},
{
"type": "WEB",
"url": "https://github.com/WWBN/AVideo/commit/68d0fbb19e382fe62e6cc7bd48b51ffa1d9e310e"
},
{
"type": "PACKAGE",
"url": "https://github.com/WWBN/AVideo"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "AVideo has an Open Redirect via Unvalidated redirectUri in userLogin.php"
}
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.