plone.restapi: Stored XSS by spoofing mime type
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from GitHub. Impact type from CWE-80.
Summary
### 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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | plone.restapi (PyPI) | before 9.15.6 | 9.15.6 | Patch available | GHSA-8rqh-vxpr-x77p |
| — | plone.restapi (PyPI) | 10.0.0 to before 10.0.1 | 10.0.1 | Patch available | GHSA-8rqh-vxpr-x77p |
- plone.restapi (PyPI) Vendor— Affected before 9.15.6 Fixed in 9.15.6 Patch available GHSA-8rqh-vxpr-x77p
- plone.restapi (PyPI) Vendor— Affected 10.0.0 to before 10.0.1 Fixed in 10.0.1 Patch available GHSA-8rqh-vxpr-x77p
Remediation
- Fix · GHSA-8rqh-vxpr-x77p plone.restapi (PyPI) Fixed in 9.15.6 Advisory →
- Fix · GHSA-8rqh-vxpr-x77p plone.restapi (PyPI) Fixed in 10.0.1 Advisory →
Timeline
- 2026-10-03 Threatist record created from GHSA-8rqh-vxpr-x77p
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences