Bump pytest to 9.0.3 to remediate insecure tmpdir CVE#314
Open
lcbill wants to merge 3 commits into
Open
Conversation
pytest 8.3.4 is affected by a disclosed CVE fixed in 9.0.3. No compatibility issues were found with pytest-rerunfailures==15.0 or pytest-benchmark>=5.0.0, and the full unit + microbenchmark suite passes unchanged under pytest 9.
lcbill
enabled auto-merge (squash)
July 17, 2026 16:23
pytest 9.x declares Requires-Python >=3.10, so the unconditional pin broke dependency resolution on the Python 3.9 matrix legs (GitHub CI and Cloud Build). Python 3.9 environments keep the last compatible release (8.3.4); the CVE-2025-71176 fix applies on all supported versions >= 3.10.
Contributor
Author
|
Fixed the failing Python 3.9 checks: pytest 9.x requires Python >=3.10, so the unconditional |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/tmp/pytest-of-{user}directory naming pattern on UNIX, which can let a local user cause a denial of service or escalate privileges (GHSA-6w46-j5rx-g56g / CVE-2025-71176, medium severity, CVSS 6.8).devoptional-dependency group inpyproject.toml; pytest is a development/test-only dependency and this change has no runtime/production impact.Changes
pyproject.toml: bumppytestfrom==8.3.4to==9.0.3(the first patched version), keeping the existing exact-pin style used for the otherdevextras.pytest-rerunfailures==15.0(pytest !=8.2.2,>=7.4) andpytest-benchmark>=5.0.0(pytest>=8.1) both remain compatible with pytest 9.0.3 with no further bumps required.Test plan
pip install -e ".[dev]"— resolves cleanly with pytest 9.0.3, pytest-rerunfailures 15.0, pytest-benchmark 5.2.3.pytest, i.e.tests/unit/+tests/microbenchmarks/perpyproject.tomltestpaths): 3534 passed, 5 skipped (skips are pre-existing/platform-gated: Windows-only, macOS-only, and a documented docstring-coverage exception — unrelated to this bump).conftest.pychanges were needed; nothing in the suite relied on pytest 8-only hooks.tests/integration/was not run — it requires live LimaCharlie credentials (--oid/--keyarerequired=Trueintests/integration/conftest.py) and is excluded from the defaulttestpathsalready.