René's URL Explorer Experiment


Title: Update dependency tar to v6.1.9 [SECURITY] by renovate[bot] · Pull Request #482 · sourcegraph/sourcegraph-typescript · GitHub

Open Graph Title: Update dependency tar to v6.1.9 [SECURITY] by renovate[bot] · Pull Request #482 · sourcegraph/sourcegraph-typescript

X Title: Update dependency tar to v6.1.9 [SECURITY] by renovate[bot] · Pull Request #482 · sourcegraph/sourcegraph-typescript

Description: This PR contains the following updates: Package Change Age Adoption Passing Confidence tar 6.0.1 -> 6.1.9 Test plan: CI should pass with updated dependencies. No review required: this is an automated dependency update PR. GitHub Vulnerability Alerts CVE-2021-32803 Impact Arbitrary File Creation, Arbitrary File Overwrite, Arbitrary Code Execution node-tar aims to guarantee that any file whose location would be modified by a symbolic link is not extracted. This is, in part, achieved by ensuring that extracted directories are not symlinks. Additionally, in order to prevent unnecessary stat calls to determine whether a given path is a directory, paths are cached when directories are created. This logic was insufficient when extracting tar files that contained both a directory and a symlink with the same name as the directory. This order of operations resulted in the directory being created and added to the node-tar directory cache. When a directory is present in the directory cache, subsequent calls to mkdir for that directory are skipped. However, this is also where node-tar checks for symlinks occur. By first creating a directory, and then replacing that directory with a symlink, it was thus possible to bypass node-tar symlink checks on directories, essentially allowing an untrusted tar file to symlink into an arbitrary location and subsequently extracting arbitrary files into that location, thus allowing arbitrary file creation and overwrite. This issue was addressed in releases 3.2.3, 4.4.15, 5.0.7 and 6.1.2. Patches 3.2.3 || 4.4.15 || 5.0.7 || 6.1.2 Workarounds Users may work around this vulnerability without upgrading by creating a custom filter method which prevents the extraction of symbolic links. const tar = require('tar') tar.x({ file: 'archive.tgz', filter: (file, entry) => { if (entry.type === 'SymbolicLink') { return false } else { return true } } }) Users are encouraged to upgrade to the latest patch versions, rather than attempt to sanitize tar input themselves. CVE-2021-32804 Impact Arbitrary File Creation, Arbitrary File Overwrite, Arbitrary Code Execution node-tar aims to prevent extraction of absolute file paths by turning absolute paths into relative paths when the preservePaths flag is not set to true. This is achieved by stripping the absolute path root from any absolute file paths contained in a tar file. For example /home/user/.bashrc would turn into home/user/.bashrc. This logic was insufficient when file paths contained repeated path roots such as ////home/user/.bashrc. node-tar would only strip a single path root from such paths. When given an absolute file path with repeating path roots, the resulting path (e.g. ///home/user/.bashrc) would still resolve to an absolute path, thus allowing arbitrary file creation and overwrite. Patches 3.2.2 || 4.4.14 || 5.0.6 || 6.1.1 NOTE: an adjacent issue CVE-2021-32803 affects this release level. Please ensure you update to the latest patch levels that address CVE-2021-32803 as well if this adjacent issue affects your node-tar use case. Workarounds Users may work around this vulnerability without upgrading by creating a custom onentry method which sanitizes the entry.path or a filter method which removes entries with absolute paths. const path = require('path') const tar = require('tar') tar.x({ file: 'archive.tgz', // either add this function... onentry: (entry) => { if (path.isAbsolute(entry.path)) { entry.path = sanitizeAbsolutePathSomehow(entry.path) entry.absolute = path.resolve(entry.path) } }, // or this one filter: (file, entry) => { if (path.isAbsolute(entry.path)) { return false } else { return true } } }) Users are encouraged to upgrade to the latest patch versions, rather than attempt to sanitize tar input themselves. CVE-2021-37701 Impact Arbitrary File Creation, Arbitrary File Overwrite, Arbitrary Code Execution node-tar aims to guarantee that any file whose location would be modified by a symbolic link is not extracted. This is, in part, achieved by ensuring that extracted directories are not symlinks. Additionally, in order to prevent unnecessary stat calls to determine whether a given path is a directory, paths are cached when directories are created. This logic was insufficient when extracting tar files that contained both a directory and a symlink with the same name as the directory, where the symlink and directory names in the archive entry used backslashes as a path separator on posix systems. The cache checking logic used both \ and / characters as path separators, however \ is a valid filename character on posix systems. By first creating a directory, and then replacing that directory with a symlink, it was thus possible to bypass node-tar symlink checks on directories, essentially allowing an untrusted tar file to symlink into an arbitrary location and subsequently extracting arbitrary files into that location, thus allowing arbitrary file creation and overwrite. Additionally, a similar confusion could arise on case-insensitive filesystems. If a tar archive contained a directory at FOO, followed by a symbolic link named foo, then on case-insensitive file systems, the creation of the symbolic link would remove the directory from the filesystem, but not from the internal directory cache, as it would not be treated as a cache hit. A subsequent file entry within the FOO directory would then be placed in the target of the symbolic link, thinking that the directory had already been created. These issues were addressed in releases 4.4.16, 5.0.8 and 6.1.7. The v3 branch of node-tar has been deprecated and did not receive patches for these issues. If you are still using a v3 release we recommend you update to a more recent version of node-tar. If this is not possible, a workaround is available below. Patches 4.4.16 || 5.0.8 || 6.1.7 Workarounds Users may work around this vulnerability without upgrading by creating a custom filter method which prevents the extraction of symbolic links. const tar = require('tar') tar.x({ file: 'archive.tgz', filter: (file, entry) => { if (entry.type === 'SymbolicLink') { return false } else { return true } } }) Users are encouraged to upgrade to the latest patched versions, rather than attempt to sanitize tar input themselves. Fix The problem is addressed in the following ways: All paths are normalized to use / as a path separator, replacing \ with / on Windows systems, and leaving \ intact in the path on posix systems. This is performed in depth, at every level of the program where paths are consumed. Directory cache pruning is performed case-insensitively. This may result in undue cache misses on case-sensitive file systems, but the performance impact is negligible. Caveat Note that this means that the entry objects exposed in various parts of tar's API will now always use / as a path separator, even on Windows systems. This is not expected to cause problems, as / is a valid path separator on Windows systems, but may result in issues if entry.path is compared against a path string coming from some other API such as fs.realpath() or path.resolve(). Users are encouraged to always normalize paths using a well-tested method such as path.resolve() before comparing paths to one another. CVE-2021-37713 Impact Arbitrary File Creation, Arbitrary File Overwrite, Arbitrary Code Execution node-tar aims to guarantee that any file whose location would be outside of the extraction target directory is not extracted. This is, in part, accomplished by sanitizing absolute paths of entries within the archive, skipping archive entries that contain .. path portions, and resolving the sanitized paths against the extraction target directory. This logic was insufficient on Windows systems when extracting tar files that contained a path that was not an absolute path, but specified a drive letter different from the extraction target, such as C:some\path. If the drive letter does not match the extraction target, for example D:\extraction\dir, then the result of path.resolve(extractionDirectory, entryPath) would resolve against the current working directory on the C: drive, rather than the extraction target directory. Additionally, a .. portion of the path could occur immediately after the drive letter, such as C:../foo, and was not properly sanitized by the logic that checked for .. within the normalized and split portions of the path. This only affects users of node-tar on Windows systems. Patches 4.4.18 || 5.0.10 || 6.1.9 Workarounds There is no reasonable way to work around this issue without performing the same path normalization procedures that node-tar now does. Users are encouraged to upgrade to the latest patched versions of node-tar, rather than attempt to sanitize paths themselves. Fix The fixed versions strip path roots from all paths prior to being resolved against the extraction target folder, even if such paths are not "absolute". Additionally, a path starting with a drive letter and then two dots, like c:../, would bypass the check for .. path portions. This is checked properly in the patched versions. Finally, a defense in depth check is added, such that if the entry.absolute is outside of the extraction taret, and we are not in preservePaths:true mode, a warning is raised on that entry, and it is skipped. Currently, it is believed that this check is redundant, but it did catch some oversights in development. CVE-2021-37712 Impact Arbitrary File Creation, Arbitrary File Overwrite, Arbitrary Code Execution node-tar aims to guarantee that any file whose location would be modified by a symbolic link is not extracted. This is, in part, achieved by ensuring that extracted directories are not symlinks. Additionally, in order to prevent unnecessary stat calls to determine whether a given path is a directory, paths are cached when directories are created. This logic was insufficient when extracting tar files that contained two directories and a symlink with names containing unicode values that normalized to the same value. Additionally, on Windows systems, long path portions would resolve to the same file system entities as their 8.3 "short path" counterparts. A specially crafted tar archive could thus include directories with two forms of the path that resolve to the same file system entity, followed by a symbolic link with a name in the first form, lastly followed by a file using the second form. It led to bypassing node-tar symlink checks on directories, essentially allowing an untrusted tar file to symlink into an arbitrary location and subsequently extracting arbitrary files into that location, thus allowing arbitrary file creation and overwrite. The v3 branch of node-tar has been deprecated and did not receive patches for these issues. If you are still using a v3 release we recommend you update to a more recent version of node-tar. If this is not possible, a workaround is available below. Patches 6.1.9 || 5.0.10 || 4.4.18 Workarounds Users may work around this vulnerability without upgrading by creating a custom filter method which prevents the extraction of symbolic links. const tar = require('tar') tar.x({ file: 'archive.tgz', filter: (file, entry) => { if (entry.type === 'SymbolicLink') { return false } else { return true } } }) Users are encouraged to upgrade to the latest patched versions, rather than attempt to sanitize tar input themselves. Fix The problem is addressed in the following ways, when comparing paths in the directory cache and path reservation systems: The String.normalize('NFKD') method is used to first normalize all unicode to its maximally compatible and multi-code-point form. All slashes are normalized to / on Windows systems (on posix systems, \ is a valid filename character, and thus left intact). When a symbolic link is encountered on Windows systems, the entire directory cache is cleared. Collisions related to use of 8.3 short names to replace directories with other (non-symlink) types of entries may make archives fail to extract properly, but will not result in arbitrary file writes. Release Notes npm/node-tar v6.1.9 Compare Source v6.1.8 Compare Source v6.1.7 Compare Source v6.1.6 Compare Source v6.1.5 Compare Source v6.1.4 Compare Source v6.1.3 Compare Source v6.1.2 Compare Source v6.1.1 Compare Source v6.1.0 Compare Source v6.0.5 Compare Source v6.0.4 Compare Source v6.0.3 Compare Source v6.0.2 Compare Source Configuration 📅 Schedule: Branch creation - "" in timezone America/Los_Angeles, 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, click this checkbox. This PR has been generated by Mend Renovate. View repository job log here.

