Skip to content

GitHub repository RCE

Moderate
mtrezza published GHSA-6w8g-mgvv-3fcj Dec 11, 2025

Package

actions parse-community/parse-server (GitHub Actions)

Affected versions

<8.6.0-alpha.2

Patched versions

>=8.6.0-alpha.2

Description

Impact

This is not a Parse Server package vulnerability. This affects the repository's CI/CD infrastructure only, including any public GitHub forks with GitHub Actions enabled. A GitHub CI workflow is triggered in a way that grants the GitHub Actions workflow elevated permissions, giving it access to GitHub secrets and write permissions defined in the workflow that could potentially include code from a fork or lifecycle scripts.

Patches

The elevated permissions have been removed. Fixed in alpha branch as of commit 6b9f896 and in release branch as of commit e3d27fe. If you forked Parse Server in a public GitHub repository, push the latest commits to bring your forked alpha and release branches up-to-date with the parent repository.

Based on the information, logs, and permissions you provided, here is the complete bug bounty submission formatted in Markdown.

You can use this as a GitHub Issue or pull request description for parse-community/parse-server.

Security Issue

The workflow is triggered using pull_request_target. Unlike pull_request, this trigger runs in the context of the base repository, giving it access to secrets and write permissions defined in the workflow.

In the identified workflow, the process executes:

Checkout of the code (potentially including code from a fork).
Installation of dependencies via npm install (or similar commands).
The Vulnerability: Lifecycle Scripts
Because PR authors fully control package.json, they can define lifecycle scripts (such as preinstall, install, or postinstall). When npm install is run in the CI, these scripts execute automatically.

By modifying package.json in a fork, an attacker can inject arbitrary shell commands:

"scripts": {
"preinstall": "echo ____RCE_Success >&2;git${IFS}config${IFS}--list>&2;printenv | cut -d= -f1 || true>&2",
"prepare": "husky"
}

Elevated Permissions & Credential Exposure

The workflow runs with the following permissions:

contents: read
pull-requests: write
issues: write
Furthermore, the standard actions/checkout step persists the GITHUB_TOKEN in the local git configuration by default.

Impact:

Combined with the RCE, an attacker can:

