Command Injection Affecting @azure/ms-rest-nodeauth package, versions <3.0.8
Threat Intelligence
Exploit Maturity
Proof of concept
EPSS
0.04% (11th
percentile)
Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applications- Snyk ID SNYK-JS-AZUREMSRESTNODEAUTH-1245464
- published 14 Apr 2021
- disclosed 14 Apr 2021
- credit zhou, peng
Introduced: 14 Apr 2021
CVE-2021-28458 Open this link in a new tabHow to fix?
Upgrade @azure/ms-rest-nodeauth
to version 3.0.8 or higher.
Overview
@azure/ms-rest-nodeauth is an Azure Authentication library in node.js with type definitions.
Affected versions of this package are vulnerable to Command Injection via the child_process function execAz()
. This function can be injected with arbitrary OS commands. Attackers can exploit this vulnerability by calling AzureCliCredentials.setDefaultSubscription
(OS command
) from the Azure CLI.
PoC
auth = require('@azure/ms-rest-nodeauth');
auth.AzureCliCredentials.setDefaultSubscription('$(touch pzhou@shu)');
References
CVSS Scores
version 3.1