GHSA-CHCP-G9J5-3XXX
Vulnerability from github – Published: 2024-04-12 21:26 – Updated: 2024-04-15 19:41The 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, 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
debugconfig value is set totrueinconfig/app.php). - The Dusk plugin's automatic configuration has been overridden, either by providing a custom
.env.duskfile or by providing custom configuration in theconfig/duskfolder, 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
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "winter/wn-dusk-plugin"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.1.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2024-32003"
],
"database_specific": {
"cwe_ids": [
"CWE-269",
"CWE-863"
],
"github_reviewed": true,
"github_reviewed_at": "2024-04-12T21:26:01Z",
"nvd_published_at": "2024-04-12T21:15:11Z",
"severity": "HIGH"
},
"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\u0027s automatic configuration is used (which won\u0027t 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\u0027s 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)",
"id": "GHSA-chcp-g9j5-3xxx",
"modified": "2024-04-15T19:41:59Z",
"published": "2024-04-12T21:26:01Z",
"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"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Dusk plugin may allow unfettered user authentication in misconfigured installs"
}
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.