pytest is a widely used PyPI package. As of 2026-05-24, there are 1 known vulnerabilities in the OSV database. The latest stable version is 9.0.3. Developers should audit their dependency trees and update to patched versions.
Package Overview
Known Vulnerabilities (1)
| ID | Severity | Score | Affected Versions | Fixed In | Description |
|---|---|---|---|---|---|
| CVE-2025-71176 | MODERATE | 5.0 | 0 to 9.0.3 | 9.0.3 | pytest has vulnerable tmpdir handling |
Security Recommendations
- Pin pytest to the latest stable version (9.0.3) in your dependency manifest
- Enable automated dependency updates with Dependabot or Renovate
- Run regular vulnerability scans using
pip-audit - Review your lock file (requirements.txt) after every update
- Monitor the OSV database and NIST NVD for new advisories
FAQ
Is pytest safe to use?
pytest is actively maintained and widely used. As of 2026-05-24, there are 1 known vulnerabilities listed in the OSV database. Most have patches available. Keeping your dependencies updated and running regular security audits significantly reduces risk.
What vulnerabilities does pytest have?
The OSV database currently lists 1 vulnerabilities for pytest. These range in severity and are detailed in the vulnerability table above. Check the linked advisories for full technical details and remediation guidance.
How do I update pytest to fix vulnerabilities?
Run pip install --upgrade pytest to get the newest version. Use pip-audit or safety check to scan for known vulnerabilities. Pin your dependencies with a requirements file and review updates regularly.
Using AI-Generated Code with pytest?
Our vibe coding security audit checks for misconfigurations, exposed secrets and vulnerable dependencies in AI-generated codebases. If your project uses pytest, we can verify it is locked to a safe version and properly configured.
Get a Vibe Coding Security Audit