CVE-2026-119328

Immich: Unauthenticated filesystem path injection (arbitrary directory write + recursive delete) in the machine-learning service

Published Oct 30, 2026 CVSS 3.1 · 6.5 Medium EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

The vulnerability resides in the machine-learning /predict endpoint of Immich, which accepts an options object from callers without validating security-sensitive parameters. An unauthenticated attacker who can reach the service can set the cache_dir field to an arbitrary writable filesystem path. The ML component then downloads models to that location and, when a model fails to load, uses shutil.rmtree() to clear the cache. As a result the attacker can cause the application to write files to any writable directory and recursively delete a directory they specify, leading to data loss or corruption. The flaw is a combination of uncontrolled path traversal (CWE‑22) and the use of a dangerous delete operation (CWE‑73).

Affected Systems

All installations of Immich prior to version 3.3.0 are affected. The vulnerability arises in the immich-app:immich component running the machine-learning service. Any deployment that exposes the /predict endpoint without authentication, such as on a public server or within an untrusted network, is vulnerable.

Risk and Exploitability

The CVSS score of 6.5 indicates moderate severity. EPSS is not available and the vulnerability is not listed in CISA's KEV catalog, but the attack requires only network access to the service and does not need credentials. An attacker could make the application overwrite files in writable directories or delete an entire subtree. The damage is bounded to data integrity and availability, with no possibility of arbitrary code execution because the model name is filtered. However, the ability to delete user media or configuration files can disrupt service operations and lead to significant business impact.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Immich to version 3.3.0 or later, where the cache_dir parameter is properly validated and the recursive delete has been removed or protected.
  • Restrict access to the machine-learning service by limiting inbound traffic to trusted hosts or placing the service behind a firewall or reverse proxy that requires authentication for the /predict endpoint.
  • Monitor application logs for unexpected entries related to model downloads or cache clearance, and audit file system permissions to ensure that untrusted directories cannot be used as cache locations.

Generated by OpenCVE AI on October 30, 2026 at 21:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Immich-app
Immich-app immich
Vendors & Products Immich-app
Immich-app immich
Type Values Removed Values Added
Description 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.
Title Immich: Unauthenticated filesystem path injection (arbitrary directory write + recursive delete) in the machine-learning service
Weaknesses CWE-22
CWE-73
References
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L'}

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

  • CWE-73

    External Control of File Name or Path

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 6, 2026, 5:38 PM
Reserved
Oct 29, 2026, 8:44 PM
Status
Deferred
Published
Oct 30, 2026, 8:17 PM
Modified
Nov 6, 2026, 6:17 PM