CVE-2024-31447: Shopware/core Shopware Improper Session Handling Vulnerability

MODERATE
Advisory Identifier: GHSA-5297-wrrp-rcj7
CVSS 5.3
CWE-613
Published
Advisory Summary

CVE-2024-31447 is a MODERATE (CVSS 5.3) shopware improper session handling vulnerability (CWE-613: Insufficient Session Expiration) affecting Shopware/core libraries in the Packagist ecosystem. The issue involves shopware improper session handling in store-api account logout. Remediation is available by upgrading affected packages to version 6.5.8.8, 6.6.1.0.

CVE-2024-31447 at a Glance

CVE Identifier CVE-2024-31447
GHSA Identifier GHSA-5297-wrrp-rcj7
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-613: Insufficient Session Expiration
Affected Product Shopware/core
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 5.3

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

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

How to Fix CVE-2024-31447

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

shopware/core fixed: 6.5.8.8
Upgrade shopware/core to 6.5.8.8
shopware/platform fixed: 6.5.8.8
Upgrade shopware/platform to 6.5.8.8
shopware/core fixed: 6.6.1.0
Upgrade shopware/core to 6.6.1.0
shopware/platform fixed: 6.6.1.0
Upgrade shopware/platform to 6.6.1.0
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 shopware/core

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-31447, inspect your project dependencies for Shopware/core:

inspect dependencies for shopware/core

Analyze the terminal output to locate any version of Shopware/core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.5.8.8), 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-613: Insufficient Session Expiration, where according to wasc, "insufficient session expiration is when a web site permits an attacker to reuse old session credentials or session ids for authorization.". In Shopware/core, 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

### Impact When a authentificated request is made to `POST /store-api/account/logout`, the cart will be cleared, but the User won't be logged out. This affects only the direct store-api usage, as the PHP Storefront listens additionally on `CustomerLogoutEvent` and invalidates the session additionally. ### Patches The problem has been fixed with Shopware 6.6.1.0 and 6.5.8.8. ### Workarounds When you are not able to update, you can install the latest version of the Shopware Security Plugin.

CVE-2024-31447 Affected Shopware/core Versions

4 component(s)
Fixed Versions:
6.5.8.86.6.1.0
Product / Package Ecosystem Affected Versions Fixed Version
shopware/core
Packagist
≥ 6.3.5.0
< 6.5.8.8
6.5.8.8
shopware/platform
Packagist
≥ 6.3.5.0
< 6.5.8.8
6.5.8.8
shopware/core
Packagist
≥ 6.6.0.0-rc1
< 6.6.1.0
6.6.1.0
shopware/platform
Packagist
≥ 6.6.0.0-rc1
< 6.6.1.0
6.6.1.0

References

Frequently Asked Questions

What is CVE-2024-31447?
CVE-2024-31447 is a security vulnerability in Shopware/core involving Shopware Improper Session Handling in store-api account logout under CWE-613: Insufficient Session Expiration.
Which Shopware/core versions are affected?
Affected versions include releases prior to 6.5.8.8, 6.6.1.0 across affected packages: shopware/core, shopware/platform.
What version fixes CVE-2024-31447?
Upgrading to 6.5.8.8, 6.6.1.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is shopware/core affected?
Yes, shopware/core is affected in releases prior to 6.5.8.8, 6.6.1.0. Upgrade your dependency to 6.5.8.8, 6.6.1.0 or later.
Is shopware/platform affected?
Yes, shopware/platform is affected in releases prior to 6.5.8.8, 6.6.1.0. Upgrade your dependency to 6.5.8.8, 6.6.1.0 or later.
What is the CVSS score of CVE-2024-31447?
CVE-2024-31447 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2024-31447?
CVE-2024-31447 is classified under CWE-613: Insufficient Session Expiration (According to WASC, "Insufficient Session Expiration is when a web site permits an attacker to reuse old session credentials or session IDs for authorization.").
How can I check Packagist dependencies for CVE-2024-31447?
Run the dependency tree command: 'inspect dependencies for shopware/core'. 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-5297-wrrp-rcj7",
  "modified" : "2024-04-08T18:34:00Z",
  "published" : "2024-04-08T15:48:27Z",
  "aliases" : [ "CVE-2024-31447" ],
  "summary" : "Shopware Improper Session Handling in store-api account logout",
  "details" : "### Impact\n\nWhen a authentificated request is made to `POST /store-api/account/logout`, the cart will be cleared, but the User won't be logged out. This affects only the direct store-api usage, as the PHP Storefront listens additionally on `CustomerLogoutEvent` and invalidates the session additionally. \n\n### Patches\nThe problem has been fixed with Shopware 6.6.1.0 and 6.5.8.8.\n\n### Workarounds\nWhen you are not able to update, you can install the latest version of the Shopware Security Plugin.\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "shopware/core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.3.5.0"
      }, {
        "fixed" : "6.5.8.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "shopware/platform"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.3.5.0"
      }, {
        "fixed" : "6.5.8.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "shopware/core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.6.0.0-rc1"
      }, {
        "fixed" : "6.6.1.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "shopware/platform"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.6.0.0-rc1"
      }, {
        "fixed" : "6.6.1.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/shopware/shopware/security/advisories/GHSA-5297-wrrp-rcj7"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-31447"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/shopware/shopware/commit/5cc84ddd817ad0c1d07f9b3c79ab346d50514a77"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/shopware/shopware/commit/d29775aa758f70d08e0c5999795c7c26d230e7d3"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/shopware/shopware"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-613" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-08T15:48:27Z",
    "nvd_published_at" : "2024-04-08T16:15:08Z"
  }
}