Skip to content

CoreShop Vulnerable to Remote Code Execution (RCE) via Insecure `pull_request_target` Configuration

High severity GitHub Reviewed Published May 13, 2026 in coreshop/CoreShop • Updated May 14, 2026

Package

composer coreshop/core-shop (Composer)

Affected versions

= 5.0.0

Patched versions

None

Description

Summary

The GitHub Actions workflow (.github/workflows/static.yml) uses the pull_request_target trigger but dangerously checks out the unverified code from the pull request head (ref: ${{ github.event.pull_request.head.ref }}). Subsequently, it executes a script (bin/console) from this untrusted checkout.
This allows any external attacker to achieve Remote Code Execution (RCE) on the GitHub Actions runner simply by submitting a malicious Pull Request. Also known as a "Pwn Request" vulnerability.

Steps to Reproduce:

  1. Fork the target repository.
  2. In the forked repository, modify a file that satisfies the paths condition (e.g., src/dummy.php or composer.json) to trigger the workflow.
  3. Modify the bin/console file (which is executed in the workflow steps) with the following malicious payload:
#!/bin/bash
echo "=== PWNED ==="
echo "whoami:"
whoami
  1. Commit the changes and open a Pull Request against the 5.0 or next branch of the base repository.
  2. The Static Tests workflow will trigger automatically. Navigate to the Actions tab and inspect the logs for the Validate YAML (or any step executing bin/console).
  3. You will see the output of whoami (typically runner), proving that the arbitrary code was successfully executed in the runner's context.

スクリーンショット 2026-04-14 11 14 56

Impact:
Because pull_request_target runs in the context of the base repository, the runner has access to repository secrets (e.g., PIMCORE_SECRET, PIMCORE_PRODUCT_KEY) loaded in the environment. An attacker can exfiltrate these secrets, modify repository contents (if the token has write permissions), or abuse the runner's computing resources.

Recommended Mitigation:
Do not checkout untrusted PR code (head.ref) when using pull_request_target if the code will be built or executed.
Consider adopting a separated architecture using the workflow_run event:

  1. Use the pull_request event to safely run the build/tests in an unprivileged sandbox and upload artifacts.
  2. Use the workflow_run event (which is privileged) to download the artifacts and perform actions requiring secrets.

References

@dpfaffenbauer dpfaffenbauer published to coreshop/CoreShop May 13, 2026
Published to the GitHub Advisory Database May 14, 2026
Reviewed May 14, 2026
Last updated May 14, 2026

Severity

High

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 v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
Low
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N

EPSS score

Weaknesses

Improper Control of Generation of Code ('Code Injection')

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. Learn more on MITRE.

CVE ID

CVE-2026-41249

GHSA ID

GHSA-q58j-g3f4-h26h

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.