macaroni-os / macaroni-os/mark-issues

[python-build-tools-kit] dev-python/setuptools has security issues - CVE-2026-59890

Open
#732 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

MARK mark-31 mark-i mark-iii mark-unstable mark-v mark-xl python-build-tools-kit security
Dominant language
No language data
Stars
5
Forks
1
PR merge metrics
No merged PRs in 30d

Description

As reported by Docker Scout:

# CVE-2026-59890
## ADVISORY - github
### Summary

When building a source distribution (python -m build --sdist / setup.py sdist), setuptools' FileList applies MANIFEST.in directives (exclude, global-exclude, recursive-exclude, prune) by matching a compiled glob against on-disk file names byte-for-byte, with no Unicode normalization. On normalization-preserving filesystems (notably macOS APFS and HFS+), a file written in NFD and a MANIFEST.in rule written in NFC refer to the same file but are byte-distinct, so the exclusion silently fails to match. A file the maintainer intended to exclude is then packed into the .tar.gz and, if published, uploaded to the public, immutable PyPI index.

### Impact

MANIFEST.in exclusions are the documented mechanism maintainers use to keep secrets, local configs, and private fixtures out of the published sdist. A non-ASCII excluded file may be published to the public, immutable PyPI index despite the rule — an irreversible disclosure with no visual cue (NFC and NFD forms render identically). Exposure is filesystem-dependent and most relevant on macOS APFS/HFS+, where many maintainers build and publish. Pure-ASCII rules are unaffected.

### Remediation

Normalize both the walked path and each MANIFEST.in pattern to a single canonical form before matching, in both setuptools/command/egg_info.py (FileList) and the vendored setuptools/_distutils/filelist.py. For an exclusion list, err toward excluding more, and document that MANIFEST.in matching is normalization-insensitive on macOS.
Credit

Reported by Tomas Illuminati. Coordinated via CERT/CC VINCE VU#604762.

Affected Ranges: <83.0.0
Fixed versions: 83.0.0

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing setuptools/command/egg_info.py and setuptools/_distutils/filelist.py, the two affected FileList implementations named in the report. Check how MANIFEST.in exclusions are matched against walked paths, then verify the work addresses normalization-insensitive matching and the affected package is on fixed version 83.0.0.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.