---
id: CVE-2025-22241
aliases:
  - GHSA-7f3f-x5f5-79gw
  - PYSEC-2026-1895
title: Salt's file contents overwrite the VirtKey class
summary: Salt's file contents overwrite the VirtKey class
severity: medium
cvss: 5.6
cvssVector: 'CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N'
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-7f3f-x5f5-79gw'
references:
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2025-22241'
  - url: >-
      https://github.com/saltstack/salt/commit/9445f496fed61b15dc4364818007e5b765b0746f
  - 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.00183
epssPercentile: 0.06946
ingestedAt: '2026-07-08T18:25:46.984Z'
---

## Overview

File contents overwrite the VirtKey class is called when “on-demand pillar” data is requested and uses un-validated input to create paths to the “pki directory”. The functionality is used to auto-accept Minion authentication keys based on a pre-placed “authorization file” at a specific location and is present in the default configuration.

## Affected packages

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

## Remediation

Upgrade to a patched release:

- `salt 3007.4`
- `salt 3006.12`
