CVE-2023-37269: Wintercms/winter Cross-Site Scripting Vulnerability

LOW
Advisory Identifier: GHSA-wjw2-4j7j-6gc3
CVSS 2.0
CWE-79
Published
Advisory Summary

CVE-2023-37269 is a LOW (CVSS 2.0) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Wintercms/winter libraries in the Packagist ecosystem. The issue involves winter cms stored xss through privileged upload of svg file. Remediation is available by upgrading affected packages to version 1.2.3.

CVE-2023-37269 at a Glance

CVE Identifier CVE-2023-37269
GHSA Identifier GHSA-wjw2-4j7j-6gc3
Severity LOW
CVSS v3.1 Base Score 2.0
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Wintercms/winter
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 2.0

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

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

How to Fix CVE-2023-37269

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.2.3
Upgrade wintercms/winter 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 wintercms/winter

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-37269, 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.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-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. 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 Users with the `backend.manage_branding` permission can upload SVGs as the application logo. Previously, SVG uploads were not sanitized, which could have allowed a stored XSS attack. Although this was a security issue, it's important to note that its severity is low. To exploit the vulnerability, an attacker would already need to have developer or super user level permissions in Winter CMS. This means they would already have extensive access and control within the system. Additionally, to execute the XSS, the attacker would need to convince the victim to directly visit the URL of the maliciously uploaded SVG, and the application would have to be using local storage where uploaded files are served under the same domain as the application itself instead of a CDN. This is because all SVGs in Winter CMS are rendered through an `img` tag, which prevents any payloads from being executed directly. These two factors significantly limit the potential harm of this vulnerability. That being said, all users are advised to update to the latest version (1.2.3) to ensure their systems remain secure. ### Patches This issue has been patched in v1.2.3 through the inclusion of full support for SVG uploads and automatic sanitization of uploaded SVG files. ### Workarounds Apply https://github.com/wintercms/storm/commit/186d85d8fea2cae43afc807d39f68553c24e56be & https://github.com/wintercms/winter/commit/fa50b4c7489b67ea80072f8ac9fe5294fce1df1c manually if unable to upgrade to v1.2.3.

CVE-2023-37269 Affected Wintercms/winter Versions

1 component(s)
Fixed Versions:
1.2.3
Product / Package Ecosystem Affected Versions Fixed Version
wintercms/winter
Packagist
< 1.2.3
1.2.3

References

Frequently Asked Questions

What is CVE-2023-37269?
CVE-2023-37269 is a security vulnerability in Wintercms/winter involving Winter CMS stored XSS through privileged upload of SVG file under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Wintercms/winter versions are affected?
Affected versions include releases prior to 1.2.3 across affected packages: wintercms/winter.
What version fixes CVE-2023-37269?
Upgrading to 1.2.3 (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.2.3. Upgrade your dependency to 1.2.3 or later.
What is the CVSS score of CVE-2023-37269?
CVE-2023-37269 has a CVSS v3.1 base score of 2.0 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2023-37269?
CVE-2023-37269 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check Packagist dependencies for CVE-2023-37269?
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-wjw2-4j7j-6gc3",
  "modified" : "2023-07-07T21:20:42Z",
  "published" : "2023-07-07T21:20:42Z",
  "aliases" : [ "CVE-2023-37269" ],
  "summary" : "Winter CMS stored XSS through privileged upload of SVG file",
  "details" : "### Impact\nUsers with the `backend.manage_branding` permission can upload SVGs as the application logo. Previously, SVG uploads were not sanitized, which could have allowed a stored XSS attack. \n\nAlthough this was a security issue, it's important to note that its severity is low. To exploit the vulnerability, an attacker would already need to have developer or super user level permissions in Winter CMS. This means they would already have extensive access and control within the system. Additionally, to execute the XSS, the attacker would need to convince the victim to directly visit the URL of the maliciously uploaded SVG, and the application would have to be using local storage where uploaded files are served under the same domain as the application itself instead of a CDN. This is because all SVGs in Winter CMS are rendered through an `img` tag, which prevents any payloads from being executed directly.\n\nThese two factors significantly limit the potential harm of this vulnerability. That being said, all users are advised to update to the latest version (1.2.3) to ensure their systems remain secure.\n\n### Patches\nThis issue has been patched in v1.2.3 through the inclusion of full support for SVG uploads and automatic sanitization of uploaded SVG files.\n\n### Workarounds\nApply https://github.com/wintercms/storm/commit/186d85d8fea2cae43afc807d39f68553c24e56be & https://github.com/wintercms/winter/commit/fa50b4c7489b67ea80072f8ac9fe5294fce1df1c manually if unable to upgrade to v1.2.3.\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "wintercms/winter"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.2.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/wintercms/winter/security/advisories/GHSA-wjw2-4j7j-6gc3"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-37269"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wintercms/storm/commit/186d85d8fea2cae43afc807d39f68553c24e56be"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wintercms/winter/commit/fa50b4c7489b67ea80072f8ac9fe5294fce1df1c"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/wintercms/winter"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wintercms/winter/releases/tag/v1.2.3"
  }, {
    "type" : "WEB",
    "url" : "http://packetstormsecurity.com/files/173520/WinterCMS-1.2.2-Cross-Site-Scripting.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-07-07T21:20:42Z",
    "nvd_published_at" : "2023-07-07T22:15:09Z"
  }
}