GHSA-hc5c-r8m5-2gfh

Suggest an improvement
Source
https://github.com/advisories/GHSA-hc5c-r8m5-2gfh
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/09/GHSA-hc5c-r8m5-2gfh/GHSA-hc5c-r8m5-2gfh.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-hc5c-r8m5-2gfh
Published
2023-09-21T17:16:44Z
Modified
2024-12-04T05:31:44.457329Z
Severity
  • 3.7 (Low) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:N CVSS Calculator
Summary
plone.restapi vulnerable to Stored Cross Site Scripting with SVG image in user portrait
Details

Impact

There is a stored cross site scripting vulnerability for SVG images uploaded in user portraits.

Note that a page that uses 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 SVG image as user portrait, and then trick a user into following a link to this portrait.

Patches

A patch will be released in plone.restapi 8.43.3. This version is good for Plone 6.0, and for Plone 5.2 on Python 3.

In plone.restapi 7 or earlier there was no @portrait endpoint yet, so there is nothing to fix in that version. It is still vulnerable to this attack, and needs a fix in Zope 4. These two vulnerabilities share the same CVE: CVE-2023-42458.

Workarounds

You could remove the portrait field from the member data schema, and possibly remove all portraits that are already in the database, but this seems a bit drastic.

Database specific
{
    "nvd_published_at": null,
    "cwe_ids": [
        "CWE-79",
        "CWE-80"
    ],
    "severity": "LOW",
    "github_reviewed": true,
    "github_reviewed_at": "2023-09-21T17:16:44Z"
}
References

Affected packages

PyPI / plone-restapi

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
8.0.0
Fixed
8.43.3

Affected versions

8.*

8.0.0
8.1.0
8.2.0
8.3.0
8.3.1
8.3.2
8.4.0
8.4.1
8.4.2.dev0
8.5.0
8.6.0
8.6.1
8.7.0
8.7.1
8.8.0
8.8.1
8.9.0
8.9.1
8.10.0
8.11.0
8.12.0
8.12.1
8.13.0
8.14.0
8.15.0
8.15.1
8.15.2
8.15.3
8.16.0
8.16.1
8.16.2
8.17.0
8.18.0
8.18.1
8.19.0
8.20.0
8.21.0
8.21.1
8.21.2
8.22.0
8.23.0
8.24.0
8.24.1
8.25.0
8.25.1
8.26.0
8.27.0
8.28.0
8.29.0
8.30.0
8.30.1.dev0
8.31.0
8.32.0
8.32.1
8.32.2
8.32.3
8.32.4.dev0
8.32.4
8.32.5
8.32.6
8.33.0
8.33.1
8.33.2
8.33.3
8.33.4.dev0
8.34.0
8.35.0
8.35.1
8.35.2
8.35.3
8.36.0
8.36.1
8.37.0
8.38.0
8.39.0
8.39.1
8.39.2
8.40.0
8.41.0
8.42.0
8.42.1
8.43.0
8.43.1
8.43.2