/

CVE-2026-30282

Severity:

CRITICAL RISK

(9.0)

Arbitrary File Overwrite in Cast to TV Screen Mirroring

CVE-2026-30282

Modified

Vulnerability type

Category:

Arbitrary File Overwrite

CWE:

CWE-22, CWE-73

Impact:

Arbitrary Code Execution and Information Exposure

Severity:

CRITICAL RISK

(9.0)

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

UXGROUP LLC Cast to TV Screen Mirroring v2.2.77 contains an arbitrary file overwrite vulnerability in its file import functionality, allowing attacker-controlled data to be written to internal application paths.

When abused, this flaw can enable arbitrary code execution or exposure of sensitive information if an attacker can influence or trigger the import process with crafted file metadata or paths.

Affected context

The vulnerability occurs in the file import process of the Cast to TV Screen Mirroring application, where imported files or their associated metadata are written to the local filesystem.

The issue is present when the application trusts file paths or names derived from user-controlled input (for example, from downloaded or shared media) and uses them to determine where to store or update internal files without adequate normalization or access control checks.

Risk increases in environments where the app runs with broad filesystem permissions or where sensitive configuration, executable, or cache files are stored in predictable locations reachable by the import logic.

Exploit preconditions

  • Attack surface: The file import feature of the Cast to TV Screen Mirroring application.
  • Required access: Ability to supply or influence files processed by the import mechanism (e.g., via local user interaction, shared content, or other app-to-app channels).
  • Trigger point: Initiating or causing the application to process a crafted file whose path, name, or metadata is interpreted in a way that targets internal application directories or critical files.
  • Why exploitation is possible: The application fails to properly restrict or sanitize filesystem paths used during import, allowing user-controlled values to traverse or point into sensitive directories and overwrite existing files.

Why this happens

This vulnerability stems from insufficient validation of filesystem paths used when saving imported content.

The application appears to construct destination paths using user-influenced values (such as filenames or relative paths) and passes them directly to file write operations without enforcing a confinement to a safe directory or checking for path traversal sequences.

This aligns with CWE-73: External Control of File Name or Path and CWE-22: Path Traversal, where untrusted data controls the file system location of read/write operations, enabling overwriting of internal resources or configuration data.

Potential impact

  • Overwriting internal configuration or preference files that may alter application behavior.
  • Replacing or modifying scripts, libraries, or executable components used by the app, which can lead to arbitrary code execution.
  • Corrupting or exposing sensitive user data stored by the application.
  • Disrupting application functionality or causing persistent crashes by corrupting critical internal files.
  • Establishing persistence or further compromise on the device if overwritten files are executed in privileged contexts.

General mitigation guidance

Effective mitigation focuses on constraining how file paths are derived and where imported content can be stored:

  • Enforce strict directory whitelisting so that all imported files are written only within a dedicated, application-controlled storage area.
  • Normalize and canonicalize all paths (resolving ".." and symbolic links) before use, and reject any path that resolves outside the allowed directory boundary.
  • Treat filenames and paths as untrusted input: strip dangerous characters, enforce simple patterns (e.g., alphanumeric with limited separators), and ignore embedded directory separators in user-controlled values.
  • Use generated, application-assigned filenames instead of trusting user-provided names or paths when writing to disk.
  • Apply least-privilege principles to the app's storage permissions so it cannot arbitrarily modify system-level or cross-application files.

How teams detect issues like this

Organizations and developers can detect this class of issue using a combination of review and automation:

  • Static analysis: Flag file operations where the path is derived from external input (e.g., Intent extras, network responses, or user-supplied filenames) without normalization and directory checks.
  • Code review: Look for uses of APIs that open or write files based on concatenated strings, user input, or deserialized metadata, especially when writing into shared or system directories.
  • Runtime testing: Perform security tests that attempt path traversal via filenames (e.g., "../", absolute paths, or reserved locations) during file import and verify where data is actually written.
  • Policy enforcement: Introduce CI/CD checks that enforce safe file handling patterns, such as mandatory path canonicalization helpers and repository-wide guidelines for filesystem access.

Sources

SourceLink
appcraze.coappcraze.co/
github.comgithub.com/Secsys-FDU/AF_CVEs/issues/27
secsys.fudan.edu.cnsecsys.fudan.edu.cn/

Frequently asked

questions

It can be, depending on how the import feature is exposed. If an attacker can cause the app to import attacker-controlled content via network delivery, shared links, or inter-app communication, exploitation may be possible without direct physical access.

The attacker needs the ability to supply or influence files or metadata that the application processes through its import mechanism. This might involve tricking a user into opening a crafted file within the app or abusing another component that passes data into the import workflow.

The safest pattern is to completely decouple stored file paths from user-controlled values by using application-generated filenames and a fixed, whitelisted storage directory, combined with strict path canonicalization and validation before any file write.

Establish a standard file-handling abstraction that enforces directory whitelisting and path normalization, require all developers to use that abstraction instead of raw filesystem APIs, and include targeted security reviews and automated checks for any code that reads or writes files based on external input.

Find out what's already
exploitable in your codebase.