Skip to main content

setuptools CVE-2026-59890

| EUVDEUVD-2026-42323 MEDIUM
Improper Handling of Unicode Encoding (CWE-176)
2026-07-08 GitHub_M GHSA-h35f-9h28-mq5c PYSEC-2026-3447
6.1
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    NFD filename on macOS APFS bypasses NFC MANIFEST.in exclusion glob
  2. Delivery
    Developer builds sdist unaware of silent inclusion
  3. Exploit
    Sensitive file packed into source tarball
  4. Execution
    Package published to PyPI or private registry
  5. Impact
    Attacker downloads tarball and extracts credentials

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Unicode normalization
Exploitation Conditions

Exploitation requires all of the following conditions simultaneously: (1) the build machine must be macOS with an APFS or HFS+ filesystem, where filenames can be stored in NFD Unicode form; (2) at least one file in the project directory must have an NFD-normalized on-disk filename, which typically occurs when filenames contain accented characters such as é, ñ, ü, or other composed Unicode glyphs; (3) a MANIFEST.in file must contain an exclude, global-exclude, recursive-exclude, or prune directive targeting that file, written in NFC encoding; (4) the developer must actively run a setuptools-based sdist build (UI:R per CVSS). The vulnerability does not affect builds on Linux or Windows, projects with ASCII-only filenames, or projects that do not use MANIFEST.in exclusion directives. These combined prerequisites substantially reduce the realistic affected population to macOS-based Python maintainers publishing packages with non-ASCII filenames under active exclusion rules.

Impact

The vendor CVSS 6.1 Medium vector AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N accurately places the attack vector as local and requires user interaction (running the build command), reflecting that this is not a network-exploitable flaw. However, the AC:L designation is contestable - successful exploitation requires the concurrent presence of at least three platform-specific conditions: macOS with APFS or HFS+, one or more files with NFD-normalized filenames, and a MANIFEST.in containing an active exclusion rule written in NFC. An independent assessment places this at AC:H. The C:H score is the most significant signal: if sensitive files escape into published packages, the downstream confidentiality impact can be severe and irreversible. This vulnerability is not in the CISA KEV catalog, no EPSS data was available in the provided intelligence, and no public proof-of-concept code has been identified. The 'Authentication Bypass' tag in source metadata appears to be an automated misclassification - this is a glob exclusion bypass via normalization mismatch, not an authentication control bypass. Real-world priority is highest for macOS-based Python maintainers who publish packages to public registries and use MANIFEST.in exclusion directives; the vulnerability has no relevance in Linux CI environments or ASCII-only projects.

Exploit ScenarioDerived

A Python developer on macOS with APFS creates a project that includes a file such as config_café.env whose filename is stored in NFD form by the filesystem after being created via Finder or certain shell operations. The developer adds exclude config_café.env to MANIFEST.in using NFC encoding as produced by their text editor, intending to prevent publication of the file. When python -m build is run, the NFD on-disk name silently fails to match the NFC glob pattern; setuptools includes the file in the generated sdist tarball without any warning. The developer publishes the package to PyPI, inadvertently exposing API keys or database credentials to anyone who downloads the source distribution - no exploit code or attacker interaction is required beyond downloading the published tarball.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 08, 2026

Setuptools prior to 83.0.0 fails to normalize Unicode filenames before matching them against MANIFEST.in exclusion patterns on macOS APFS and HFS+ filesystems, allowing files with NFD-normalized on-disk names to silently bypass NFC-encoded exclude, global-exclude, recursive-exclude, and prune directives and be packed into Python source distributions. Python package maintainers developing on macOS face a supply chain risk: sensitive files such as credentials, private keys, or environment configs that are correctly listed in MANIFEST.in for exclusion may still appear in tarballs published to PyPI or private registries. No public exploit has been identified at time of analysis, and the vulnerability is not listed in the CISA KEV catalog.

RemediationAI

Upgrade setuptools to version 83.0.0 or later, which normalizes Unicode filenames before applying MANIFEST.in glob exclusions. The release is available at https://github.com/pypa/setuptools/releases/tag/v83.0.0 and can be installed via pip install --upgrade setuptools. Until patching is possible, maintainers on macOS should manually audit built sdist tarballs before publishing by running tar tzf dist/*.tar.gz and verifying no sensitive files are present - this inspection adds a human gate that the broken exclusion logic cannot be relied upon to provide. Running python -m build within a Linux-based CI pipeline (e.g., GitHub Actions on ubuntu-latest) rather than on a local macOS workstation is a reliable compensating control, as Linux filesystems do not NFD-normalize filenames and exclusion rules will function correctly. Renaming sensitive files to ASCII-only names removes the normalization ambiguity entirely but does not fix the underlying bug and should not substitute for patching.

Affected VersionsENISA

setuptools < 83.0.0

Affected Packages

pypi setuptools fix: 83.0.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability (CWE-176: Improper Handling of Unicode Encoding) resides in setuptools' FileList class, which processes MANIFEST.in directives by compiling glob patterns and matching them against on-disk filenames. The root cause is the absence of Unicode normalization on either the pattern or the filename side before comparison. macOS APFS and HFS+ filesystems canonicalize stored filenames to NFD (Normalization Form Decomposed), where accented or composite Unicode characters are stored as a base glyph followed by one or more combining code points. Most text editors and shells produce NFC (Normalization Form Composed) output when a developer writes an exclusion rule - so the byte sequences of pattern and filename differ even when they represent the same visible string. The affected CPE is cpe:2.3:a:pypa:setuptools:*:*:*:*:*:*:*:* covering all versions prior to 83.0.0. The fix, committed at dd9f436a36486b4cb8a4c70a2321548b0be09b8f, normalizes filenames prior to glob matching to eliminate this form mismatch.

Know when Setuptools gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 6.1 MEDIUM
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N
vuln.today AI 5.3 MEDIUM

AC:H reflects three required preconditions (macOS APFS/HFS+, NFD-normalized filename, active MANIFEST.in exclusion rule); no availability impact applies.

3.1 AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:L/A:N
4.0 AV:L/AC:H/AT:P/PR:N/UI:A/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N
SUSE MEDIUM
Red Hat 6.1 MEDIUM

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
Low
Availability
None

Lifecycle Timeline

2
Patch available
Jul 08, 2026 - 18:02 EUVD
CVE Published
Jul 08, 2026 - 16:02 cve.org
MEDIUM 6.1

DescriptionCVE.org

setuptools is a package that allows users to download, build, install, upgrade, and uninstall Python packages. Prior to 83.0.0, FileList applied MANIFEST.in exclude, global-exclude, recursive-exclude, and prune directives by matching compiled glob patterns against on-disk file names without Unicode normalization, so on macOS APFS or HFS+ an NFD file name could bypass an NFC exclusion rule and be packed into a source distribution. This issue is fixed in version 83.0.0.

Threat Intelligence Overview

EPSS Score
0.3%
Top 81% exploitable
Prevalence
High
core Python packaging tool installed in virtually all Python development environments
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA MSRC Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

50
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise High Performance Computing 12 Not-Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Not-Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy