CVE-2026-59890: setuptools Unicode Normalization Bypass on macOS
setuptools, a core Python package management tool, contains a vulnerability in how it handles file exclusion rules when building source distributions. On macOS systems using APFS or HFS+ filesystems, attackers or malicious developers can bypass intended file exclusion directives by exploiting Unicode normalization differences. Specifically, files named with decomposed Unicode characters (NFD form) can be packed into distributed Python packages even when exclusion rules target the composed form (NFC). This allows sensitive or malicious files to be included in source distributions when they should have been excluded, potentially affecting downstream package users.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 6.1 MEDIUM · CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N
- Weaknesses (CWE)
- CWE-176, CWE-697
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-07-08 / 2026-07-13
NVD description (verbatim)
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.
4 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability stems from setuptools' FileList implementation, which processes MANIFEST.in directives (exclude, global-exclude, recursive-exclude, and prune) by matching glob patterns directly against filesystem filenames without performing Unicode normalization. On case-insensitive filesystems like macOS APFS and HFS+, two Unicode representations of the same character sequence can coexist: NFC (composed form, e.g., é as U+00E9) and NFD (decomposed form, e.g., e + ´ as U+0065 U+0301). When exclusion rules reference NFC-normalized filenames, an attacker can create files using NFD encoding that the glob matcher fails to recognize as matching, allowing those files to be included in the built source distribution. The fix in version 83.0.0 normalizes filenames during the matching process to ensure consistent comparison regardless of the Unicode representation on disk.
Business impact
For organizations consuming Python packages from public or private repositories, this vulnerability could allow unintended files—including source code, credentials, or malicious payloads—to be distributed within ostensibly vetted packages. Package maintainers who rely on MANIFEST.in exclusion rules to prevent sensitive artifacts from reaching end users may inadvertently ship packages containing excluded content. The attack surface is limited to macOS systems, but given the prevalence of macOS in development environments, the practical impact on supply chain integrity warrants attention. The medium CVSS score reflects the local attack vector (requires developer/packager involvement) and information disclosure as the primary concern, but the indirect reach through software supply chains elevates business risk.
Affected systems
Python setuptools versions prior to 83.0.0 are affected. The vulnerability manifests only on macOS systems running APFS or HFS+ filesystems, as these are the only common filesystems that preserve both NFC and NFD Unicode representations simultaneously. Linux and Windows systems are not affected because their filesystems normalize Unicode at the filesystem level or do not exhibit this behavior. Any development machine, CI/CD pipeline, or build server running an older setuptools version on macOS is a potential attack or misconfiguration point.
Exploitability
Exploitation requires local access or the ability to influence the package build process—typically a compromised developer account, a malicious contributor, or an insider threat. The attacker must intentionally create or modify files using NFD Unicode encoding to bypass exclusion rules. This is not a remote network vulnerability and does not affect end users installing pre-built wheels or binary distributions, only those building source distributions from setuptools-managed projects on affected macOS systems. Public exploitation likelihood is low because it requires deliberate Unicode manipulation, but determined attackers or supply chain adversaries would find this straightforward to weaponize. The vulnerability is not listed in CISA's Known Exploited Vulnerabilities catalog.
Remediation
Upgrade setuptools to version 83.0.0 or later. This version introduces Unicode normalization in the FileList glob matching logic, ensuring that both NFC and NFD representations of filenames are normalized to a consistent form before comparison against exclusion rules. Organizations should prioritize this update on macOS development machines and build infrastructure. Verify the update by confirming the setuptools version in your Python environment (pip show setuptools) and re-running any builds that may have been affected by the vulnerability window.
Patch guidance
Upgrade setuptools using 'pip install --upgrade setuptools>=83.0.0' or equivalent package management tools. Ensure all development machines, CI/CD agents, and build servers used by your organization are running the patched version. If you maintain Python packages, review your MANIFEST.in files to confirm they are using NFC-normalized filenames and test builds on macOS to ensure exclusion rules function as intended. For organizations with strict change control, validate the patch in a staging environment before full rollout, but given the medium severity and targeted nature of the fix, deployment can generally proceed promptly.
Detection guidance
Check setuptools version across your development environment: 'pip list | grep setuptools' or 'pip show setuptools'. Audit MANIFEST.in files in projects you maintain for any non-standard or internationalized filenames that could exist in NFD form. If you suspect files were unintentionally included in a source distribution, extract and inspect the source tarball (.tar.gz or .zip) and compare its contents against your MANIFEST.in rules. Review git history or file listings for any files with Unicode diacritics, particularly those that should have been excluded. Monitor package repositories for any unexpected file inclusions in recent distributions of your packages.
Why prioritize this
While the CVSS score of 6.1 (MEDIUM) reflects the local attack vector and limited information disclosure impact, several factors warrant prioritization: (1) the supply chain implications if exploited by maintainers or compromised developers, (2) the macOS-specific targeting, which is common in development environments, (3) the simplicity of the fix and low friction of upgrades, and (4) the absence of current active exploitation. For security teams managing Python development infrastructure or overseeing third-party Python package intake, this should be addressed within standard patching windows, with accelerated timelines if macOS is your primary development OS.
Risk score, explained
CVSS 3.1 score of 6.1 (MEDIUM) reflects: Attack Vector = Local (AV:L, requires local or build process access), Attack Complexity = Low (AC:L, no special preconditions), Privileges Required = None (PR:N), User Interaction = Required (UI:R, attacker must influence build or developer workflow), Scope = Unchanged (S:U), Confidentiality = High (C:H, sensitive files could be exposed), Integrity = Low (I:L, file inclusion rather than modification), Availability = None (A:N, no service disruption). The medium rating appropriately captures that this is a bounded threat requiring local/process influence, but with material information disclosure consequences in a supply chain context.
Frequently asked questions
Does this vulnerability affect users who install Python packages via pip or wheel files?
No. End users installing pre-built wheels or binary distributions are not affected. The vulnerability only impacts source distributions built with affected setuptools versions on macOS. Users are affected only if they download and build source distributions themselves, which is uncommon for most Python packages.
Why does this only affect macOS and not Linux or Windows?
Linux and Windows filesystems normalize Unicode at the filesystem level, so NFD and NFC representations are treated identically or normalized by the OS. macOS APFS and HFS+ preserve both Unicode forms, allowing two filenames that look identical to coexist as separate files. This Unicode preservation is the technical root cause specific to macOS.
If I maintain a Python package, how do I check if I've been affected?
Extract your latest source distributions (.tar.gz or .zip files) and compare their contents against your MANIFEST.in exclusion rules. Look for files with non-ASCII characters or Unicode diacritics that should have been excluded. If you used an affected setuptools version on macOS to build those distributions, have the files inspected carefully. Rebuild with setuptools 83.0.0 or later and compare the contents.
Is there a workaround if I can't upgrade setuptools immediately?
The most effective workaround is to normalize all filenames in your project to use only ASCII or consistently NFC-encoded Unicode before building. Additionally, manually verify the contents of your source distributions after building with affected setuptools versions. However, upgrading is strongly recommended as it is low-friction and eliminates the risk entirely.
This analysis is based on official CVE data and vendor advisories as of the publication date. CVSS scores and severity ratings are provided by NIST and the vulnerability maintainers. No exploit code is provided, and this analysis should not be used as a substitute for vendor guidance or comprehensive security testing. Verify all patch versions and remediation steps against official setuptools release notes and your organization's security policies before deployment. Source: NVD (public-domain), retrieved 2026-08-17. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-14687MEDIUMBettaFish Partial String Comparison in InsightEngine Deduplication
- CVE-2026-48618MEDIUMNode.js TLS Wildcard Validation Bypass via Unicode Normalization
- CVE-2026-10097HIGHwolfSSL ML-KEM-1024 Incomplete Ciphertext Validation – Private Key Recovery
- CVE-2026-14617LOWLow-Severity Case-Sensitivity Flaw in NousResearch hermes-agent Streaming Filter
- CVE-2026-14686LOWHdrHistogram Range Check Integer Comparison Flaw – Local Access Required
- CVE-2026-22660HIGHFlaskBB Admin Authorization Group Deletion Flaw
- CVE-2026-44249HIGHNetty IPv6 Subnet Filter Bypass Vulnerability (CVSS 8.1)
- CVE-2026-45062HIGHFrankenPHP Remote Code Execution via Non-ASCII Path Handling