CVE-2024-32003: Winter/wn dusk plugin Dusk Plugin May Allow Unfettered Vulnerability

HIGH
Advisory Identifier: GHSA-chcp-g9j5-3xxx
CVSS 8.8
CWE-269 CWE-863
Published
Advisory Summary

CVE-2024-32003 is a HIGH (CVSS 8.8) dusk plugin may allow unfettered vulnerability (CWE-269: Improper Privilege Management) affecting Winter/wn dusk plugin libraries in the Packagist ecosystem. The issue involves dusk plugin may allow unfettered user authentication in misconfigured installs. Remediation is available by upgrading affected packages to version 2.1.0.

CVE-2024-32003 at a Glance

CVE Identifier CVE-2024-32003
GHSA Identifier GHSA-chcp-g9j5-3xxx
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-269: Improper Privilege Management
Affected Product Winter/wn dusk plugin
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-32003

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

winter/wn-dusk-plugin fixed: 2.1.0
Upgrade winter/wn-dusk-plugin to 2.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 winter/wn-dusk-plugin

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-32003, inspect your project dependencies for Winter/wn dusk plugin:

inspect dependencies for winter/wn-dusk-plugin

Analyze the terminal output to locate any version of Winter/wn dusk plugin in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.1.0), 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-269: Improper Privilege Management, where the product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. In Winter/wn dusk plugin, 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

The Dusk plugin provides some special routes as part of its testing framework to allow a browser environment (such as headless Chrome) to act as a user in the Backend or User plugin without having to go through authentication. This route is `[[URL]]/_dusk/login/[[USER ID]]/[[MANAGER]]` - where `[[URL]]` is the base URL of the site, `[[USER ID]]` is the ID of the user account and `[[MANAGER]]` is the authentication manager (either `backend` for Backend, or `user` for the User plugin). If a configuration of a site using the Dusk plugin is set up in such a way that the Dusk plugin is available publicly and the test cases in Dusk are run with live data, this route may potentially be used to gain access to any user account in either the Backend or User plugin without authentication. As indicated in the [README](https://github.com/wintercms/wn-dusk-plugin/blob/main/README.md), this plugin should only be used in development and should *NOT* be used in a production instance. It is specifically recommended that the plugin be installed as a development dependency only in Composer. In order to remediate this issue, the special routes used above will now no longer be registered unless the `APP_ENV` environment variable is specifically set to `dusk`. Since Winter by default does not use this environment variable and it is not populated by default, it will only exist if Dusk's automatic configuration is used (which won't exhibit this vulnerability) or if a developer manually specifies it in their configuration. The automatic configuration performed by the Dusk plugin has also been hardened by default to use sane defaults and not allow external environment variables to leak into this configuration. ### Impact Low. This will only affect users in which the Winter CMS installation meets ALL the following criteria: - The Dusk plugin is installed in the Winter CMS instance. - The application is in production mode (ie. the `debug` config value is set to `true` in `config/app.php`). - The Dusk plugin's automatic configuration has been overridden, either by providing a custom `.env.dusk` file or by providing custom configuration in the `config/dusk` folder, or by providing configuration environment variables externally. - The environment has been configured to use production data in the database for testing, and not the temporary SQLite database that Dusk uses by default. - The application is connectable via the web. ### Patches Issue has been fixed in v2.1.0. ### For more information If you have any questions or comments about this advisory: - Email us at [hello@wintercms.com](mailto:hello@wintercms.com)

CVE-2024-32003 Affected Winter/wn dusk plugin Versions

1 component(s)
Fixed Versions:
2.1.0
Product / Package Ecosystem Affected Versions Fixed Version
winter/wn-dusk-plugin
Packagist
< 2.1.0
2.1.0

References

Frequently Asked Questions

What is CVE-2024-32003?
CVE-2024-32003 is a security vulnerability in Winter/wn dusk plugin involving Dusk plugin may allow unfettered user authentication in misconfigured installs under CWE-269: Improper Privilege Management.
Which Winter/wn dusk plugin versions are affected?
Affected versions include releases prior to 2.1.0 across affected packages: winter/wn-dusk-plugin.
What version fixes CVE-2024-32003?
Upgrading to 2.1.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is winter/wn-dusk-plugin affected?
Yes, winter/wn-dusk-plugin is affected in releases prior to 2.1.0. Upgrade your dependency to 2.1.0 or later.
What is the CVSS score of CVE-2024-32003?
CVE-2024-32003 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-32003?
CVE-2024-32003 is classified under CWE-269: Improper Privilege Management (The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor.).
How can I check Packagist dependencies for CVE-2024-32003?
Run the dependency tree command: 'inspect dependencies for winter/wn-dusk-plugin'. 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-chcp-g9j5-3xxx",
  "modified" : "2024-04-15T19:41:59Z",
  "published" : "2024-04-12T21:26:01Z",
  "aliases" : [ "CVE-2024-32003" ],
  "summary" : "Dusk plugin may allow unfettered user authentication in misconfigured installs",
  "details" : "The Dusk plugin provides some special routes as part of its testing framework to allow a browser environment (such as headless Chrome) to act as a user in the Backend or User plugin without having to go through authentication. This route is `[[URL]]/_dusk/login/[[USER ID]]/[[MANAGER]]` - where `[[URL]]` is the base URL of the site, `[[USER ID]]` is the ID of the user account and `[[MANAGER]]` is the authentication manager (either `backend` for Backend, or `user` for the User plugin).\n\nIf a configuration of a site using the Dusk plugin is set up in such a way that the Dusk plugin is available publicly and the test cases in Dusk are run with live data, this route may potentially be used to gain access to any user account in either the Backend or User plugin without authentication.\n\nAs indicated in the [README](https://github.com/wintercms/wn-dusk-plugin/blob/main/README.md), this plugin should only be used in development and should *NOT* be used in a production instance. It is specifically recommended that the plugin be installed as a development dependency only in Composer.\n\nIn order to remediate this issue, the special routes used above will now no longer be registered unless the `APP_ENV` environment variable is specifically set to `dusk`. Since Winter by default does not use this environment variable and it is not populated by default, it will only exist if Dusk's automatic configuration is used (which won't exhibit this vulnerability) or if a developer manually specifies it in their configuration.\n\nThe automatic configuration performed by the Dusk plugin has also been hardened by default to use sane defaults and not allow external environment variables to leak into this configuration.\n\n### Impact\n\nLow. This will only affect users in which the Winter CMS installation meets ALL the following criteria:\n\n- The Dusk plugin is installed in the Winter CMS instance.\n- The application is in production mode (ie. the `debug` config value is set to `true` in `config/app.php`).\n- The Dusk plugin's automatic configuration has been overridden, either by providing a custom `.env.dusk` file or by providing custom configuration in the `config/dusk` folder, or by providing configuration environment variables externally.\n- The environment has been configured to use production data in the database for testing, and not the temporary SQLite database that Dusk uses by default.\n- The application is connectable via the web.\n\n### Patches\n\nIssue has been fixed in v2.1.0.\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n- Email us at [hello@wintercms.com](mailto:hello@wintercms.com)",
  "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" : "winter/wn-dusk-plugin"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.1.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/wintercms/wn-dusk-plugin/security/advisories/GHSA-chcp-g9j5-3xxx"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-32003"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/wintercms/wn-dusk-plugin"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wintercms/wn-dusk-plugin/blob/main/README.md"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-269", "CWE-863" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-12T21:26:01Z",
    "nvd_published_at" : "2024-04-12T21:15:11Z"
  }
}