CVE-2024-23648: Pimcore/admin ui classic bundle Host Header Injection Vulnerability

HIGH
Advisory Identifier: GHSA-mrqg-mwh7-q94j
CVSS 8.8
CWE-74
Published
Advisory Summary

CVE-2024-23648 is a HIGH (CVSS 8.8) host header injection vulnerability (CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')) affecting Pimcore/admin ui classic bundle libraries in the Packagist ecosystem. The issue involves host header injection in the password reset. Remediation is available by upgrading affected packages to version 1.2.3.

CVE-2024-23648 at a Glance

CVE Identifier CVE-2024-23648
GHSA Identifier GHSA-mrqg-mwh7-q94j
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
Affected Product Pimcore/admin ui classic bundle
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 8.8

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:R/S:U/C:H/I:H/A:H).

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

How to Fix CVE-2024-23648

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

pimcore/admin-ui-classic-bundle fixed: 1.2.3
Upgrade pimcore/admin-ui-classic-bundle to 1.2.3
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 pimcore/admin-ui-classic-bundle

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-23648, inspect your project dependencies for Pimcore/admin ui classic bundle:

inspect dependencies for pimcore/admin-ui-classic-bundle

Analyze the terminal output to locate any version of Pimcore/admin ui classic bundle in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.3), 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-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'), where the product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. In Pimcore/admin ui classic bundle, 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 password reset functionality sends to the the user requesting a password change an email containing an URL to reset its password. The URL sent contains a unique token, valid during 24 hours, allowing the user to reset its password. This token is highly sensitive ; as an attacker able to retrieve it would be able to resets the user's password. It was identified during the audit that the reset-password URL is crafted using the "Host" HTTP header of the request sent to request a password reset. This way, an external attacker could send password requests for users, but specify a "Host" header of a website that they control. If the user receiving the mail clicks on the link, the attacker would retrieve the reset token of the victim and perform account takeover. ### Details This attack required the server to serve Pimcore on arbitrary "Host". This configuration would be plausible if the attacker is already behind the reverse proxy. During the assessment of my client, their instance was accepting any Host header, and they did not received security recommendations that they should restrict this while installing Pimcore. From what I understood of Pimcore, the vulnerability is in the "admin-ui-classic-bundle", in the file src/Controller/Admin/UserController.php. The following screenshots provide evidences of the vulnerability. The environment of the test is : dockerized Pimcore v11.1.1 on default configuration (https://pimcore.com/docs/platform/Pimcore/Getting_Started/Installation/Docker_Based_Installation/). ### PoC ![image](https://user-images.githubusercontent.com/1197252/286258644-a3ad6993-babc-4673-bed3-ffeefe2e7f92.png) ![image](https://user-images.githubusercontent.com/1197252/286258657-bc0075b9-e62c-4f29-bb5f-95227b3f53c0.png) ### Remediation Create a variable that sets the server host. Don't enable password reset functionality while this variable is not set ; or make sure that the administrator knows what they are doing. I believe that just documenting that the server should not serve on any Host would not be enough to enforce a remediation to this vulnerability. The Snipe-IT project managed this same issue by creating a "APP_ALLOW_INSECURE_HOSTS" variable, and retrieving the app absolute URL from a config file :[ https://github.com/snipe/snipe-it/commit/0c4768fd2a11ac26a61814cef23a71061bfd8bcc](https://github.com/snipe/snipe-it/commit/0c4768fd2a11ac26a61814cef23a71061bfd8bcc) ### Impact Could lead to a 1-click account takeover

CVE-2024-23648 Affected Pimcore/admin ui classic bundle Versions

1 component(s)
Fixed Versions:
1.2.3
Product / Package Ecosystem Affected Versions Fixed Version
pimcore/admin-ui-classic-bundle
Packagist
< 1.2.3
1.2.3

References

Frequently Asked Questions

