---
id: CVE-2025-22240
aliases:
  - GHSA-xh32-3m67-qjgf
  - PYSEC-2026-1903
title: Salt allows arbitrary directory creation or file deletion
summary: Salt allows arbitrary directory creation or file deletion
severity: medium
cvss: 6.3
cvssVector: 'CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H'
vendor: salt
product: salt
ecosystem: pip
affected:
  - 'salt >= 3007.0rc1, < 3007.4'
  - 'salt >= 3006.0rc1, < 3006.12'
patched:
  - salt 3007.4
  - salt 3006.12
published: '2025-06-13'
updated: '2026-07-07'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-xh32-3m67-qjgf'
references:
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2025-22240'
  - url: >-
      https://github.com/saltstack/salt/commit/f7c28ffbf18dbf693a15b1ba9493918de3e88cf3
  - url: 'https://docs.saltproject.io/en/3006/topics/releases/3006.12.html'
  - url: 'https://docs.saltproject.io/en/3007/topics/releases/3007.4.html'
  - url: 'https://github.com/saltstack/salt'
tags:
  - osv
  - pip
epss: 0.00163
epssPercentile: 0.04856
ingestedAt: '2026-07-08T18:25:54.189Z'
---

## Overview

Arbitrary directory creation or file deletion. In the find_file method of the GitFS class, a path is created using os.path.join using unvalidated input from the “tgt_env” variable. This can be exploited by an attacker to delete any file on the Master's process has permissions to.

## Affected packages

- `salt >= 3007.0rc1, < 3007.4`
- `salt >= 3006.0rc1, < 3006.12`

## Remediation

Upgrade to a patched release:

- `salt 3007.4`
- `salt 3006.12`
