Title: TarFile.extractall() doesn't properly handle UNC paths · Issue #143663 · python/cpython · GitHub
Open Graph Title: TarFile.extractall() doesn't properly handle UNC paths · Issue #143663 · python/cpython
X Title: TarFile.extractall() doesn't properly handle UNC paths · Issue #143663 · python/cpython
Description: Bug report Bug description: TarFile.extractall() does not perform path normalization before calling os.lstat(). This is an issue on Windows as the resulting path ends us using Windows-style (\\) and unix-style (/) path separators. This r...
Open Graph Description: Bug report Bug description: TarFile.extractall() does not perform path normalization before calling os.lstat(). This is an issue on Windows as the resulting path ends us using Windows-style (\\) an...
X Description: Bug report Bug description: TarFile.extractall() does not perform path normalization before calling os.lstat(). This is an issue on Windows as the resulting path ends us using Windows-style (\\) an...
Opengraph URL: https://github.com/python/cpython/issues/143663
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"TarFile.extractall() doesn't properly handle UNC paths","articleBody":"# Bug report\n\n### Bug description:\n\n`TarFile.extractall()` does not perform path normalization before calling `os.lstat()`. This is an issue on Windows as the resulting path ends us using Windows-style (`\\\\`) and unix-style (`/`) path separators. This results in the following error: `OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: '\\\\\\\\?\\\\Z:\\\\extracted\\\\double-conversion-v3.1.4.tar.gz\\\\double-conversion-3.1.4/test/cctest'`.\n\n```python\nfrom Lib import tarfile\n\n\nwith tarfile.open(r'\\\\?\\Z:\\downloads\\double-conversion-v3.1.4.tar.gz') as t:\n t.extractall(r'\\\\?\\Z:\\extracted\\double-conversion-v3.1.4.tar.gz')\n```\n\n\n### CPython versions tested on:\n\n3.13, CPython main branch\n\n### Operating systems tested on:\n\nWindows\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-143665\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/0xd6cb6d73","@type":"Person","name":"0xd6cb6d73"},"datePublished":"2026-01-10T16:29:47Z","url":"https://github.com/python/cpython/issues/143663"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:47db8ae4-aa43-91f7-459c-167201a9e410 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A4A2:65478:36E5E84:48D5887:6B020265 |
| html-safe-nonce | b8099d6dbd0d4b1e230a8d0d17816f122bd6cd329c7e715e89faa88fb4d334ba |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNEEyOjY1NDc4OjM2RTVFODQ6NDhENTg4Nzo2QjAyMDI2NSIsInZpc2l0b3JfaWQiOiI0NTA4ODM4MDM3NTY3OTYzNzQ5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 462eb2b4724b77a34a59b3c3af61efe80fc7b6300de311c9e998c5363f433aa2 |
| hovercard-subject-tag | issue:3800022676 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/143663/issue_layout |
| twitter:image | https://opengraph.githubassets.com/17957e350f660273a6893e515b08483ea35de4cf5455f8c594bc41f0bb0584d4/python/cpython/issues/143663 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/17957e350f660273a6893e515b08483ea35de4cf5455f8c594bc41f0bb0584d4/python/cpython/issues/143663 |
| og:image:alt | Bug report Bug description: TarFile.extractall() does not perform path normalization before calling os.lstat(). This is an issue on Windows as the resulting path ends us using Windows-style (\\) an... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | 0xd6cb6d73 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width