Open Graph Description: This PR contains the following updates: Package Change Age Adoption Passing Confidence tar 6.0.1 -> 6.1.9 Test plan: CI should pass with updated dependencies. No review required: t...

X Description: This PR contains the following updates: Package Change Age Adoption Passing Confidence tar 6.0.1 -> 6.1.9 Test plan: CI should pass with updated dependencies. No review require...

Opengraph URL: https://github.com/sourcegraph/sourcegraph-typescript/pull/482

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:7521b6b6-7047-0c9f-c390-7c7d95ee10a6
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCF0E:CC1A4:F9F29A:13EA142:6B010EC6
html-safe-nonce5986985488705c98180294882791f3e8d33bb325a6abe4ce99a92170bb223e9e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRjBFOkNDMUE0OkY5RjI5QToxM0VBMTQyOjZCMDEwRUM2IiwidmlzaXRvcl9pZCI6IjQ4OTYzNjI5NjM3NzE5MjAwNzAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac766df86825dd335e08e7afb568f0f6ccb3febaaceee370ebb31a1ad85ab25714
hovercard-subject-tagpull_request:807566975
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/sourcegraph/sourcegraph-typescript/pull/482/files
twitter:imagehttps://avatars.githubusercontent.com/in/2740?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/in/2740?s=400&v=4
og:image:altThis PR contains the following updates: Package Change Age Adoption Passing Confidence tar 6.0.1 -> 6.1.9 Test plan: CI should pass with updated dependencies. No review required: t...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/sourcegraph/sourcegraph-typescript git https://github.com/sourcegraph/sourcegraph-typescript.git
octolytics-dimension-user_id3979584
octolytics-dimension-user_loginsourcegraph
octolytics-dimension-repository_id155401150
octolytics-dimension-repository_nwosourcegraph/sourcegraph-typescript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id155401150
octolytics-dimension-repository_network_root_nwosourcegraph/sourcegraph-typescript
turbo-body-classeslogged-out env-production page-responsive
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/sourcegraph/sourcegraph-typescript/pull/482/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsourcegraph%2Fsourcegraph-typescript%2Fpull%2F482%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsourcegraph%2Fsourcegraph-typescript%2Fpull%2F482%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=sourcegraph%2Fsourcegraph-typescript
Reloadhttps://github.com/sourcegraph/sourcegraph-typescript/pull/482/files
Reloadhttps://github.com/sourcegraph/sourcegraph-typescript/pull/482/files
Reloadhttps://github.com/sourcegraph/sourcegraph-typescript/pull/482/files
sourcegraphhttps://github.com/sourcegraph
sourcegraph-typescripthttps://github.com/sourcegraph/sourcegraph-typescript
Codehttps://github.com/sourcegraph/sourcegraph-typescript
Issues7 (7)https://github.com/sourcegraph/sourcegraph-typescript/issues
Pull requests59 (59)https://github.com/sourcegraph/sourcegraph-typescript/pulls
Actionshttps://github.com/sourcegraph/sourcegraph-typescript/actions
Security and qualityhttps://github.com/sourcegraph/sourcegraph-typescript/security
Insightshttps://github.com/sourcegraph/sourcegraph-typescript/insights
renovatehttps://github.com/apps/renovate
masterhttps://github.com/sourcegraph/sourcegraph-typescript/tree/master
renovate/npm-tar-vulnerabilityhttps://github.com/sourcegraph/sourcegraph-typescript/tree/renovate/npm-tar-vulnerability
Conversation 1 https://github.com/sourcegraph/sourcegraph-typescript/pull/482
Commits 1 https://github.com/sourcegraph/sourcegraph-typescript/pull/482/commits
Checks 0 https://github.com/sourcegraph/sourcegraph-typescript/pull/482/checks
Files changed https://github.com/sourcegraph/sourcegraph-typescript/pull/482/files
Please reload this pagehttps://github.com/sourcegraph/sourcegraph-typescript/pull/482/files
Update dependency tar to v6.1.9 [SECURITY] https://github.com/sourcegraph/sourcegraph-typescript/pull/482/files#top
Show all changes 1 commit https://github.com/sourcegraph/sourcegraph-typescript/pull/482/files
cb3e2fb Update dependency tar to v6.1.9 [SECURITY] renovate-bot May 5, 2022 https://github.com/sourcegraph/sourcegraph-typescript/pull/482/commits/cb3e2fba0edaa9ed3fc5537db712d0f84f7665b6
Clear filters https://github.com/sourcegraph/sourcegraph-typescript/pull/482/files
Please reload this pagehttps://github.com/sourcegraph/sourcegraph-typescript/pull/482/files
Please reload this pagehttps://github.com/sourcegraph/sourcegraph-typescript/pull/482/files
yarn.lockhttps://github.com/sourcegraph/sourcegraph-typescript/pull/482/files#diff-51e4f558fae534656963876761c95b83b6ef5da5103c4adef6768219ed76c2de
View file https://github.com/sourcegraph/sourcegraph-typescript/blob/cb3e2fba0edaa9ed3fc5537db712d0f84f7665b6/yarn.lock
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sourcegraph/sourcegraph-typescript/pull/482/{{ revealButtonHref }}
https://github.com/sourcegraph/sourcegraph-typescript/pull/482/files#diff-51e4f558fae534656963876761c95b83b6ef5da5103c4adef6768219ed76c2de
https://github.com/sourcegraph/sourcegraph-typescript/pull/482/files#diff-51e4f558fae534656963876761c95b83b6ef5da5103c4adef6768219ed76c2de
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.