Unauthenticated filesystem path injection in the immich-app Immich machine-learning service

Note: This data is for reference and cybersecurity research purposes only.CyStack advises users not to use this information for unlawful purposes.

What is CVE-2026-119328?

CVE-2026-119328 is a vulnerability classified as Improper Limitation of a Pathname to a Restricted Directory and External Control of File Name or Path, affecting immich (affected versions: < 3.3.0). This vulnerability is rated Medium, with a CVSS score of 6.5. There is not enough data to determine whether this vulnerability has been exploited.

Overview

Original source data

Immich is a high-performance self-hosted photo and video management solution. Prior to 3.3.0, the unauthenticated machine-learning /predict endpoint in machine-learning/immich_ml/main.py accepted an options object and passed its values into model construction in machine-learning/immich_ml/models/base.py without restricting security-sensitive parameters. An attacker with network access to the service could set cache_dir to an arbitrary writable path, causing model downloads to write there and causing clear_cache() to pass that path to shutil.rmtree() after selected model-loading failures. Depending on filesystem permissions and the selected path, this could modify files in mounted data locations or recursively delete an attacker-selected directory. The model-name allowlist prevents this issue from becoming arbitrary-model deserialization or code execution. This issue is fixed in version 3.3.0.

Affected products and scope

  • The normalized record identifies immich-app/immich as affected for all versions < 3.3.0.
  • The CNA GitHub advisory identifies affected versions as <= 3.0.3, records the vulnerable code path on 3.0.3, and identifies 3.3.0 as the patched version.
  • These boundaries are not fully consistent. The consulted evidence does not independently establish the status of versions above 3.0.3 but below 3.3.0; those versions should not be assumed safe.
  • The affected component is the machine-learning service, specifically the /predict processing and model-construction paths that consume request-supplied options.

Technical details

The immich-app Immich machine-learning service accepts requests to the /predict endpoint without authentication. Its request options object is passed into model construction without adequately restricting security-sensitive parameters, allowing an attacker to control cache_dir. That value is used as the write target for model downloads; after selected model-loading or parsing failures, clear_cache() can pass the same path to shutil.rmtree(), resulting in recursive deletion of an attacker-selected directory. The practical outcome depends on the machine-learning process permissions, mounted directories, and network reachability of the service. The model-name allowlist limits the scope of the issue and prevents it from becoming arbitrary-model deserialization or code execution. The available evidence does not establish that every deployment exposes the machine-learning endpoint to an untrusted network.

Exploitability

The issue is network-reachable when the machine-learning service can be accessed from an attacker-controlled network. The supplied exploitability attributes indicate that authentication and user interaction are not required. A key precondition is that /predict is reachable and that the service process has write or delete permission for the selected path. The developer advisory contains proof-of-concept material describing the vulnerable control flow, but the supplied record does not confirm exploitation in the wild or clearly classify a public exploit. Current exploitation status should therefore be treated as unestablished.

Technical impact

The flaw allows an unauthenticated request to influence a filesystem path used by the machine-learning service. The result may be model or other file writes in a directory writable by the process, or recursive directory deletion when model loading enters a covered failure path. Process permissions and mounted volumes determine whether the effect remains limited to a cache or reaches photo and video data locations. The record does not show that the flaw directly provides data-read access or code execution, and the model-name allowlist is an important limitation. Organizational consequences can include data loss, data integrity problems, and interruption of machine-learning processing.

Business impact

  • An unauthenticated attacker may modify files that the machine-learning process can write, including files in mounted data locations where filesystem permissions allow it.
  • The error-handling path may recursively delete an attacker-selected directory, causing data loss or service disruption.
  • Operational impact depends on filesystem permissions, volume mounts, and the network exposure of the machine-learning service.
  • The record does not establish a data-reading capability, so this issue should not be described as directly causing data disclosure.
  • The model-name allowlist limits the possibility of extending the issue into arbitrary-model deserialization or code execution.

Remediation

  1. Upgrade Immich to 3.3.0, the patched version identified by both the CNA advisory and the supplied record. Do not infer that every later or parallel release branch is safe unless it has been separately verified.
  2. If an upgrade is not immediately possible, restrict the machine-learning service to loopback or a trusted internal network and block access from untrusted networks. The advisory also recommends adding authentication to the service.
  3. Review volume mounts and filesystem permissions for the machine-learning process to reduce the directories it can write or delete. This reduces exposure but does not replace the patch.
  4. For deployments in the version range where the normalized record and CNA advisory differ, treat the deployment as requiring remediation until it is upgraded to 3.3.0 or the vendor provides branch-specific confirmation.

Detection

  1. Inventory running Immich versions and identify deployments that enable the machine-learning service.
  2. Review the machine-learning service network boundary, including whether /predict is reachable from untrusted networks and whether it is protected by an authentication layer.
  3. If request bodies are retained, review /predict requests for unusual options values, especially cache_dir paths outside the expected model-cache location.
  4. Correlate model download or loading errors with filesystem audit data, where available, for writes or recursive deletion in mounted data directories.
  5. Treat monitoring as a precaution, not proof of safety. The absence of matching logs does not establish that a deployment is unaffected; version and reachability checks are still required.
Sources (11)
Learn more

Run an in-depth assessment with complete web risk management

CyStack VulnScan continuously discovers assets, validates vulnerabilities, and helps security teams prioritize remediation across the organization.