CVE-2025-49013
BaseFortify
Publication date: 2025-06-09
Last updated on: 2025-06-12
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-94 | The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. |
| CWE-116 | The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved. |
| CWE-95 | The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes code syntax before using the input in a dynamic evaluation call (e.g. "eval"). |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
CVE-2025-49013 is a critical code injection vulnerability in multiple WilderForge projects caused by unsafe usage of user-controlled variables, such as `${{ github.event.review.body }}`, directly inside shell script contexts in GitHub Actions workflows. This allows a malicious actor to submit a crafted pull request review containing shell metacharacters or commands, which results in arbitrary shell code execution on the GitHub Actions runner with the permissions of the workflow. Essentially, untrusted input is evaluated as code, enabling attackers to run arbitrary commands during the CI process. [1, 2, 3]
How can this vulnerability impact me? :
This vulnerability can lead to arbitrary command execution on GitHub Actions runners with the permissions of the workflow, potentially compromising continuous integration infrastructure, leaking secrets, and tampering with build outputs. Attackers could exfiltrate sensitive data such as repository authorization tokens, which may have write access, allowing unauthorized repository changes. The impact includes high confidentiality, integrity, and availability risks to the affected projects' CI/CD pipelines and associated resources. [1, 2, 3]
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by analyzing GitHub Actions workflows for unsafe usage of user-controlled inputs directly in shell script contexts, specifically the use of expressions like `${{ github.event.review.body }}` or similar variables directly inside `run:` steps. Using CodeQL security queries for JavaScript and TypeScript workflows can help identify such injection points. There are no specific network commands to detect this vulnerability since it is related to CI workflow code. Instead, review workflow YAML files for patterns where untrusted input is interpolated directly in shell commands. For example, look for lines in workflow files containing `${{ github.event.review.body }}` or other user inputs used directly in `run:` steps. No direct shell commands are provided, but using code scanning tools like CodeQL with relevant queries is recommended. [2]
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation steps include disabling GitHub Actions workflows in affected repositories or removing the vulnerable workflows that use unsafe interpolation of user-controlled inputs. Additionally, update affected packages to patched versions as listed in the advisory. To prevent exploitation, modify workflows to avoid direct usage of `${{ github.event.review.body }}` or similar variables inside shell script contexts. Instead, assign untrusted inputs to environment variables and reference those variables safely within scripts using native shell syntax with double quotes (e.g., `echo "$BODY"`). Limit permissions of tokens like `GITHUB_TOKEN` to the minimum necessary. Use security best practices such as code scanning, Dependabot for action updates, and requiring reviewers for workflow changes. These steps reduce the risk of arbitrary code execution and protect CI infrastructure and secrets. [1, 2, 3]