René's URL Explorer Experiment


Title: shutil.rmtree is vulnerable to a symlink attack · Issue #48739 · python/cpython · GitHub

Open Graph Title: shutil.rmtree is vulnerable to a symlink attack · Issue #48739 · python/cpython

X Title: shutil.rmtree is vulnerable to a symlink attack · Issue #48739 · python/cpython

Description: BPO 4489 Nosy @loewis, @birkenfeld, @jcea, @ncoghlan, @pitrou, @larryhastings, @blueyed, @tarekziade, @ezio-melotti, @merwok, @akheron, @hynek PRs #22968 Dependencies bpo-4761: create Python wrappers for openat() and othersbpo-10755: Add...

Open Graph Description: BPO 4489 Nosy @loewis, @birkenfeld, @jcea, @ncoghlan, @pitrou, @larryhastings, @blueyed, @tarekziade, @ezio-melotti, @merwok, @akheron, @hynek PRs #22968 Dependencies bpo-4761: create Python wrappe...

X Description: BPO 4489 Nosy @loewis, @birkenfeld, @jcea, @ncoghlan, @pitrou, @larryhastings, @blueyed, @tarekziade, @ezio-melotti, @merwok, @akheron, @hynek PRs #22968 Dependencies bpo-4761: create Python wrappe...

Opengraph URL: https://github.com/python/cpython/issues/48739

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"shutil.rmtree is vulnerable to a symlink attack","articleBody":"BPO | [4489](https://bugs.python.org/issue4489)\n--- | :---\nNosy | @loewis, @birkenfeld, @jcea, @ncoghlan, @pitrou, @larryhastings, @blueyed, @tarekziade, @ezio-melotti, @merwok, @akheron, @hynek\nPRs | \u003cli\u003epython/cpython#22968\u003c/li\u003e\nDependencies | \u003cli\u003ebpo-4761: create Python wrappers for openat() and others\u003c/li\u003e\u003cli\u003ebpo-10755: Add posix.fdlistdir\u003c/li\u003e\u003cli\u003ebpo-13734: Add a generic directory walker method to avoid symlink attacks\u003c/li\u003e\u003cli\u003ebpo-14773: fwalk breaks on dangling symlinks\u003c/li\u003e\nFiles | \u003cli\u003e[shutil_patched.py](https://bugs.python.org/file12482/shutil_patched.py \"Uploaded as text/plain at 2008-12-29.08:22:51 by mrts\")\u003c/li\u003e\u003cli\u003e[issue4489_first_attempt.diff](https://bugs.python.org/file12484/issue4489_first_attempt.diff \"Uploaded as text/plain at 2008-12-29.08:30:39 by mrts\")\u003c/li\u003e\u003cli\u003e[test_issue4489.sh](https://bugs.python.org/file12485/test_issue4489.sh \"Uploaded as application/x-sh at 2008-12-29.11:15:02 by mrts\")\u003c/li\u003e\u003cli\u003e[i4489.patch](https://bugs.python.org/file20274/i4489.patch \"Uploaded as text/plain at 2011-01-05.14:27:03 by rosslagerwall\"): Initial patch and test\u003c/li\u003e\u003cli\u003e[i4489_v2.patch](https://bugs.python.org/file20277/i4489_v2.patch \"Uploaded as text/plain at 2011-01-05.16:58:16 by rosslagerwall\"): Updated patch\u003c/li\u003e\u003cli\u003e[i4489_v3.patch](https://bugs.python.org/file20279/i4489_v3.patch \"Uploaded as text/plain at 2011-01-05.18:19:22 by rosslagerwall\"): Updated patch\u003c/li\u003e\u003cli\u003e[i4489_v4.patch](https://bugs.python.org/file23261/i4489_v4.patch \"Uploaded as text/plain at 2011-09-29.19:42:55 by rosslagerwall\")\u003c/li\u003e\u003cli\u003e[rmtree-with-fwalk-v1.diff](https://bugs.python.org/file25630/rmtree-with-fwalk-v1.diff \"Uploaded as text/plain at 2012-05-18.11:30:38 by @hynek\")\u003c/li\u003e\u003cli\u003e[rmtree-with-fwalk-docs-v1.diff](https://bugs.python.org/file25631/rmtree-with-fwalk-docs-v1.diff \"Uploaded as text/plain at 2012-05-18.12:51:11 by @hynek\")\u003c/li\u003e\u003cli\u003e[rmtree-with-fwalk-v2.diff](https://bugs.python.org/file25649/rmtree-with-fwalk-v2.diff \"Uploaded as text/plain at 2012-05-20.14:05:46 by @hynek\")\u003c/li\u003e\u003cli\u003e[rmtree-with-fwalk-v3.diff](https://bugs.python.org/file25660/rmtree-with-fwalk-v3.diff \"Uploaded as text/plain at 2012-05-21.07:47:37 by @hynek\")\u003c/li\u003e\u003cli\u003e[direct_rmtree_safe.diff](https://bugs.python.org/file25935/direct_rmtree_safe.diff \"Uploaded as text/plain at 2012-06-10.20:40:03 by @loewis\")\u003c/li\u003e\u003cli\u003e[mvl-revisited-plus-docs.diff](https://bugs.python.org/file26089/mvl-revisited-plus-docs.diff \"Uploaded as text/plain at 2012-06-22.17:28:49 by @hynek\")\u003c/li\u003e\n\n\u003csup\u003e*Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.*\u003c/sup\u003e\n\n\u003cdetails\u003e\u003csummary\u003eShow more details\u003c/summary\u003e\u003cp\u003e\n\nGitHub fields:\n```python\nassignee = 'https://github.com/hynek'\nclosed_at = \u003cDate 2012-06-28.10:39:44.997\u003e\ncreated_at = \u003cDate 2008-12-02.15:42:01.840\u003e\nlabels = ['type-security', 'library', 'release-blocker']\ntitle = 'shutil.rmtree is vulnerable to a symlink attack'\nupdated_at = \u003cDate 2020-10-25.13:33:48.102\u003e\nuser = 'https://bugs.python.org/mrts'\n```\n\nbugs.python.org fields:\n```python\nactivity = \u003cDate 2020-10-25.13:33:48.102\u003e\nactor = 'blueyed'\nassignee = 'hynek'\nclosed = True\nclosed_date = \u003cDate 2012-06-28.10:39:44.997\u003e\ncloser = 'hynek'\ncomponents = ['Library (Lib)']\ncreation = \u003cDate 2008-12-02.15:42:01.840\u003e\ncreator = 'mrts'\ndependencies = ['4761', '10755', '13734', '14773']\nfiles = ['12482', '12484', '12485', '20274', '20277', '20279', '23261', '25630', '25631', '25649', '25660', '25935', '26089']\nhgrepos = []\nissue_num = 4489\nkeywords = ['patch', 'needs review']\nmessage_count = 83.0\nmessages = ['76753', '78389', '78391', '78398', '78405', '78406', '78418', '78425', '78440', '78441', '78442', '78443', '78444', '78445', '78446', '78447', '78448', '78451', '103686', '124472', '125425', '125429', '125435', '125436', '125446', '142609', '144621', '145113', '145133', '147058', '147059', '147080', '147217', '147249', '150794', '150810', '150834', '150952', '159467', '159622', '161047', '161048', '161050', '161130', '161207', '161250', '161256', '161266', '162558', '162559', '162596', '162609', '163089', '163092', '163338', '163444', '163636', '163655', '163721', '163722', '163723', '163726', '163729', '163731', '163732', '163733', '163734', '163735', '163736', '163738', '163874', '163877', '163883', '163884', '163941', '164197', '164234', '164235', '164245', '164247', '164248', '164251', '164255']\nnosy_count = 19.0\nnosy_names = ['loewis', 'georg.brandl', 'jcea', 'ncoghlan', 'pitrou', 'larry', 'blueyed', 'schmir', 'tarek', 'ezio.melotti', 'eric.araujo', 'Arfrever', 'mrts', 'neologix', 'teamnoir', 'rosslagerwall', 'python-dev', 'petri.lehtinen', 'hynek']\npr_nums = ['22968']\npriority = 'release blocker'\nresolution = 'fixed'\nstage = 'resolved'\nstatus = 'closed'\nsuperseder = None\ntype = 'security'\nurl = 'https://bugs.python.org/issue4489'\nversions = ['Python 3.3']\n```\n\n\u003c/p\u003e\u003c/details\u003e\n","author":{"url":"https://github.com/mrts","@type":"Person","name":"mrts"},"datePublished":"2008-12-02T15:42:02.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":83},"url":"https://github.com/48739/cpython/issues/48739"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:3c9c091f-3472-9b8c-9087-f4859b668a68
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD312:DC370:FC2172:155691C:6A50749C
html-safe-nonce39a7cad6d49e60ae47390e2149f9b8e59cf5252cf6ac47da8fa78d6e76eb3fc0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMzEyOkRDMzcwOkZDMjE3MjoxNTU2OTFDOjZBNTA3NDlDIiwidmlzaXRvcl9pZCI6Ijg3ODU2MzA1MDk0Mjg0MDU0MDQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac9943becea11729b85d8d1d22147ee1814829c2f580f7e057cd69f456c395889e
hovercard-subject-tagissue:1198837926
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/48739/issue_layout
twitter:imagehttps://opengraph.githubassets.com/98c8bc44ea7f18c64541a58dcb7aba762cb38c62d9afb7fa38776f678fcad768/python/cpython/issues/48739
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/98c8bc44ea7f18c64541a58dcb7aba762cb38c62d9afb7fa38776f678fcad768/python/cpython/issues/48739
og:image:altBPO 4489 Nosy @loewis, @birkenfeld, @jcea, @ncoghlan, @pitrou, @larryhastings, @blueyed, @tarekziade, @ezio-melotti, @merwok, @akheron, @hynek PRs #22968 Dependencies bpo-4761: create Python wrappe...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemrts
hostnamegithub.com
expected-hostnamegithub.com
Noned6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb
turbo-cache-controlno-preview
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7ac0ad2f2c7e4b9056617355fd9e33e22b0c8df9
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/issues/48739#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F48739
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F48739
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/48739
Reloadhttps://github.com/python/cpython/issues/48739
Reloadhttps://github.com/python/cpython/issues/48739
Please reload this pagehttps://github.com/python/cpython/issues/48739
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/issues/48739
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 34.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 73.6k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.3k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality 0 https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
shutil.rmtree is vulnerable to a symlink attackhttps://github.com/python/cpython/issues/48739#top
https://github.com/hynek
release-blockerhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22release-blocker%22
stdlibStandard Library Python modules in the Lib/ directoryhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22
type-securityA security issuehttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-security%22
on Dec 2, 2008https://github.com/python/cpython/issues/48739#issue-1198837926
4489https://bugs.python.org/issue4489
@loewishttps://github.com/loewis
@birkenfeldhttps://github.com/birkenfeld
@jceahttps://github.com/jcea
@ncoghlanhttps://github.com/ncoghlan
@pitrouhttps://github.com/pitrou
@larryhastingshttps://github.com/larryhastings
@blueyedhttps://github.com/blueyed
@tarekziadehttps://github.com/tarekziade
@ezio-melottihttps://github.com/ezio-melotti
@merwokhttps://github.com/merwok
@akheronhttps://github.com/akheron
@hynekhttps://github.com/hynek
gh-48739: tests(tests_shutil): fix comment with check_args_to_onerror #22968https://github.com/python/cpython/pull/22968
bpo-4761https://bugs.python.org/issue?@action=redirect&bpo=4761
bpo-10755https://bugs.python.org/issue?@action=redirect&bpo=10755
bpo-13734https://bugs.python.org/issue?@action=redirect&bpo=13734
bpo-14773https://bugs.python.org/issue?@action=redirect&bpo=14773
shutil_patched.pyhttps://bugs.python.org/file12482/shutil_patched.py
issue4489_first_attempt.diffhttps://bugs.python.org/file12484/issue4489_first_attempt.diff
test_issue4489.shhttps://bugs.python.org/file12485/test_issue4489.sh
i4489.patchhttps://bugs.python.org/file20274/i4489.patch
i4489_v2.patchhttps://bugs.python.org/file20277/i4489_v2.patch
i4489_v3.patchhttps://bugs.python.org/file20279/i4489_v3.patch
i4489_v4.patchhttps://bugs.python.org/file23261/i4489_v4.patch
rmtree-with-fwalk-v1.diffhttps://bugs.python.org/file25630/rmtree-with-fwalk-v1.diff
rmtree-with-fwalk-docs-v1.diffhttps://bugs.python.org/file25631/rmtree-with-fwalk-docs-v1.diff
rmtree-with-fwalk-v2.diffhttps://bugs.python.org/file25649/rmtree-with-fwalk-v2.diff
rmtree-with-fwalk-v3.diffhttps://bugs.python.org/file25660/rmtree-with-fwalk-v3.diff
direct_rmtree_safe.diffhttps://bugs.python.org/file25935/direct_rmtree_safe.diff
mvl-revisited-plus-docs.diffhttps://bugs.python.org/file26089/mvl-revisited-plus-docs.diff
hynekhttps://github.com/hynek
release-blockerhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22release-blocker%22
stdlibStandard Library Python modules in the Lib/ directoryhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22
type-securityA security issuehttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-security%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.