CVE-2023-42458: Zope Zope Vulnerable To Stored Cross Vulnerability

LOW
Advisory Identifier: GHSA-wm8q-9975-xh5v
CVSS 3.7
CWE-79
Published
Advisory Summary

CVE-2023-42458 is a LOW (CVSS 3.7) zope vulnerable to stored cross vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Zope libraries in the PyPI ecosystem. The issue involves zope vulnerable to stored cross site scripting with svg images. Remediation is available by upgrading affected packages to version 4.8.10, 5.8.5.

CVE-2023-42458 at a Glance

CVE Identifier CVE-2023-42458
GHSA Identifier GHSA-wm8q-9975-xh5v
Severity LOW
CVSS v3.1 Base Score 3.7
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Zope
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 3.7

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

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

How to Fix CVE-2023-42458

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

Zope fixed: 4.8.10
pip install Zope>=4.8.10
Zope fixed: 5.8.5
pip install Zope>=5.8.5
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show Zope

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2023-42458, inspect your installed packages using pip:

pip show Zope

Analyze the terminal output to locate any version of Zope in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.8.10), your application is affected.

Note: The pip show Zope command checks currently installed packages in your active Python environment.

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 Zope, 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 There is a stored cross site scripting vulnerability for SVG images. Note that an image tag with an SVG image as source is never vulnerable, even when the SVG image contains malicious code. To exploit the vulnerability, an attacker would first need to upload an image, and then trick a user into following a specially crafted link. All versions of Zope are impacted on sites that allow untrusted users to upload images. ### Patches Patches will be released in Zope 4.8.10 and 5.8.5. ### Workarounds Make sure the "Add Documents, Images, and Files" permission is only assigned to trusted roles. By default only the Manager has this permission.

CVE-2023-42458 Affected Zope Versions

2 component(s)
Fixed Versions:
4.8.105.8.5
Product / Package Ecosystem Affected Versions Fixed Version
Zope
PyPI
< 4.8.10
4.8.10
Zope
PyPI
≥ 5.8.0
< 5.8.5
5.8.5

References

Frequently Asked Questions

What is CVE-2023-42458?
CVE-2023-42458 is a security vulnerability in Zope involving Zope vulnerable to Stored Cross Site Scripting with SVG images under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Zope versions are affected?
Affected versions include releases prior to 4.8.10, 5.8.5 across affected packages: Zope.
What version fixes CVE-2023-42458?
Upgrading to 4.8.10, 5.8.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Zope affected?
Yes, Zope is affected in releases prior to 4.8.10, 5.8.5. Upgrade your dependency to 4.8.10, 5.8.5 or later.
What is the CVSS score of CVE-2023-42458?
CVE-2023-42458 has a CVSS v3.1 base score of 3.7 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2023-42458?
CVE-2023-42458 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 PyPI dependencies for CVE-2023-42458?
Run the dependency tree command: 'pip show Zope'. 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-wm8q-9975-xh5v",
  "modified" : "2023-09-21T17:05:38Z",
  "published" : "2023-09-21T17:04:09Z",
  "aliases" : [ "CVE-2023-42458" ],
  "summary" : "Zope vulnerable to Stored Cross Site Scripting with SVG images",
  "details" : "### Impact\nThere is a stored cross site scripting vulnerability for SVG images.\n\nNote that an image tag with an SVG image as source is never vulnerable, even when the SVG image contains malicious code. To exploit the vulnerability, an attacker would first need to upload an image, and then trick a user into following a specially crafted link.\n\nAll versions of Zope are impacted on sites that allow untrusted users to upload images.\n\n\n### Patches\nPatches will be released in Zope 4.8.10 and 5.8.5.\n\n### Workarounds\nMake sure the \"Add Documents, Images, and Files\" permission is only assigned to trusted roles. By default only the Manager has this permission.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Zope"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.8.10"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 4.8.9"
    }
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Zope"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.8.0"
      }, {
        "fixed" : "5.8.5"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 5.8.4"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/zopefoundation/Zope/security/advisories/GHSA-wm8q-9975-xh5v"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-42458"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zopefoundation/Zope/commit/26a55dbc301db417f47cafda6fe0f983b5690088"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zopefoundation/Zope/commit/603b0a12881c90a072a7a65e32d47ed898ce37cb"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/zopefoundation/Zope"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2023/09/22/2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-09-21T17:04:09Z",
    "nvd_published_at" : "2023-09-21T17:15:22Z"
  }
}