Extract the GITHUB_TOKEN: As demonstrated in the logs (http.https://github.com/.extraheader=AUTHORIZATION: basic ***), the token is available in the git config.
Compromise Pull Requests/Issues: With write access, an attacker can maliciously label, close, or comment on issues/PRs to facilitate social engineering attacks or disrupt the project.
Repository Read Access: The attacker can clone the repository using the stolen credentials, accessing internal code if the repo were private (though this is open source, the context remains insecure).

Proof of Concept

A working exploit demonstration was performed to validate this vulnerability.

🔗 RCE Demonstration Link:
https://github.com/parse-community/parse-server/actions/runs/20065908328/job/57554280885?pr=9965#step:15:41

Execution Log Analysis:
The malicious preinstall script executed successfully, printing the "RCE Success" flag and dumping the git configuration, confirming that the runner is operating under the base repository's context with credentials attached.

preinstall

echo ____RCE_Success >&2;git${IFS}config${IFS}--list>&2;printenv | cut -d= -f1 || true>&2
____RCE_Success
safe.directory=*
filter.lfs.required=true
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=https://github.com/parse-community/parse-server
remote.origin.fetch=+refs/heads/:refs/remotes/origin/
gc.auto=0
http.https://github.com/.extraheader=AUTHORIZATION: basic ***
Next Steps for you
Would you like me to generate the Git diff/patch code to actually fix this vulnerability (e.g., adding --ignore-scripts or changing the trigger) so you can include it in the solution section?

fix:

The issue has been fixed in #9966. The fix has been pushed to the 2 branches that were currently affected, the alpha (default) and release branch. No other workflows use the pull_request_target trigger. The trigger was added only recently.

Reporter

Barak Haryati
Director of Product Security, JFrog
https://github.com/barakharyati

This research was conducted as part of JFrog’s Open Source and Supply Chain Security Contribution efforts. 🐸

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v4 base metrics

Exploitability Metrics
Attack Vector Network
Attack Complexity Low
Attack Requirements None
Privileges Required None
User interaction None
Vulnerable System Impact Metrics
Confidentiality Low
Integrity Low
Availability None
Subsequent System Impact Metrics
Confidentiality None
Integrity None
Availability None

CVSS v4 base metrics

Exploitability Metrics
Attack Vector: This metric reflects the context by which vulnerability exploitation is possible. This metric value (and consequently the resulting severity) will be larger the more remote (logically, and physically) an attacker can be in order to exploit the vulnerable system. The assumption is that the number of potential attackers for a vulnerability that could be exploited from across a network is larger than the number of potential attackers that could exploit a vulnerability requiring physical access to a device, and therefore warrants a greater severity.
Attack Complexity: This metric captures measurable actions that must be taken by the attacker to actively evade or circumvent existing built-in security-enhancing conditions in order to obtain a working exploit. These are conditions whose primary purpose is to increase security and/or increase exploit engineering complexity. A vulnerability exploitable without a target-specific variable has a lower complexity than a vulnerability that would require non-trivial customization. This metric is meant to capture security mechanisms utilized by the vulnerable system.
Attack Requirements: This metric captures the prerequisite deployment and execution conditions or variables of the vulnerable system that enable the attack. These differ from security-enhancing techniques/technologies (ref Attack Complexity) as the primary purpose of these conditions is not to explicitly mitigate attacks, but rather, emerge naturally as a consequence of the deployment and execution of the vulnerable system.
Privileges Required: This metric describes the level of privileges an attacker must possess prior to successfully exploiting the vulnerability. The method by which the attacker obtains privileged credentials prior to the attack (e.g., free trial accounts), is outside the scope of this metric. Generally, self-service provisioned accounts do not constitute a privilege requirement if the attacker can grant themselves privileges as part of the attack.
User interaction: This metric captures the requirement for a human user, other than the attacker, to participate in the successful compromise of the vulnerable system. This metric determines whether the vulnerability can be exploited solely at the will of the attacker, or whether a separate user (or user-initiated process) must participate in some manner.
Vulnerable System Impact Metrics
Confidentiality: This metric measures the impact to the confidentiality of the information managed by the VULNERABLE SYSTEM due to a successfully exploited vulnerability. Confidentiality refers to limiting information access and disclosure to only authorized users, as well as preventing access by, or disclosure to, unauthorized ones.
Integrity: This metric measures the impact to integrity of a successfully exploited vulnerability. Integrity refers to the trustworthiness and veracity of information. Integrity of the VULNERABLE SYSTEM is impacted when an attacker makes unauthorized modification of system data. Integrity is also impacted when a system user can repudiate critical actions taken in the context of the system (e.g. due to insufficient logging).
Availability: This metric measures the impact to the availability of the VULNERABLE SYSTEM resulting from a successfully exploited vulnerability. While the Confidentiality and Integrity impact metrics apply to the loss of confidentiality or integrity of data (e.g., information, files) used by the system, this metric refers to the loss of availability of the impacted system itself, such as a networked service (e.g., web, database, email). Since availability refers to the accessibility of information resources, attacks that consume network bandwidth, processor cycles, or disk space all impact the availability of a system.
Subsequent System Impact Metrics
Confidentiality: This metric measures the impact to the confidentiality of the information managed by the SUBSEQUENT SYSTEM due to a successfully exploited vulnerability. Confidentiality refers to limiting information access and disclosure to only authorized users, as well as preventing access by, or disclosure to, unauthorized ones.
Integrity: This metric measures the impact to integrity of a successfully exploited vulnerability. Integrity refers to the trustworthiness and veracity of information. Integrity of the SUBSEQUENT SYSTEM is impacted when an attacker makes unauthorized modification of system data. Integrity is also impacted when a system user can repudiate critical actions taken in the context of the system (e.g. due to insufficient logging).
Availability: This metric measures the impact to the availability of the SUBSEQUENT SYSTEM resulting from a successfully exploited vulnerability. While the Confidentiality and Integrity impact metrics apply to the loss of confidentiality or integrity of data (e.g., information, files) used by the system, this metric refers to the loss of availability of the impacted system itself, such as a networked service (e.g., web, database, email). Since availability refers to the accessibility of information resources, attacks that consume network bandwidth, processor cycles, or disk space all impact the availability of a system.
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

CVE ID

CVE-2025-67727

Weaknesses

No CWEs

Credits