semantic-release is vulnerable to Argument Injection
59
Medium Risk
semantic-release passes the configured repositoryUrl (resolved from the repository field in package.json, the repositoryUrl option, or the git origin) directly as a positional argument to several git commands such as ls-remote, fetch, and push in lib/git.js. Because no -- separator precedes it, a repositoryUrl value beginning with - is interpreted by git as a command-line option rather than a URL, allowing argument injection. An attacker who controls the repository URL can supply options such as --upload-pack or --receive-pack to run an arbitrary binary during a release run. The fix rejects repositoryUrl values starting with - via a new EINVALIDREPOURL error and inserts -- before the URL in all affected git invocations.
You are affected if you are using a version that falls within the vulnerable range and you run semantic-release against a repository whose repositoryUrl (resolved from the repository field in package.json, the repositoryUrl option, or the git origin) is controlled by an untrusted party.
semantic-release is vulnerable to Argument Injection in versions 13.0.0 - 25.0.6.
Upgrade the semantic-release library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant