Vulnerabilities in pkg:pypi/plone.restapi

PACKAGE
Advisory Summary

GHSA-8rqh-vxpr-x77p is a MODERATE (CVSS 4.3) cross-site scripting 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 stored xss by spoofing mime type. Remediation is available by upgrading affected packages to version 9.15.6, 10.0.1.

3 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/plone.restapi

3 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/plone.restapi. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-8rqh-vxpr-x77p - MODERATE plone.restapi: Stored XSS by spoofing mime type
GHSA-cjg3-q24h-9qwf CVE-2020-7938 HIGH Plone Privilege Escallation
GHSA-hc5c-r8m5-2gfh - LOW plone.restapi vulnerable to Stored Cross Site Scripting with SVG image in user portrait

GHSA-8rqh-vxpr-x77p at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-8rqh-vxpr-x77p
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)
Affected Product Plone.restapi
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 4.3

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

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

How to Fix GHSA-8rqh-vxpr-x77p

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.

plone.restapi fixed: 9.15.6
pip install plone.restapi>=9.15.6
plone.restapi fixed: 10.0.1
pip install plone.restapi>=10.0.1
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 plone.restapi

How to Check if You Are Affected

To determine whether your Python environment is affected by GHSA-8rqh-vxpr-x77p, 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 9.15.6), 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

### Impact A stored XSS affecting RichText fields. RichTextValue.output returns the raw, unsanitized stored value whenever the stored mimeType equals the outputMimeType. Because the safe-HTML output type (`text/x-html-safe`) is the type that signifies "already sanitized", any value whose stored mimeType equals it bypasses the safe_html transform entirely on render. The transform itself is sound — it correctly strips `on*` event-handler attributes and `javascript:/data:` URIs; the defect is that it is never invoked for these values. The unsanitized value is then emitted via `tal:content="structure ..."`, which performs no escaping, so the payload executes in the viewer's browser. This can be a problem when a RichText field is wrongly defined in code with a `mimeType` and `outputMimeType` that are the same, or when the REST API is used to the same effect. This is the same vulnerability as reported in `plone.app.textfield`: https://github.com/plone/plone.app.textfield/security/advisories/GHSA-4r4f-gg25-rmg5 ### Patches The problem has been patched: * For Plone 6.0 and 6.2, upgrade `plone.restapi` to 9.15.6. * For Plone 6.2, upgrade `plone.restapi` to 10.0.1. This will prevent abusing the REST API to store wrong rich text values. This will **not** prevent XSS from rich text fields that already have wrong values. For that, you will need a patched `plone.app.textfield` version. See the `plone.app.textfield` advisory linked above for versions. ### Workarounds There is no known workaround.

GHSA-8rqh-vxpr-x77p Affected Plone.restapi Versions

2 component(s)
Fixed Versions:
9.15.610.0.1
Product / Package Ecosystem Affected Versions Fixed Version
plone.restapi
PyPI
< 9.15.6
9.15.6
plone.restapi
PyPI
≥ 10.0.0
< 10.0.1
All 1 versions
10.0.0
10.0.1

References

Frequently Asked Questions

What is GHSA-8rqh-vxpr-x77p?
GHSA-8rqh-vxpr-x77p is a security vulnerability in Plone.restapi involving Stored XSS by spoofing mime type under CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS).
Which Plone.restapi versions are affected?
Affected versions include releases prior to 9.15.6, 10.0.1 across affected packages: plone.restapi.
What version fixes GHSA-8rqh-vxpr-x77p?
Upgrading to 9.15.6, 10.0.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is plone.restapi affected?
Yes, plone.restapi is affected in releases prior to 9.15.6, 10.0.1. Upgrade your dependency to 9.15.6, 10.0.1 or later.
What is the CVSS score of GHSA-8rqh-vxpr-x77p?
GHSA-8rqh-vxpr-x77p has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with GHSA-8rqh-vxpr-x77p?
GHSA-8rqh-vxpr-x77p is classified under CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) (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.).
How can I check PyPI dependencies for GHSA-8rqh-vxpr-x77p?
Run the dependency tree command: 'pip show plone.restapi'. 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-8rqh-vxpr-x77p",
  "modified" : "2026-07-17T18:36:34Z",
  "published" : "2026-07-17T18:36:34Z",
  "aliases" : [ ],
  "summary" : "plone.restapi: Stored XSS by spoofing mime type",
  "details" : "### Impact\n\nA stored XSS affecting RichText fields. RichTextValue.output returns the raw, unsanitized stored value whenever the stored mimeType equals the outputMimeType. Because the safe-HTML output type (`text/x-html-safe`) is the type that signifies \"already sanitized\", any value whose stored mimeType equals it bypasses the safe_html transform entirely on render. The transform itself is sound — it correctly strips `on*` event-handler attributes and `javascript:/data:` URIs; the defect is that it is never invoked for these values. The unsanitized value is then emitted via `tal:content=\"structure ...\"`, which performs no escaping, so the payload executes in the viewer's browser. \n\nThis can be a problem when a RichText field is wrongly defined in code with a `mimeType` and `outputMimeType` that are the same, or when the REST API is used to the same effect.\n\nThis is the same vulnerability as reported in `plone.app.textfield`:\nhttps://github.com/plone/plone.app.textfield/security/advisories/GHSA-4r4f-gg25-rmg5\n\n### Patches\nThe problem has been patched:\n\n* For Plone 6.0 and 6.2, upgrade `plone.restapi` to 9.15.6.\n* For Plone 6.2, upgrade `plone.restapi` to 10.0.1.\n\nThis will prevent abusing the REST API to store wrong rich text values.\n\nThis will **not** prevent XSS from rich text fields that already have wrong values.  For that, you will need a patched `plone.app.textfield` version. See the `plone.app.textfield` advisory linked above for versions.\n\n### Workarounds\nThere is no known workaround.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "plone.restapi"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "9.15.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "plone.restapi"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.0.0"
      }, {
        "fixed" : "10.0.1"
      } ]
    } ],
    "versions" : [ "10.0.0" ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/plone/plone.app.textfield/security/advisories/GHSA-4r4f-gg25-rmg5"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/plone/plone.restapi/security/advisories/GHSA-8rqh-vxpr-x77p"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/plone/plone.restapi"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-80" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-17T18:36:34Z",
    "nvd_published_at" : null
  }
}