Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update dependency setuptools to v78 [SECURITY]#22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
renovate wants to merge1 commit intomain
base:main
Choose a base branch
Loading
fromrenovate/pypi-setuptools-vulnerability

Conversation

@renovate
Copy link
Contributor

@renovaterenovatebot commentedMay 20, 2025
edited
Loading

This PR contains the following updates:

PackageChangeAgeConfidence
setuptools (changelog)~=70.0.0 ->~=78.1.1ageconfidence

GitHub Vulnerability Alerts

CVE-2025-47273

Summary

A path traversal vulnerability inPackageIndex was fixed in setuptools version 78.1.1

Details

    def _download_url(self, url, tmpdir):        # Determine download filename        #        name, _fragment = egg_info_for_url(url)        if name:            while '..' in name:                name = name.replace('..', '.').replace('\\', '_')        else:            name = "__downloaded__"  # default if URL has no path contents        if name.endswith('.[egg.zip](http://egg.zip/)'):            name = name[:-4]  # strip the extra .zip before download -->       filename = os.path.join(tmpdir, name)

Here:https://github.com/pypa/setuptools/blob/6ead555c5fb29bc57fe6105b1bffc163f56fd558/setuptools/package_index.py#L810C1-L825C88

os.path.join() discards the first argumenttmpdir if the second begins with a slash or drive letter.
name is derived from a URL without sufficient sanitization. While there is some attempt to sanitize by replacing instances of '..' with '.', it is insufficient.

Risk Assessment

As easy_install and package_index are deprecated, the exploitation surface is reduced.
However, it seems this could be exploited in a similar fashion likeGHSA-r9hx-vwmv-q579, and as described by POC 4 inGHSA-cx63-2mw6-8hw5 report: via malicious URLs present on the pages of a package index.

Impact

An attacker would be allowed to write files to arbitrary locations on the filesystem with the permissions of the process running the Python code, which could escalate to RCE depending on the context.

References

https://huntr.com/bounties/d6362117-ad57-4e83-951f-b8141c6e7ca5
https://github.com/pypa/setuptools/issues/4946


Release Notes

pypa/setuptools (setuptools)

v78.1.1

Compare Source

v78.1.0

Compare Source

v78.0.2

Compare Source

v78.0.1

Compare Source

v77.0.3

Compare Source

v77.0.1

Compare Source

v76.1.0

Compare Source

v76.0.0

Compare Source

v75.9.1

Compare Source

v75.9.0

Compare Source

v75.8.2

Compare Source

v75.8.1

Compare Source

v75.8.0

Compare Source

v75.7.0

Compare Source

v75.6.0

Compare Source

v75.5.0

Compare Source

v75.4.0

Compare Source

v75.3.2

Compare Source

v75.3.1

Compare Source

v75.3.0

Compare Source

v75.2.0

Compare Source

v75.1.0

Compare Source

v75.0.0

Compare Source

v74.1.3

Compare Source

v74.1.2

Compare Source

v74.1.1

Compare Source

v74.1.0

Compare Source

v74.0.0

Compare Source

v73.0.1

Compare Source

v73.0.0

Compare Source

v72.2.0

Compare Source

v72.1.0

Compare Source

v72.0.0

Compare Source

v71.1.0

Compare Source

v71.0.4

Compare Source

v71.0.3

Compare Source

v71.0.2

Compare Source

v71.0.1

Compare Source

v71.0.0

Compare Source

v70.3.0

Compare Source

v70.2.0

Compare Source

v70.1.1

Compare Source

v70.1.0

Compare Source


Configuration

📅Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated byMend Renovate. View therepository job log.

@sourcery-ai
Copy link

sourcery-aibot commentedMay 20, 2025
edited
Loading

Reviewer's Guide

Upgrade setuptools in requirements.txt from ~=70.0.0 to ~=78.1.1 to resolve a path traversal vulnerability (CVE-2025-47273).

