CVE-2025-71176 Details
Description
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.
A vulnerability in pytest in versions through 9.0.2 on UNIX systems allows local users to cause a denial of service or potentially escalate privileges. This issue arises because pytest creates temporary directories with predictable names based on the username, which can be exploited through symlink attacks and time-of-check to time-of-use (TOCTOU) race conditions. The vulnerability is exacerbated by the fact that certain Linux kernel protections are not enabled by default, leaving many environments at risk.
Users can create a secure temporary directory using `mktemp -d` and override the default temporary directory setting in pytest. Additionally, on Linux, it's advisable to enable the relevant sysctls to protect against symlink and hardlink attacks.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jan 22, 2026CISA-ADP
Assessed Jan 22, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/pytest-dev/pytest/issues/13669 | [email protected] | ExploitIssue TrackingTechnical DescriptionVendor |
| https://www.openwall.com/lists/oss-security/2026/01/21/5 | [email protected] | Mailing ListRemedy |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-379 | Creation of Temporary File in Directory with Insecure Permissions | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| pytest | All versions |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jan 22, 2026 | New CVE Received | [email protected] |
Volerion