---
id: CVE-2025-71176
aliases:
  - GHSA-6w46-j5rx-g56g
  - PYSEC-2026-1845
title: pytest has vulnerable tmpdir handling
summary: pytest has vulnerable tmpdir handling
severity: medium
cvss: 6.8
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L'
vendor: pytest
product: pytest
ecosystem: pip
affected:
  - pytest < 9.0.3
patched:
  - pytest 9.0.3
published: '2026-01-22'
updated: '2026-09-10'
sourceUpdated: '2026-09-10T03:50:32.768043789Z'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-6w46-j5rx-g56g'
references:
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2025-71176'
  - url: 'https://github.com/pytest-dev/pytest/issues/13669'
  - url: 'https://github.com/pytest-dev/pytest/pull/14343'
  - url: >-
      https://github.com/pytest-dev/pytest/commit/95d8423bd24992deea5b9df32555fa1741679e2c
  - url: 'https://github.com/pytest-dev/pytes'
  - url: 'https://github.com/pytest-dev/pytest/releases/tag/9.0.3'
  - url: 'https://www.openwall.com/lists/oss-security/2026/01/21/5'
tags:
  - osv
  - pip
epss: 0.00156
epssPercentile: 0.03976
ingestedAt: '2026-07-08T18:25:46.540Z'
---

## Overview

pytest through 9.0.2 on UNIX relies on directories with the `/tmp/pytest-of-{user}` name pattern, which allows local users to cause a denial of service or possibly gain privileges.

## Affected packages

- `pytest < 9.0.3`

## Remediation

Upgrade to a patched release:

- `pytest 9.0.3`
