CVE-2026-41249: Coreshop/core shop Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-q58j-g3f4-h26h
CVSS 8.2
CWE-94
Published
Advisory Summary

CVE-2026-41249 is a HIGH (CVSS 8.2) remote code execution vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Coreshop/core shop libraries in the Packagist ecosystem. The issue involves coreshop vulnerable to remote code execution (rce) via insecure `pull_request_target` configuration. Remediation is available in the latest vendor maintenance releases.

CVE-2026-41249 at a Glance

CVE Identifier CVE-2026-41249
GHSA Identifier GHSA-q58j-g3f4-h26h
Severity HIGH
CVSS v3.1 Base Score 8.2
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Coreshop/core shop
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 8.2

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-41249

To remediate this vulnerability, upgrade all affected Coreshop/core shop dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

coreshop/core-shop fixed: Latest secure release
Upgrade coreshop/core-shop to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for coreshop/core-shop

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-41249, inspect your project dependencies for Coreshop/core shop:

inspect dependencies for coreshop/core-shop

Analyze the terminal output to locate any version of Coreshop/core shop in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where 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. In Coreshop/core shop, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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: ```bash #!/bin/bash echo "=== PWNED ===" echo "whoami:" whoami ``` 4. Commit the changes and open a Pull Request against the `5.0` or `next` branch of the base repository. 5. 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`). 6. You will see the output of `whoami` (typically `runner`), proving that the arbitrary code was successfully executed in the runner's context. <img width="490" height="87" alt="スクリーンショット 2026-04-14 11 14 56" src="https://github.com/user-attachments/assets/94276033-b989-46dc-b4a1-3dafa1603235" /> **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.

CVE-2026-41249 Affected Coreshop/core shop Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
coreshop/core-shop
Packagist
5.0.0
All 1 versions
5.0.0
None specified

References

Frequently Asked Questions

What is CVE-2026-41249?
CVE-2026-41249 is a security vulnerability in Coreshop/core shop involving CoreShop Vulnerable to Remote Code Execution (RCE) via Insecure `pull_request_target` Configuration under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Coreshop/core shop versions are affected?
Affected versions include releases prior to current release patches across affected packages: coreshop/core-shop.
What version fixes CVE-2026-41249?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is coreshop/core-shop affected?
Yes, coreshop/core-shop is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2026-41249?
CVE-2026-41249 has a CVSS v3.1 base score of 8.2 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N.
What CWE is associated with CVE-2026-41249?
CVE-2026-41249 is classified under CWE-94: 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.).
How can I check Packagist dependencies for CVE-2026-41249?
Run the dependency tree command: 'inspect dependencies for coreshop/core-shop'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-q58j-g3f4-h26h",
  "modified" : "2026-06-09T11:55:16Z",
  "published" : "2026-05-14T13:18:16Z",
  "aliases" : [ "CVE-2026-41249" ],
  "summary" : "CoreShop Vulnerable to Remote Code Execution (RCE) via Insecure `pull_request_target` Configuration",
  "details" : "### 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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "coreshop/core-shop"
    },
    "versions" : [ "5.0.0" ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/coreshop/CoreShop/security/advisories/GHSA-q58j-g3f4-h26h"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-41249"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coreshop/CoreShop/commit/cc1e3f547228ec5ebfc1dc0472f9a3cc5f4137a4"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/coreshop/CoreShop"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coreshop/CoreShop/blob/5.1.0-beta.1/.github/workflows/static.yml#L14"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-14T13:18:16Z",
    "nvd_published_at" : "2026-06-04T20:16:57Z"
  }
}