Skip to content

[3.14] gh-161323: Refuse drive-relative paths in tarfile extraction filters (GH-161334) - #161356

Merged
gpshead merged 1 commit into
python:3.14from
miss-islington:backport-e4c751b-3.14
Nov 4, 2026
Merged

gpshead merged 1 commit into
python:3.14from
miss-islington:backport-e4c751b-3.14

Conversation

@miss-islington

Copy link
Copy Markdown
Contributor

On Windows, os.path.join() does not put a name such as 'C:foo' below a
destination that has no drive, so the 'tar' and 'data' filters now refuse
names and link targets with a drive, after normalization.
Fixes CVE-2026-107784.

reported by Girish Konda

ANT-2026-RSL1F4AT
(cherry picked from commit e4c751b)

Co-authored-by: Gregory P. Smith 68491+gpshead@users.noreply.github.com
Co-authored-by: Petr Viktorin encukou@gmail.com

…lters (pythonGH-161334)

* pythongh-161323: Refuse drive-relative paths in tarfile extraction filters

On Windows, os.path.join() does not put a name such as 'C:foo' below a
destination that has no drive, so the 'tar' and 'data' filters now refuse
names and link targets with a drive, after normalization.
Fixes CVE-2026-107784.

reported by Girish Konda

ANT-2026-RSL1F4AT
(cherry picked from commit e4c751b)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
@gpshead
gpshead merged commit 6fea59a into python:3.14 Nov 4, 2026
54 checks passed
@miss-islington
miss-islington deleted the backport-e4c751b-3.14 branch November 4, 2026 21:54
benbrasso added a commit to HHS/simpler-grants-pdf-builder that referenced this pull request Dec 1, 2026
## Summary

The [Anchore run for
#1444](https://github.com/HHS/simpler-grants-pdf-builder/actions/runs/46678696709/job/142755244221)
flagged CVE-2026-107784 in CPython 3.14.10 in the Debian Linux Builder
image. The [CPython
advisory](https://www.openwall.com/lists/oss-security/2026/11/23/18)
describes Windows-specific archive extraction behavior.

Add a temporary Grype rule scoped to that CVE and the exact Python
binary version and location reported in the NOFOs image. The
medium-severity threshold continues to apply to other findings. Review
on December 8 and remove the rule when the patched base image passes an
unsuppressed scan. The [3.14
backport](python/cpython#161356) is available
upstream.

The SGG NOFO deployment workflow reads its own Grype configuration.
Coordinate an equivalent scoped rule there if the deployment scan hits
the same finding.

## Test plan

- Parsed both YAML versions and verified that the sole change is the
scoped rule.
- Confirm in CI that Anchore passes and other findings still use the
medium severity threshold. Local container scan pending.

## UI evidence

This change affects CI configuration only.

## Checklist

- [x] Documentation placement reviewed. Rationale and removal criteria
are recorded beside the rule.
- [ ] Tests pass locally (`make test`).
- [x] Editor Tasks applicability reviewed. Editor workflows are
unaffected.
- [x] Import rules and Word export applicability reviewed. The change is
confined to Grype configuration.
benbrasso added a commit to HHS/simpler-grants-gov that referenced this pull request Dec 3, 2026
…13619)

## Summary

The [SGG NOFO
deployment](https://github.com/HHS/simpler-grants-gov/actions/runs/46698938380)
stopped at Anchore after Grype reported CVE-2026-107784 for Python
3.14.10 in the Debian Linux NOFO image. The [CPython
advisory](https://www.openwall.com/lists/oss-security/2026/11/23/18)
describes behavior specific to Windows.

## Changes proposed

Mirror the temporary rule from [Builder PR
#1445](HHS/simpler-grants-pdf-builder#1445) in
SGG’s shared `.grype.yml`. The rule requires the exact CVE, package
name, version, binary type, and library path reported in the failed NOFO
scan. The medium-severity threshold continues to apply to other
findings.

## Context for reviewers

The Builder PR workflow and the SGG NOFO deployment workflow read Grype
configuration from their respective repositories. The matching rule
passed Builder CI. This rule is a stopgap while the [CPython 3.14
backport](python/cpython#161356) makes its way
into the published NOFO base image. Review on December 8 and remove it
once the patched image passes Anchore with this rule removed.

## Validation steps

- Verified the failed SGG job reported Debian Linux, Python 3.14.10 and
the matching library path.
- Parsed the original and updated YAML and verified that the scoped rule
is the sole configuration change.
- After merge, run Deploy NOFOs for dev with version `main`. Confirm
Anchore passes and the deploy job proceeds, then repeat for prod. SGG
deployment validation is pending.

---------

Co-authored-by: Benjamin Brasso <benjaminbrasso@Ben-Brasso.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants