Skip to content

GHSA-8rqh-vxpr-x77p plone.restapi: Stored XSS by spoofing mime type

MediumCVSS 4.3
Published
Updated
Exploit status
No public exploit known

Description

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.

Upgrade path

2 packages: 2 fixed.

PackageAffectedFixed inStatus
pypi plone-restapi(PyPI) < 9.15.6; = 1.0.0; = 1.0a1; = 1.0a2 +279 more 9.15.6, 10.0.1 Fixed
pypi plone.restapi(PyPI) < 9.15.6; = 10.0.0 9.15.6 Fixed

Affected products

ProductAffected versionsFixed in
pypi plone-restapi(PyPI) < 9.15.6 9.15.6
pypi plone-restapi(PyPI) = 1.0.0 No fix listed
pypi plone-restapi(PyPI) = 1.0a1 No fix listed
pypi plone-restapi(PyPI) = 1.0a10 No fix listed
pypi plone-restapi(PyPI) = 1.0a11 No fix listed
pypi plone-restapi(PyPI) = 1.0a12 No fix listed
pypi plone-restapi(PyPI) = 1.0a13 No fix listed
pypi plone-restapi(PyPI) = 1.0a14 No fix listed
pypi plone-restapi(PyPI) = 1.0a15 No fix listed
pypi plone-restapi(PyPI) = 1.0a16 No fix listed
pypi plone-restapi(PyPI) = 1.0a17 No fix listed
pypi plone-restapi(PyPI) = 1.0a18 No fix listed
pypi plone-restapi(PyPI) = 1.0a19 No fix listed
pypi plone-restapi(PyPI) = 1.0a2 No fix listed
pypi plone-restapi(PyPI) = 1.0a20 No fix listed
pypi plone-restapi(PyPI) = 1.0a21 No fix listed
pypi plone-restapi(PyPI) = 1.0a22 No fix listed
pypi plone-restapi(PyPI) = 1.0a23 No fix listed
pypi plone-restapi(PyPI) = 1.0a24 No fix listed
pypi plone-restapi(PyPI) = 1.0a25 No fix listed
pypi plone-restapi(PyPI) = 1.0a3 No fix listed
pypi plone-restapi(PyPI) = 1.0a4 No fix listed
pypi plone-restapi(PyPI) = 1.0a5 No fix listed
pypi plone-restapi(PyPI) = 1.0a6 No fix listed
pypi plone-restapi(PyPI) = 1.0a7 No fix listed
Show 175 more
ProductAffected versionsFixed in
pypi plone-restapi(PyPI) = 1.0a8 No fix listed
pypi plone-restapi(PyPI) = 1.0a9 No fix listed
pypi plone-restapi(PyPI) = 1.0b1 No fix listed
pypi plone-restapi(PyPI) = 1.1.0 No fix listed
pypi plone-restapi(PyPI) = 1.2.0 No fix listed
pypi plone-restapi(PyPI) = 1.3.0 No fix listed
pypi plone-restapi(PyPI) = 1.3.1 No fix listed
pypi plone-restapi(PyPI) = 1.4.0 No fix listed
pypi plone-restapi(PyPI) = 1.4.1 No fix listed
pypi plone-restapi(PyPI) = 1.5.0 No fix listed
pypi plone-restapi(PyPI) = 1.6.0 No fix listed
pypi plone-restapi(PyPI) = 2.0.0 No fix listed
pypi plone-restapi(PyPI) = 2.0.1 No fix listed
pypi plone-restapi(PyPI) = 2.1.0 No fix listed
pypi plone-restapi(PyPI) = 2.2.0 No fix listed
pypi plone-restapi(PyPI) = 2.2.1 No fix listed
pypi plone-restapi(PyPI) = 3.0.0 No fix listed
pypi plone-restapi(PyPI) = 3.1.0 No fix listed
pypi plone-restapi(PyPI) = 3.2.0 No fix listed
pypi plone-restapi(PyPI) = 3.2.1 No fix listed
pypi plone-restapi(PyPI) = 3.2.2 No fix listed
pypi plone-restapi(PyPI) = 3.3.0 No fix listed
pypi plone-restapi(PyPI) = 3.4.0 No fix listed
pypi plone-restapi(PyPI) = 3.4.1 No fix listed
pypi plone-restapi(PyPI) = 3.4.2 No fix listed
pypi plone-restapi(PyPI) = 3.4.3 No fix listed
pypi plone-restapi(PyPI) = 3.4.4 No fix listed
pypi plone-restapi(PyPI) = 3.4.5 No fix listed
pypi plone-restapi(PyPI) = 3.5.0 No fix listed
pypi plone-restapi(PyPI) = 3.5.1 No fix listed
pypi plone-restapi(PyPI) = 3.5.2 No fix listed
pypi plone-restapi(PyPI) = 3.6.0 No fix listed
pypi plone-restapi(PyPI) = 3.7.0 No fix listed
pypi plone-restapi(PyPI) = 3.7.1 No fix listed
pypi plone-restapi(PyPI) = 3.7.2 No fix listed
pypi plone-restapi(PyPI) = 3.7.3 No fix listed
pypi plone-restapi(PyPI) = 3.7.4 No fix listed
pypi plone-restapi(PyPI) = 3.7.5 No fix listed
pypi plone-restapi(PyPI) = 3.8.0 No fix listed
pypi plone-restapi(PyPI) = 3.8.1 No fix listed
pypi plone-restapi(PyPI) = 3.9.0 No fix listed
pypi plone-restapi(PyPI) = 4.0.0 No fix listed
pypi plone-restapi(PyPI) = 4.1.0 No fix listed
pypi plone-restapi(PyPI) = 4.1.1 No fix listed
pypi plone-restapi(PyPI) = 4.1.2 No fix listed
pypi plone-restapi(PyPI) = 4.1.3 No fix listed
pypi plone-restapi(PyPI) = 4.1.4 No fix listed
pypi plone-restapi(PyPI) = 4.2.0 No fix listed
pypi plone-restapi(PyPI) = 4.3.0 No fix listed
pypi plone-restapi(PyPI) = 4.3.1 No fix listed
pypi plone-restapi(PyPI) = 4.4.0 No fix listed
pypi plone-restapi(PyPI) = 4.5.0 No fix listed
pypi plone-restapi(PyPI) = 4.5.1 No fix listed
pypi plone-restapi(PyPI) = 4.6.0 No fix listed
pypi plone-restapi(PyPI) = 5.0.0 No fix listed
pypi plone-restapi(PyPI) = 5.0.1 No fix listed
pypi plone-restapi(PyPI) = 5.0.2 No fix listed
pypi plone-restapi(PyPI) = 5.0.3 No fix listed
pypi plone-restapi(PyPI) = 5.1.0 No fix listed
pypi plone-restapi(PyPI) = 6.0.0 No fix listed
pypi plone-restapi(PyPI) = 6.1.0 No fix listed
pypi plone-restapi(PyPI) = 6.10.0 No fix listed
pypi plone-restapi(PyPI) = 6.11.0 No fix listed
pypi plone-restapi(PyPI) = 6.12.0 No fix listed
pypi plone-restapi(PyPI) = 6.13.0 No fix listed
pypi plone-restapi(PyPI) = 6.13.1 No fix listed
pypi plone-restapi(PyPI) = 6.13.2 No fix listed
pypi plone-restapi(PyPI) = 6.13.3 No fix listed
pypi plone-restapi(PyPI) = 6.13.4 No fix listed
pypi plone-restapi(PyPI) = 6.13.5 No fix listed
pypi plone-restapi(PyPI) = 6.13.6 No fix listed
pypi plone-restapi(PyPI) = 6.13.7 No fix listed
pypi plone-restapi(PyPI) = 6.13.8 No fix listed
pypi plone-restapi(PyPI) = 6.14.0 No fix listed
pypi plone-restapi(PyPI) = 6.15.0 No fix listed
pypi plone-restapi(PyPI) = 6.15.1 No fix listed
pypi plone-restapi(PyPI) = 6.2.0 No fix listed
pypi plone-restapi(PyPI) = 6.2.1 No fix listed
pypi plone-restapi(PyPI) = 6.2.2 No fix listed
pypi plone-restapi(PyPI) = 6.2.3 No fix listed
pypi plone-restapi(PyPI) = 6.2.4 No fix listed
pypi plone-restapi(PyPI) = 6.3.0 No fix listed
pypi plone-restapi(PyPI) = 6.4.0 No fix listed
pypi plone-restapi(PyPI) = 6.4.1 No fix listed
pypi plone-restapi(PyPI) = 6.5.0 No fix listed
pypi plone-restapi(PyPI) = 6.5.1 No fix listed
pypi plone-restapi(PyPI) = 6.5.2 No fix listed
pypi plone-restapi(PyPI) = 6.6.0 No fix listed
pypi plone-restapi(PyPI) = 6.6.1 No fix listed
pypi plone-restapi(PyPI) = 6.7.0 No fix listed
pypi plone-restapi(PyPI) = 6.8.0 No fix listed
pypi plone-restapi(PyPI) = 6.8.1 No fix listed
pypi plone-restapi(PyPI) = 6.9.0 No fix listed
pypi plone-restapi(PyPI) = 6.9.1 No fix listed
pypi plone-restapi(PyPI) = 7.0.0 No fix listed
pypi plone-restapi(PyPI) = 7.0.0a1 No fix listed
pypi plone-restapi(PyPI) = 7.0.0a2 No fix listed
pypi plone-restapi(PyPI) = 7.0.0a3 No fix listed
pypi plone-restapi(PyPI) = 7.0.0a4 No fix listed
pypi plone-restapi(PyPI) = 7.0.0a5 No fix listed
pypi plone-restapi(PyPI) = 7.0.0a6 No fix listed
pypi plone-restapi(PyPI) = 7.0.0b1 No fix listed
pypi plone-restapi(PyPI) = 7.0.0b2 No fix listed
pypi plone-restapi(PyPI) = 7.0.0b3 No fix listed
pypi plone-restapi(PyPI) = 7.0.0b4 No fix listed
pypi plone-restapi(PyPI) = 7.0.0b5 No fix listed
pypi plone-restapi(PyPI) = 7.0.0b6 No fix listed
pypi plone-restapi(PyPI) = 7.0.0b7 No fix listed
pypi plone-restapi(PyPI) = 7.0.0b8 No fix listed
pypi plone-restapi(PyPI) = 7.1.0 No fix listed
pypi plone-restapi(PyPI) = 7.2.0 No fix listed
pypi plone-restapi(PyPI) = 7.2.1 No fix listed
pypi plone-restapi(PyPI) = 7.3.0 No fix listed
pypi plone-restapi(PyPI) = 7.3.1 No fix listed
pypi plone-restapi(PyPI) = 7.3.2 No fix listed
pypi plone-restapi(PyPI) = 7.3.3 No fix listed
pypi plone-restapi(PyPI) = 7.3.4 No fix listed
pypi plone-restapi(PyPI) = 7.3.5 No fix listed
pypi plone-restapi(PyPI) = 7.3.7 No fix listed
pypi plone-restapi(PyPI) = 7.3.8 No fix listed
pypi plone-restapi(PyPI) = 7.4.0 No fix listed
pypi plone-restapi(PyPI) = 7.4.1 No fix listed
pypi plone-restapi(PyPI) = 7.5.0 No fix listed
pypi plone-restapi(PyPI) = 7.6.0 No fix listed
pypi plone-restapi(PyPI) = 7.7.0 No fix listed
pypi plone-restapi(PyPI) = 7.7.1 No fix listed
pypi plone-restapi(PyPI) = 7.8.0 No fix listed
pypi plone-restapi(PyPI) = 7.8.1 No fix listed
pypi plone-restapi(PyPI) = 7.8.2 No fix listed
pypi plone-restapi(PyPI) = 7.8.3 No fix listed
pypi plone-restapi(PyPI) = 7.9.0 No fix listed
pypi plone-restapi(PyPI) = 7.9.1 No fix listed
pypi plone-restapi(PyPI) = 8.0.0 No fix listed
pypi plone-restapi(PyPI) = 8.1.0 No fix listed
pypi plone-restapi(PyPI) = 8.10.0 No fix listed
pypi plone-restapi(PyPI) = 8.11.0 No fix listed
pypi plone-restapi(PyPI) = 8.12.0 No fix listed
pypi plone-restapi(PyPI) = 8.12.1 No fix listed
pypi plone-restapi(PyPI) = 8.13.0 No fix listed
pypi plone-restapi(PyPI) = 8.14.0 No fix listed
pypi plone-restapi(PyPI) = 8.15.0 No fix listed
pypi plone-restapi(PyPI) = 8.15.1 No fix listed
pypi plone-restapi(PyPI) = 8.15.2 No fix listed
pypi plone-restapi(PyPI) = 8.15.3 No fix listed
pypi plone-restapi(PyPI) = 8.16.0 No fix listed
pypi plone-restapi(PyPI) = 8.16.1 No fix listed
pypi plone-restapi(PyPI) = 8.16.2 No fix listed
pypi plone-restapi(PyPI) = 8.17.0 No fix listed
pypi plone-restapi(PyPI) = 8.18.0 No fix listed
pypi plone-restapi(PyPI) = 8.18.1 No fix listed
pypi plone-restapi(PyPI) = 8.19.0 No fix listed
pypi plone-restapi(PyPI) = 8.2.0 No fix listed
pypi plone-restapi(PyPI) = 8.20.0 No fix listed
pypi plone-restapi(PyPI) = 8.21.0 No fix listed
pypi plone-restapi(PyPI) = 8.21.1 No fix listed
pypi plone-restapi(PyPI) = 8.21.2 No fix listed
pypi plone-restapi(PyPI) = 8.22.0 No fix listed
pypi plone-restapi(PyPI) = 8.23.0 No fix listed
pypi plone-restapi(PyPI) = 8.24.0 No fix listed
pypi plone-restapi(PyPI) = 8.24.1 No fix listed
pypi plone-restapi(PyPI) = 8.25.0 No fix listed
pypi plone-restapi(PyPI) = 8.25.1 No fix listed
pypi plone-restapi(PyPI) = 8.26.0 No fix listed
pypi plone-restapi(PyPI) = 8.27.0 No fix listed
pypi plone-restapi(PyPI) = 8.28.0 No fix listed
pypi plone-restapi(PyPI) = 8.29.0 No fix listed
pypi plone-restapi(PyPI) = 8.3.0 No fix listed
pypi plone-restapi(PyPI) = 8.3.1 No fix listed
pypi plone-restapi(PyPI) = 8.3.2 No fix listed
pypi plone-restapi(PyPI) = 8.30.0 No fix listed
pypi plone-restapi(PyPI) = 8.30.1.dev0 No fix listed
pypi plone-restapi(PyPI) = 8.31.0 No fix listed
pypi plone-restapi(PyPI) = 8.32.0 No fix listed
pypi plone-restapi(PyPI) = 8.32.1 No fix listed
pypi plone-restapi(PyPI) = 8.32.2 No fix listed

References