The azure-functions-core-tools npm package currently depends on:
extract-zip version 2.0.1 is affected by the recently published and GitHub-reviewed security advisory:
Advisory:
GHSA-jmr9-qjv8-65gv
The vulnerability relates to insufficient validation of symlink targets during ZIP extraction, which can allow paths outside the intended extraction directory to be referenced when processing a maliciously crafted archive.
Usage in Azure Functions Core Tools
extract-zip is not simply an unused/transitive dependency in Core Tools.
The npm installation script directly imports it:
const extract = require('extract-zip');
and uses it during postinstall to extract the downloaded Azure Functions Core Tools archive:
extract(file.path, { dir: installPath })
The archive is currently downloaded from the Microsoft Functions CDN before being extracted.
As a result, vulnerability/SCA scanners report azure-functions-core-tools installations as containing a High-severity vulnerable dependency.
Current limitation
At the time of writing, there is no patched version of extract-zip available, so simply upgrading the dependency is not currently possible.
extract-zip@2.0.1 also appears to be several years old and there has not yet been a subsequent npm release containing a fix.
Suggested options
Would the Azure Functions Core Tools team consider one of the following?
- Track and upgrade to a patched
extract-zip release if/when one becomes available.
- Replace
extract-zip with an actively maintained ZIP extraction library that performs appropriate path/symlink validation.
- Implement additional validation around extraction in Core Tools as a temporary mitigation.
- If the practical exploitability is considered sufficiently constrained because Core Tools only extracts archives retrieved from Microsoft's controlled CDN, document that assessment and any compensating controls so consumers have an authoritative response for SCA/security findings.
The fourth option would be particularly useful for organisations where security policy blocks builds or developer tooling when a High-severity dependency is detected, even where the application's actual usage may substantially reduce exploitability.
Additional context
This affects the npm distribution of Azure Functions Core Tools and can be observed through standard dependency/SCA scanning of:
azure-functions-core-tools
└── extract-zip@2.0.1
Given that there is currently no upstream patched version, it would be helpful to understand Microsoft's recommended mitigation and whether replacement of extract-zip is being considered.
The
azure-functions-core-toolsnpm package currently depends on:extract-zipversion 2.0.1 is affected by the recently published and GitHub-reviewed security advisory:<= 2.0.1Advisory:
GHSA-jmr9-qjv8-65gv
The vulnerability relates to insufficient validation of symlink targets during ZIP extraction, which can allow paths outside the intended extraction directory to be referenced when processing a maliciously crafted archive.
Usage in Azure Functions Core Tools
extract-zipis not simply an unused/transitive dependency in Core Tools.The npm installation script directly imports it:
and uses it during
postinstallto extract the downloaded Azure Functions Core Tools archive:The archive is currently downloaded from the Microsoft Functions CDN before being extracted.
As a result, vulnerability/SCA scanners report
azure-functions-core-toolsinstallations as containing a High-severity vulnerable dependency.Current limitation
At the time of writing, there is no patched version of
extract-zipavailable, so simply upgrading the dependency is not currently possible.extract-zip@2.0.1also appears to be several years old and there has not yet been a subsequent npm release containing a fix.Suggested options
Would the Azure Functions Core Tools team consider one of the following?
extract-ziprelease if/when one becomes available.extract-zipwith an actively maintained ZIP extraction library that performs appropriate path/symlink validation.The fourth option would be particularly useful for organisations where security policy blocks builds or developer tooling when a High-severity dependency is detected, even where the application's actual usage may substantially reduce exploitability.
Additional context
This affects the npm distribution of Azure Functions Core Tools and can be observed through standard dependency/SCA scanning of:
Given that there is currently no upstream patched version, it would be helpful to understand Microsoft's recommended mitigation and whether replacement of
extract-zipis being considered.