CVE-2022-39357: Wintercms/winter Prototype Pollution Vulnerability

HIGH
Advisory Identifier: GHSA-3fh5-q6fg-w28q
CVSS 8.1
CWE-1321
Published
Advisory Summary

CVE-2022-39357 is a HIGH (CVSS 8.1) prototype pollution vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Wintercms/winter libraries in the Packagist ecosystem. The issue involves prototype pollution in snowboard framework. Remediation is available by upgrading affected packages to version 1.1.10, 1.2.1.

CVE-2022-39357 at a Glance

CVE Identifier CVE-2022-39357
GHSA Identifier GHSA-3fh5-q6fg-w28q
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Affected Product Wintercms/winter
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 8.1

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

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

How to Fix CVE-2022-39357

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

wintercms/winter fixed: 1.1.10
Upgrade wintercms/winter to 1.1.10
wintercms/winter fixed: 1.2.1
Upgrade wintercms/winter to 1.2.1
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 wintercms/winter

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-39357, inspect your project dependencies for Wintercms/winter:

inspect dependencies for wintercms/winter

Analyze the terminal output to locate any version of Wintercms/winter in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.1.10), 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-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. In Wintercms/winter, 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 The Snowboard framework in affected versions is vulnerable to prototype pollution in the main Snowboard class as well as its plugin loader. ### Patches This issue has been patched in https://github.com/wintercms/winter/commit/2a13faf99972e84c9661258f16c4750fa99d29a1 (for 1.2) and https://github.com/wintercms/winter/commit/bce4b59584abf961e9400af3d7a4fd7638e26c7f (for 1.1) and is available with Winter v1.1.10 and v1.2.1. ### Workarounds If you have not yet upgraded, or are using the 1.1 branch of Winter (1.1.8 or above), you can avoid this issue by following some common security practices for JavaScript, including implementing a [content security policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) and auditing your scripts. The 1.0 branch of Winter is not affected, as it does not contain the Snowboard framework. ### For more information If you have any questions or comments about this advisory: - Email us at [hello@wintercms.com](mailto:hello@wintercms.com)

CVE-2022-39357 Affected Wintercms/winter Versions

2 component(s)
Fixed Versions:
1.1.101.2.1
Product / Package Ecosystem Affected Versions Fixed Version
wintercms/winter
Packagist
≥ 1.1.8
< 1.1.10
1.1.10
wintercms/winter
Packagist
≥ 1.2.0
< 1.2.1
1.2.1

References

Frequently Asked Questions

What is CVE-2022-39357?
CVE-2022-39357 is a security vulnerability in Wintercms/winter involving Prototype pollution in Snowboard framework under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution').
Which Wintercms/winter versions are affected?
Affected versions include releases prior to 1.1.10, 1.2.1 across affected packages: wintercms/winter.
What version fixes CVE-2022-39357?
Upgrading to 1.1.10, 1.2.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is wintercms/winter affected?
Yes, wintercms/winter is affected in releases prior to 1.1.10, 1.2.1. Upgrade your dependency to 1.1.10, 1.2.1 or later.
What is the CVSS score of CVE-2022-39357?
CVE-2022-39357 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2022-39357?
CVE-2022-39357 is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') (The product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype.).
How can I check Packagist dependencies for CVE-2022-39357?
Run the dependency tree command: 'inspect dependencies for wintercms/winter'. 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-3fh5-q6fg-w28q",
  "modified" : "2022-10-27T18:36:42Z",
  "published" : "2022-10-27T18:36:42Z",
  "aliases" : [ "CVE-2022-39357" ],
  "summary" : "Prototype pollution in Snowboard framework",
  "details" : "### Impact\n\nThe Snowboard framework in affected versions is vulnerable to prototype pollution in the main Snowboard class as well as its plugin loader. \n\n### Patches\n\nThis issue has been patched in https://github.com/wintercms/winter/commit/2a13faf99972e84c9661258f16c4750fa99d29a1 (for 1.2) and https://github.com/wintercms/winter/commit/bce4b59584abf961e9400af3d7a4fd7638e26c7f (for 1.1) and is available with Winter v1.1.10 and v1.2.1.\n\n### Workarounds\n\nIf you have not yet upgraded, or are using the 1.1 branch of Winter (1.1.8 or above), you can avoid this issue by following some common security practices for JavaScript, including implementing a [content security policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) and auditing your scripts.\n\nThe 1.0 branch of Winter is not affected, as it does not contain the Snowboard framework.\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)\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "wintercms/winter"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.1.8"
      }, {
        "fixed" : "1.1.10"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "wintercms/winter"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.2.0"
      }, {
        "fixed" : "1.2.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/wintercms/winter/security/advisories/GHSA-3fh5-q6fg-w28q"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-39357"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wintercms/winter/commit/2a13faf99972e84c9661258f16c4750fa99d29a1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wintercms/winter/commit/bce4b59584abf961e9400af3d7a4fd7638e26c7f"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/wintercms/winter"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wintercms/winter/releases/tag/v1.1.10"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wintercms/winter/releases/tag/v1.2.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1321" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-10-27T18:36:42Z",
    "nvd_published_at" : "2022-10-26T15:15:00Z"
  }
}