GHSA-8rqh-vxpr-x77p
GHSA-8rqh-vxpr-x77p · plone.restapi: Stored XSS by spoofing mime type
This page contains facts from public vulnerability sources. Check the original advisory before updating.
### 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.
CVSS 4.3 · Medium · Fix available
- Published
- Updated
Stack: python
Affected products and versions
plone-restapi PyPI
- Versions
- 1.0.0
- 1.0a1
- 1.0a10
- 1.0a11
- 1.0a12
- 1.0a13
- 1.0a14
- 1.0a15
- 1.0a16
- 1.0a17
- 1.0a18
- 1.0a19
- 1.0a2
- 1.0a20
- 1.0a21
- 1.0a22
- 1.0a23
- 1.0a24
- 1.0a25
- 1.0a3
- 1.0a4
- 1.0a5
- 1.0a6
- 1.0a7
- 1.0a8
- 1.0a9
- 1.0b1
- 1.1.0
- 1.2.0
- 1.3.0
- 1.3.1
- 1.4.0
- 1.4.1
- 1.5.0
- 1.6.0
- 2.0.0
- 2.0.1
- 2.1.0
- 2.2.0
- 2.2.1
- 3.0.0
- 3.1.0
-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.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.2.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.3.0
- 8.3.1
- 8.3.2
- 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
- 8.32.4.dev0
- 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.4.0
- 8.4.1
- 8.4.2.dev0
- 8.40.0
- 8.41.0
- 8.42.0
- 8.42.1
- 8.43.0
- 8.43.1
- 8.43.2
- 8.43.3
- 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
- 9.0.0
- 9.1.0
- 9.1.1
- 9.1.2
- 9.10.0
- 9.11.0
- 9.12.0
- 9.13.0
- 9.13.1
- 9.13.2
- 9.13.3
- 9.13.4
- 9.13.5
- 9.14.0
- 9.15.0
- 9.15.1
- 9.15.2
- 9.15.3
- 9.15.4
- 9.15.5
- 9.2.0
- 9.2.1
- 9.3.0
- 9.4.0
- 9.4.1
- 9.4.2
- 9.5.0
- 9.6.0
- 9.6.1
- 9.7.0
- 9.7.1
- 9.7.2
- 9.8.0
- 9.8.1
- 9.8.2
- 9.8.3
- 9.8.4
- 9.8.5
- 9.9.0
- Affected ranges
- ECOSYSTEM: < 9.15.6
Update to 9.15.6
plone-restapi PyPI
- Versions
- 10.0.0
- Affected ranges
- ECOSYSTEM: ≥ 10.0.0, < 10.0.1
Update to 10.0.1