VDB
Sign up
MEDIUM6.8

PYSEC-2026-1845

pytest has vulnerable tmpdir handling

Quick fix

PYSEC-2026-1845 — pytest: upgrade to the fixed version with the command below.

pip install --upgrade 'pytest>=9.0.3'

Details

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.

Are you affected?

Enter the version of the package you're using.

Affected packages

PyPI/pytest
Introduced in: 0Fixed in: 9.0.3
Fixpip install --upgrade 'pytest>=9.0.3'

References