Sequence Diagram:CVE-2025-47273 Path Traversal Vulnerability in setuptools < 78.1.1

sequenceDiagram    autonumber    actor Attacker    participant UserProcess as "User Process (using setuptools)"    participant PackageIndex as "setuptools.PackageIndex._download_url (<78.1.1)"    participant Utils as "Utility functions (e.g. egg_info_for_url)"    participant OSPath as "os.path"    participant Filesystem    Attacker-->>UserProcess: Provides malicious URL (e.g., in package metadata or index)    UserProcess->>+PackageIndex: Calls _download_url(malicious_url, "/intended/tmp/dir")    PackageIndex->>+Utils: egg_info_for_url(malicious_url)    Utils-->>-PackageIndex: Returns 'name' derived from URL (e.g., "../../../../etc/passwd" or "/etc/passwd")    PackageIndex->>PackageIndex: Insufficient sanitization of 'name'    PackageIndex->>+OSPath: join("/intended/tmp/dir", name)    OSPath-->>-PackageIndex: filename (e.g., "/etc/passwd" or "/intended/tmp/dir/../../../../etc/passwd")    Note right of OSPath: If 'name' is absolute, initial path is discarded.    Note right of OSPath: '..' can lead to path traversal.    PackageIndex->>+Filesystem: Writes downloaded content to 'filename'    Filesystem-->>-PackageIndex: File written to unintended arbitrary location    PackageIndex-->>-UserProcess: Operation completes, potentially compromising system
Loading

File-Level Changes

ChangeDetailsFiles
Upgraded setuptools dependency version
  • Changed version specifier from ~=70.0.0 to ~=78.1.1
requirements.txt

Possibly linked issues

  • #123: The PR updates setuptools to v78.1.1 which is listed as an update in the issue's dependency dashboard.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment@sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with@sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write@sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write@sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment@sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment@sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment@sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment@sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access yourdashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@renovaterenovatebotforce-pushed therenovate/pypi-setuptools-vulnerability branch frome1ca4e8 to7d9964fCompareJune 18, 2025 11:49
