GHSA-w4qq-74h6-58wq
MEDIUMGHSA-w4qq-74h6-58wq is a medium-severity (CVSS 5.3) Path Traversal vulnerability in WWBN/AVideo. O3 Security confirms whether GHSA-w4qq-74h6-58wq is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.
AVideo: Unauthenticated Arbitrary Image Read via Path Traversal in `view/img/image404Raw.php`
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
Exploitation and automatability from CISA’s SSVC triage for GHSA-w4qq-74h6-58wq.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
GHSA-w4qq-74h6-58wq plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.
Where this sits among everything scored
Of 360,399 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
Real-World Exposure
WWBN/AVideoReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
Summary
The endpoint requires no authentication. An unauthenticated remote attacker can read arbitrary image files anywhere on disk that the PHP user can open — including private user-profile photos that the application's normal serving wrappers gate behind ACLs, admin-uploaded thumbnails, encrypted-video poster frames, and image content under sibling-app directories reachable via .. traversal.
Details
view/img/image404Raw.php reads the image GET parameter and joins it directly into a filesystem path served via readfile(). view/img/image404Raw.php (full file, current master @ 0dbadbcaaa1b415c7db078a72dc4b26d9fac0485):
<?php
// Fetch requested image URL
$imageURL = !empty($_GET['image']) ? $_GET['image'] : $_SERVER["REQUEST_URI"];
$rootDir = dirname(__FILE__) . '/../../';
if ($imageURL == 'favicon.ico') {
$imgLocalFile = "{$rootDir}/videos/{$imageURL}";
} else {
$imgLocalFile = "{$rootDir}/{$imageURL}"; // ← attacker-controlled
}
if (file_exists($imgLocalFile)) {
$imageInfo = getimagesize($imgLocalFile); // ← format gate
if (empty($imageInfo)) {
die('not image');
}
// …extension → Content-Type mapping…
header("HTTP/1.0 200 OK");
header('Content-Type: ' . $type);
header('Content-Length: ' . filesize($imgLocalFile));
readfile($imgLocalFile); // ← exfil bytes
exit;
}
Issues:
- No authentication. The file is reachable via direct GET; no
requireofglobals.php, no session check, no API-key gate. - No basename / realpath / prefix containment.
$_GET['image']is concatenated into$imgLocalFilewith no..filtering, norealpath()resolution, no allowlist check against the intendedview/img/directory. getimagesize()is a magic-bytes check, not a path constraint. Any file on disk whose first bytes match a recognized image format (FFD8FFJPEG,89504E47PNG,474946GIF,52494646…57454250WebP) passes the gate — including images stored outside any ACL'd area of the application.$_SERVER["REQUEST_URI"]fallback whenimageis empty widens the attack surface (path components in the URI itself land in$imgLocalFile).
Re-verified pre-submission on 2026-05-13 against view/img/image404Raw.php blob SHA c670b0faff4fbea1fd0508f179956975477d4340 — unsafe shape unchanged since first discovery on 2026-05-12.
Recommended fix — three layered checks, any one alone is insufficient:
// view/img/image404Raw.php — proposed fix
<?php
$imageURL = !empty($_GET['image']) ? $_GET['image'] : '';
if ($imageURL === '') {
http_response_code(400);
exit('bad request');
}
// 1. Reject any path-traversal segment outright.
if (strpos($imageURL, '..') !== false
|| strpos($imageURL, "\0") !== false
|| strpos($imageURL, '://') !== false) {
http_response_code(400);
exit('bad request');
}
// 2. Resolve to a real path and verify prefix containment under the
// intended image directory.
$rootDir = realpath(dirname(__FILE__) . '/../../');
$imgLocalFile = realpath($rootDir . '/' . $imageURL);
if ($imgLocalFile === false
|| (strpos($imgLocalFile, $rootDir . '/videos/') !== 0
&& strpos($imgLocalFile, $rootDir . '/view/img/') !== 0)) {
http_response_code(404);
exit('not found');
}
// 3. Existing getimagesize() check stays as defense-in-depth.
if (!is_file($imgLocalFile)) {
http_response_code(404);
exit('not found');
}
$imageInfo = @getimagesize($imgLocalFile);
if (empty($imageInfo)) {
http_response_code(404);
exit('not image');
}
// …rest of the original Content-Type + readfile() flow unchanged…
Drop the $_SERVER["REQUEST_URI"] fallback entirely; if no image
parameter is provided, return 400.
PoC
Discovery probe — any HTTP client, no authentication, no cookies:
GET /view/img/image404Raw.php?image=../videos/userPhoto/photo1.jpg HTTP/1.1
Host: avideo.example.com
If videos/userPhoto/photo1.jpg exists on the server, the response is the raw image bytes (HTTP 200, Content-Type: image/jpeg). The application's normal user-photo serving wrapper (which can gate by session / channel ownership) is bypassed entirely.
Cross-directory probe — read images outside the AVideo install root:
GET /view/img/image404Raw.php?image=../../../var/www/other-app/uploads/users/admin.jpg HTTP/1.1
Host: avideo.example.com
If the PHP user has read access to a sibling app's image directory, those files are exfiltrable too.
Enumeration — iterate over predictable numeric IDs:
GET /view/img/image404Raw.php?image=../videos/userPhoto/photo1.jpg
GET /view/img/image404Raw.php?image=../videos/userPhoto/photo2.jpg
GET /view/img/image404Raw.php?image=../videos/userPhoto/photo3.jpg
...
…to harvest all profile images regardless of the application's intended privacy controls.
Impact
Path traversal → arbitrary image read (CWE-22 + CWE-284). Affects any AVideo deployment running master through commit 0dbadbca and likely every release on the supported branches. The attacker:
- Bypasses the application's image-content ACLs. Profile photos under
videos/userPhoto/and admin-uploaded private thumbnails that AVideo's normal image-serving wrappers gate by session / channel ownership become readable to any anonymous internet user. - Reads images stored outside the AVideo install root. On shared-hosting / multi-tenant deployments,
..traversal lets the attacker page into sibling-app upload directories — anywhere the PHP user has read access on disk and the target file's first bytes form a valid image header. - Enables enumeration at scale. Numeric ID schemes (
photo1.jpg,photo2.jpg, …) and predictable filenames let an attacker harvest every private image on a deployment without detection (each request looks like a single 200-image-OK to the web log).
Because the read primitive is restricted to image-magic-bytes files, there is no source-code or credential exfiltration via this primitive alone — but the privacy / GDPR exposure is substantial on any deployment that hosts user-uploaded photos. CVSS 5.3 (Medium) reflects the limited but real confidentiality impact; many operators will rate this higher because the leaked content is user-private by intent.
This is not a silent-fix disclosure — the bug is still present on current master at submission time; the maintainer is being
notified of a previously-unknown issue.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | WWBN/AVideo | all versions | No fix |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for WWBN/AVideo. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Remediation status
No patched version of WWBN/AVideo has shipped for GHSA-w4qq-74h6-58wq yet. Where your build allows, override or pin the dependency away from the vulnerable range, and apply any maintainer-recommended mitigation.
Mitigate without a patch
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-w4qq-74h6-58wq is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-w4qq-74h6-58wq. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-w4qq-74h6-58wq in your dependencies?
O3 detects GHSA-w4qq-74h6-58wq across Packagist dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.