/

CVE-2026-39369

Severity:

HIGH RISK

(7.6)

Path Traversal / Arbitrary File Read in WWBN AVideo GIF

CVE-2026-39369

Analyzed

Vulnerability type

Category:

Path Traversal / Arbitrary File Read

CWE:

CWE-22

Impact:

Arbitrary File Read and Sensitive Data Exposure

Severity:

HIGH RISK

(7.6)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

WWBN AVideo versions 26.0 and earlier contain a path traversal issue in objects/aVideoEncoderReceiveImage.json.php that allows authenticated uploaders to fetch attacker-controlled /videos/... URLs and bypass directory traversal scrubbing.

By abusing the GIF poster storage path, an attacker can coerce the application into reading server-local files such as /etc/passwd or application source code and republishing their contents via a normal public GIF media URL.

Affected context

The vulnerability occurs in WWBN AVideo instances where:

  • The aVideoEncoderReceiveImage.json.php endpoint is exposed and used for handling encoder-uploaded poster images
  • Uploaders are authenticated and allowed to trigger poster generation via /videos/... URLs
  • The GIF-handling branch processes supplied paths and stores results in a web-accessible location

Under these conditions, insufficient path validation on same-origin URLs and GIF poster paths can be leveraged to access local filesystem content that should not normally be exposed.

Exploit preconditions

  • Attack surface: HTTP(S) endpoint objects/aVideoEncoderReceiveImage.json.php within the AVideo web application
  • Required access: Valid authenticated uploader (or equivalent role) with permission to initiate poster/thumbnail processing
  • Trigger point: Supplying crafted /videos/... URLs or path-derived values that reach the GIF poster branch of the handler
  • Why exploitation is possible: The GIF poster processing flow treats attacker-influenced paths as trusted, bypassing or weakening traversal scrubbing and allowing file paths outside the intended directory to be read and then re-served as GIF content

Why this happens

This is a classic CWE-22: Path Traversal issue where user-controllable path segments are not normalized and constrained to an expected directory.

The aVideoEncoderReceiveImage.json.php logic assumes that /videos/... URLs and derived paths are safe and remain within a controlled storage tree.

In the GIF poster branch, these assumptions fail: traversal scrubbing is inadequate or circumvented, and the effective path resolution allows access to locations such as /etc/passwd or application source directories.

Because the resulting GIF is then written to a publicly reachable location and served via a standard media URL, the application unintentionally exposes arbitrary local files as if they were benign image assets.

Potential impact

  • Disclosure of sensitive system files (e.g., /etc/passwd, configuration files)
  • Exposure of application source code and internal logic
  • Leakage of database credentials, API keys, or cryptographic secrets stored in configuration files
  • Facilitation of further attacks such as authentication bypass, privilege escalation, or remote code execution via gained knowledge
  • Increased likelihood of full application or server compromise when combined with other vulnerabilities

General mitigation guidance

Effective mitigation centers on strictly constraining all file paths derived from user input and treating even same-origin URLs as untrusted:

  • Normalize and canonicalize all incoming paths and enforce that final resolved paths remain within a predefined media directory (e.g., via allowlisted root directories).
  • Replace ad-hoc traversal scrubbing (e.g., string replacements of ../) with robust, canonical path checks that reject any path pointing outside allowed directories.
  • Separate URL selection from filesystem access: do not allow user-controlled URLs to directly influence local filesystem paths without an explicit mapping layer.
  • Implement least-privilege filesystem permissions so the application process cannot read sensitive system or configuration files even if path checks fail.
  • Use distinct, non-overlapping directories for user-generated media and application/runtime data to limit blast radius.

Applying these patterns across all media-handling and encoder-related endpoints reduces the chance of similar file exposure issues in the future.

How teams detect issues like this

Organizations can detect and monitor for this class of vulnerability through:

  • Static analysis: Create rules to flag any use of filesystem APIs (e.g., file_get_contents, fopen, image processing calls) where arguments are derived from HTTP parameters or encoder payloads without canonical path enforcement.
  • Code review: During manual review, pay special attention to:
  • Any handler that reads or writes within /videos, upload, or temporary directories
  • Conditional branches (like GIF-specific logic) that perform additional filesystem operations
  • Custom traversal scrubbing logic and string-based path manipulation
  • Security testing: Use automated and manual tests that attempt ../ sequences and absolute paths against media-handling endpoints to validate that access is correctly denied.
  • Runtime monitoring: Monitor access logs for unusual GIF or media URLs referencing unexpected file sizes, patterns, or high-entropy responses that might indicate non-image content being served.

Automated scanning tools that model data flow from request parameters to filesystem APIs can be integrated into CI/CD pipelines to catch similar issues earlier.

Sources

SourceLink
github.comgithub.com/WWBN/AVideo/commit/2375eb5e0a6d3cbcfb05377657d0820a7d470b1d
github.comgithub.com/WWBN/AVideo/security/advisories/GHSA-f4f9-627c-jh33

Frequently asked

questions

Yes, it is remotely exploitable, but only by users who can authenticate as an uploader (or any role permitted to call the encoder image receive endpoint). Once authenticated, an attacker can craft requests that force the server to read local files and re-serve them as GIFs.

The attacker must have valid credentials with permissions to upload or trigger poster/thumbnail generation through aVideoEncoderReceiveImage.json.php. Anonymous users do not typically have direct access to this endpoint, but weak account management or shared credentials can lower this barrier.

The safest fix is to treat all inbound paths and URLs as untrusted, perform canonicalization on the server side, and enforce that any filesystem access is restricted to an explicit, allowlisted directory tree. Any path that resolves outside the designated media directories should be rejected before reaching file-reading routines, including special-case branches such as GIF handling.

To prevent similar issues:

  • Adopt a framework or central utility for secure path handling that all file-access code must use.
  • Enforce coding guidelines that prohibit raw concatenation of user-controlled data into filesystem paths.
  • Include path traversal checks in automated tests and security scans, and review all media-processing endpoints during security-focused code review.
  • Apply defense-in-depth with OS-level permissions and containerization so that even if path validation fails, the process cannot reach highly sensitive files.
Find out what's already
exploitable in your codebase.