{"id":"CVE-2026-41249","aliases":["CVE-2026-41249","GHSA-q58j-g3f4-h26h"],"related":[],"kind":"vulnerability","state":"published","title":"CoreShop Vulnerable to Remote Code Execution (RCE) via Insecure `pull_request_target` Configuration","summary":"CoreShop is a Pimcore enhanced eCommerce solution. In versions 5.0.1 through 5.1.0-beta.1,, 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. As of time of publication, `pull_request_target` is still in the file.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"CoreShop is a Pimcore enhanced eCommerce solution. In versions 5.0.1 through 5.1.0-beta.1,, 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. As of time of publication, `pull_request_target` is still in the file.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nThe 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.\nThis 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.\n\n**Steps to Reproduce:**\n1. Fork the target repository.\n2. In the forked repository, modify a file that satisfies the `paths` condition (e.g., `src/dummy.php` or `composer.json`) to trigger the workflow.\n3. Modify the `bin/console` file (which is executed in the workflow steps) with the following malicious payload:\n```bash\n#!/bin/bash\necho \"=== PWNED ===\"\necho \"whoami:\"\nwhoami\n```\n4. Commit the changes and open a Pull Request against the `5.0` or `next` branch of the base repository.\n5. 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`).\n6. You will see the output of `whoami` (typically `runner`), proving that the arbitrary code was successfully executed in the runner's context.\n\n<img width=\"490\" height=\"87\" alt=\"スクリーンショット 2026-04-14 11 14 56\" src=\"https://github.com/user-attachments/assets/94276033-b989-46dc-b4a1-3dafa1603235\" />\n\n\n**Impact:**\nBecause `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.\n\n**Recommended Mitigation:**\nDo not checkout untrusted PR code (`head.ref`) when using `pull_request_target` if the code will be built or executed.\nConsider adopting a separated architecture using the `workflow_run` event:\n1. Use the `pull_request` event to safely run the build/tests in an unprivileged sandbox and upload artifacts.\n2. Use the `workflow_run` event (which is privileged) to download the artifacts and perform actions requiring secrets.","format":"markdown","source":"ghsa"},{"lang":"es","text":"CoreShop es una solución de comercio electrónico mejorada de Pimcore. En las versiones 5.0.1 hasta 5.1.0-beta.1, el flujo de trabajo de GitHub Actions (.github/workflows/static.yml) utiliza el disparador pull_request_target pero, de forma peligrosa, extrae el código no verificado de la cabecera de la solicitud de extracción (ref: ${{ github.event.pull_request.head.ref }}). Posteriormente, ejecuta un script (bin/console) desde esta extracción no confiable. Esto permite a cualquier atacante externo lograr Ejecución Remota de Código (RCE) en el ejecutor de GitHub Actions simplemente enviando una solicitud de extracción maliciosa. También conocida como vulnerabilidad 'Pwn Request'. En el momento de la publicación, pull_request_target todavía está en el archivo.","source":"nvd"}],"published":"2026-05-14T13:18:16.000Z","modified":"2026-10-06T22:10:00.247Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N","score":8.2,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N","score":8.2,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N","score":8.2,"rating":"HIGH"}],"cwes":["CWE-94"],"affected":[{"ranges":[{"version":">= 5.0.1, <= 5.1.0-beta.1","status":"affected"}],"vendor":"coreshop","product":"CoreShop","source":"cvelist"},{"ranges":[{"version":"5.0.0","status":"affected"}],"ecosystem":"Packagist","package":"coreshop/core-shop","purl":"pkg:composer/coreshop/core-shop","source":"ghsa"}],"references":[{"url":"https://github.com/coreshop/CoreShop/security/advisories/GHSA-q58j-g3f4-h26h","tags":["exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/coreshop/CoreShop/commit/cc1e3f547228ec5ebfc1dc0472f9a3cc5f4137a4","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/coreshop/CoreShop/blob/5.1.0-beta.1/.github/workflows/static.yml#L14","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-41249","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/coreshop/CoreShop","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2026-06-08T19:14:42.867Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-41249","url":"https://www.cve.org/CVERecord?id=CVE-2026-41249","licence":"CVE Terms of Use","modified":"2026-06-08T19:15:02.639Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-q58j-g3f4-h26h","url":"https://github.com/advisories/GHSA-q58j-g3f4-h26h","licence":"CC-BY-4.0","modified":"2026-09-10T03:51:06.807Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-41249","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-41249","licence":"Public domain","modified":"2026-10-06T22:10:00.247Z"}],"updatedAt":"2026-11-25T22:59:23.724Z","epss":{"score":0.00549,"percentile":0.47379,"date":"2026-12-02T12:00:21.000Z"}}