Pytest Security Flaw CVE-2025-71176: Local UNIX Users Can Trigger DoS or Privilege Escalation
A critical security vulnerability in the widely-used Python testing framework, pytest, exposes UNIX-based systems to local denial-of-service attacks and potential privilege escalation. The flaw, tracked as CVE-2025-71176, is present in all versions up to and including 9.0.2. It stems from the framework's predictable use of directories named `/tmp/pytest-of-{user}`, creating a vector for local users to disrupt testing processes or possibly elevate their access rights on the host system.
The vulnerability has been assigned a CVSS v3.1 score of 6.8 (Medium), with a vector string indicating local attack complexity, no privileges required, and impacts on confidentiality, integrity, and availability. The issue is specific to UNIX-like operating systems where the `/tmp` directory is utilized. The maintainers of pytest have released version 9.0.3 to patch this security hole, prompting an immediate update for all development and CI/CD environments that rely on the tool.
This security patch is not a routine dependency update but a necessary fix for a concrete exploit path. Organizations and individual developers using pytest on Linux or macOS servers, especially in shared or multi-user environments, are at risk if they delay applying the update. The flaw underscores the persistent security challenges in foundational development tools and the importance of monitoring automated dependency updates for security alerts.