@renovaterenovatebot changed the titleUpdate dependency setuptools to v78 [SECURITY]Update dependency setuptools to ~=70.3.0 [SECURITY]Jun 18, 2025
@renovaterenovatebotforce-pushed therenovate/pypi-setuptools-vulnerability branch from7d9964f to9ee1d0cCompareJune 18, 2025 16:30
@renovaterenovatebot changed the titleUpdate dependency setuptools to ~=70.3.0 [SECURITY]Update dependency setuptools to v78 [SECURITY]Jun 18, 2025
@renovaterenovatebot changed the titleUpdate dependency setuptools to v78 [SECURITY]Update dependency setuptools to ~=70.3.0 [SECURITY]Jul 28, 2025
@renovaterenovatebotforce-pushed therenovate/pypi-setuptools-vulnerability branch 2 times, most recently from66294af to41c990fCompareJuly 28, 2025 20:59
@renovaterenovatebot changed the titleUpdate dependency setuptools to ~=70.3.0 [SECURITY]Update dependency setuptools to v78 [SECURITY]Jul 28, 2025
@renovaterenovatebotforce-pushed therenovate/pypi-setuptools-vulnerability branch from41c990f to24bc0abCompareAugust 3, 2025 17:54
@renovaterenovatebot changed the titleUpdate dependency setuptools to v78 [SECURITY]Update dependency setuptools to ~=70.3.0 [SECURITY]Aug 3, 2025
@renovaterenovatebotforce-pushed therenovate/pypi-setuptools-vulnerability branch from24bc0ab to4a55c69CompareAugust 3, 2025 21:33
@renovaterenovatebot changed the titleUpdate dependency setuptools to ~=70.3.0 [SECURITY]Update dependency setuptools to v78 [SECURITY]Aug 3, 2025
@renovaterenovatebot changed the titleUpdate dependency setuptools to v78 [SECURITY]Update dependency setuptools to ~=70.3.0 [SECURITY]Aug 10, 2025
@renovaterenovatebotforce-pushed therenovate/pypi-setuptools-vulnerability branch from4a55c69 to55b7676CompareAugust 10, 2025 14:58
@renovaterenovatebot changed the titleUpdate dependency setuptools to ~=70.3.0 [SECURITY]Update dependency setuptools to v78 [SECURITY]Aug 10, 2025
@renovaterenovatebotforce-pushed therenovate/pypi-setuptools-vulnerability branch from55b7676 tod8ed53cCompareAugust 10, 2025 16:54
@renovaterenovatebot changed the titleUpdate dependency setuptools to v78 [SECURITY]Update dependency setuptools to ~=70.3.0 [SECURITY]Aug 13, 2025
@renovaterenovatebotforce-pushed therenovate/pypi-setuptools-vulnerability branch 2 times, most recently from0d608be to67f961cCompareAugust 13, 2025 21:55
@renovaterenovatebot changed the titleUpdate dependency setuptools to ~=70.3.0 [SECURITY]Update dependency setuptools to v78 [SECURITY]Aug 13, 2025
@renovaterenovatebot changed the titleUpdate dependency setuptools to v78 [SECURITY]Update dependency setuptools to ~=70.3.0 [SECURITY]Aug 19, 2025
@renovaterenovatebotforce-pushed therenovate/pypi-setuptools-vulnerability branch 2 times, most recently from8252ceb to1fd83b9CompareAugust 19, 2025 22:40
@renovaterenovatebot changed the titleUpdate dependency setuptools to ~=70.3.0 [SECURITY]Update dependency setuptools to v78 [SECURITY]Aug 19, 2025
@renovaterenovatebotforce-pushed therenovate/pypi-setuptools-vulnerability branch from1fd83b9 tob3101beCompareSeptember 25, 2025 15:00
@renovaterenovatebot changed the titleUpdate dependency setuptools to v78 [SECURITY]Update dependency setuptools to ~=70.3.0 [SECURITY]Sep 25, 2025
@renovaterenovatebotforce-pushed therenovate/pypi-setuptools-vulnerability branch fromb3101be toa7eff52CompareSeptember 25, 2025 20:12
@renovaterenovatebot changed the titleUpdate dependency setuptools to ~=70.3.0 [SECURITY]Update dependency setuptools to v78 [SECURITY]Sep 25, 2025
@renovaterenovatebotforce-pushed therenovate/pypi-setuptools-vulnerability branch froma7eff52 to4125da3CompareOctober 9, 2025 13:02
@renovaterenovatebot changed the titleUpdate dependency setuptools to v78 [SECURITY]Update dependency setuptools to ~=70.3.0 [SECURITY]Oct 9, 2025
@renovaterenovatebotforce-pushed therenovate/pypi-setuptools-vulnerability branch from4125da3 to9ef7bebCompareOctober 9, 2025 18:53
@renovaterenovatebot changed the titleUpdate dependency setuptools to ~=70.3.0 [SECURITY]Update dependency setuptools to v78 [SECURITY]Oct 9, 2025
@renovaterenovatebotforce-pushed therenovate/pypi-setuptools-vulnerability branch from9ef7beb to0873764CompareNovember 11, 2025 01:59
@renovaterenovatebot changed the titleUpdate dependency setuptools to v78 [SECURITY]Update dependency setuptools to ~=70.3.0 [SECURITY]Nov 11, 2025
@renovaterenovatebotforce-pushed therenovate/pypi-setuptools-vulnerability branch from0873764 tocfae305CompareNovember 11, 2025 07:49
@renovaterenovatebot changed the titleUpdate dependency setuptools to ~=70.3.0 [SECURITY]Update dependency setuptools to v78 [SECURITY]Nov 11, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant


[8]ページ先頭

©2009-2025 Movatter.jp