GHSA-hc5c-r8m5-2gfh: Plone.restapi Plone.restapi Vulnerable To Stored Cross Vulnerability
LOWGHSA-hc5c-r8m5-2gfh is a LOW (CVSS 3.7) plone.restapi vulnerable to stored cross vulnerability (CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)) affecting Plone.restapi libraries in the PyPI ecosystem. The issue involves plone.restapi vulnerable to stored cross site scripting with svg image in user portrait. Remediation is available by upgrading affected packages to version 8.43.3.
GHSA-hc5c-r8m5-2gfh at a Glance
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).
How to Fix GHSA-hc5c-r8m5-2gfh
To remediate this vulnerability, upgrade all affected Plone.restapi dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install plone.restapi>=8.43.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show plone.restapi
How to Check if You Are Affected
To determine whether your Python environment is affected by GHSA-hc5c-r8m5-2gfh, inspect your installed packages using pip:
pip show plone.restapi
Analyze the terminal output to locate any version of Plone.restapi in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 8.43.3), your application is affected.
Note: The pip show plone.restapi command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS), where the product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special characters such as "<", ">", and "&" that could be interpreted as web-scripting elements when they are sent to a downstream component that processes web pages. In Plone.restapi, 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
GHSA-hc5c-r8m5-2gfh Affected Plone.restapi Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
plone.restapi
|
PyPI |
≥ 8.0.0
< 8.43.3
|
8.43.3
|
References
Frequently Asked Questions
What is GHSA-hc5c-r8m5-2gfh?
Which Plone.restapi versions are affected?
What version fixes GHSA-hc5c-r8m5-2gfh?
Is plone.restapi affected?
What is the CVSS score of GHSA-hc5c-r8m5-2gfh?
What CWE is associated with GHSA-hc5c-r8m5-2gfh?
How can I check PyPI dependencies for GHSA-hc5c-r8m5-2gfh?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hc5c-r8m5-2gfh",
"modified" : "2023-09-21T17:16:44Z",
"published" : "2023-09-21T17:16:44Z",
"aliases" : [ ],
"summary" : "plone.restapi vulnerable to Stored Cross Site Scripting with SVG image in user portrait",
"details" : "### Impact\nThere is a stored cross site scripting vulnerability for SVG images uploaded in user portraits.\n\nNote 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.\n\n### Patches\nA 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.\n\nIn `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](https://github.com/zopefoundation/Zope/security/advisories/GHSA-wm8q-9975-xh5v). These two vulnerabilities share the same CVE: CVE-2023-42458.\n\n### Workarounds\nYou 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.",
"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" : "plone.restapi"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.0.0"
}, {
"fixed" : "8.43.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/plone/plone.restapi/security/advisories/GHSA-hc5c-r8m5-2gfh"
}, {
"type" : "WEB",
"url" : "https://github.com/zopefoundation/Zope/security/advisories/GHSA-wm8q-9975-xh5v"
}, {
"type" : "WEB",
"url" : "https://github.com/plone/plone.restapi/commit/5f44c23ac69db7d6d933d77f177e07603cf05f8b"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/plone/plone.restapi"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79", "CWE-80" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2023-09-21T17:16:44Z",
"nvd_published_at" : null
}
}