What is CVE-2024-23648?
CVE-2024-23648 is a security vulnerability in Pimcore/admin ui classic bundle involving Host header injection in the password reset under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection').
Which Pimcore/admin ui classic bundle versions are affected?
Affected versions include releases prior to 1.2.3 across affected packages: pimcore/admin-ui-classic-bundle.
What version fixes CVE-2024-23648?
Upgrading to 1.2.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pimcore/admin-ui-classic-bundle affected?
Yes, pimcore/admin-ui-classic-bundle is affected in releases prior to 1.2.3. Upgrade your dependency to 1.2.3 or later.
What is the CVSS score of CVE-2024-23648?
CVE-2024-23648 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2024-23648?
CVE-2024-23648 is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.).
How can I check Packagist dependencies for CVE-2024-23648?
Run the dependency tree command: 'inspect dependencies for pimcore/admin-ui-classic-bundle'. 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-mrqg-mwh7-q94j",
  "modified" : "2024-01-24T20:54:49Z",
  "published" : "2024-01-24T20:54:49Z",
  "aliases" : [ "CVE-2024-23648" ],
  "summary" : "Host header injection in the password reset",
  "details" : "### Summary\n\nThe password reset functionality sends to the the user requesting a password change an email containing an URL to reset its password.\n\nThe URL sent contains a unique token, valid during 24 hours, allowing the user to reset its password.\nThis token is highly sensitive ; as an attacker able to retrieve it would be able to resets the user's password.\n\nIt was identified during the audit that the reset-password URL is crafted using the \"Host\" HTTP header of the request sent to request a password reset.\n\nThis way, an external attacker could send password requests for users, but specify a \"Host\" header of a website that they control.\nIf the user receiving the mail clicks on the link, the attacker would retrieve the reset token of the victim and perform account takeover.\n\n### Details\n\nThis attack required the server to serve Pimcore on arbitrary \"Host\". This configuration would be plausible if the attacker is already behind the reverse proxy.\nDuring the assessment of my client, their instance was accepting any Host header, and they did not received security recommendations that they should restrict this while installing Pimcore.\n\nFrom what I understood of Pimcore, the vulnerability is in the \"admin-ui-classic-bundle\", in the file src/Controller/Admin/UserController.php.\n\nThe following screenshots provide evidences of the vulnerability. The environment of the test is : dockerized Pimcore v11.1.1 on default configuration (https://pimcore.com/docs/platform/Pimcore/Getting_Started/Installation/Docker_Based_Installation/).\n\n### PoC\n![image](https://user-images.githubusercontent.com/1197252/286258644-a3ad6993-babc-4673-bed3-ffeefe2e7f92.png)\n![image](https://user-images.githubusercontent.com/1197252/286258657-bc0075b9-e62c-4f29-bb5f-95227b3f53c0.png)\n\n### Remediation\nCreate a variable that sets the server host.\nDon't enable password reset functionality while this variable is not set ; or make sure that the administrator knows what they are doing.\n\nI believe that just documenting that the server should not serve on any Host would not be enough to enforce a remediation to this vulnerability.\n\nThe Snipe-IT project managed this same issue by creating a \"APP_ALLOW_INSECURE_HOSTS\" variable, and retrieving the app absolute URL from a config file :[ https://github.com/snipe/snipe-it/commit/0c4768fd2a11ac26a61814cef23a71061bfd8bcc](https://github.com/snipe/snipe-it/commit/0c4768fd2a11ac26a61814cef23a71061bfd8bcc)\n\n### Impact\nCould lead to a 1-click account takeover\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "pimcore/admin-ui-classic-bundle"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.2.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/pimcore/admin-ui-classic-bundle/security/advisories/GHSA-mrqg-mwh7-q94j"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-23648"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pimcore/admin-ui-classic-bundle/commit/70f2205b5a5ea9584721d4f3e803f4d0dd5e4655"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pimcore/admin-ui-classic-bundle"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-74" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-01-24T20:54:49Z",
    "nvd_published_at" : "2024-01-24T18:15:08Z"
  }
}