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

Not scored Published

Stored XSS in Plone REST API allows attackers to execute scripts in viewers' browsers via unsanitized RichText fields.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is GHSA-8rqh-vxpr-x77p?

GHSA-8rqh-vxpr-x77p is a cross-site scripting vulnerability in plone-restapi, published on 17 Jul 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official 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.

Which versions are affected by GHSA-8rqh-vxpr-x77p?

4 open source packages ship an affected version, including plone-restapi and plone.restapi.

PackageAffectedFixed in
plone-restapi PyPIAll versions9.15.6
plone-restapi PyPIFrom 10.0.010.0.1
plone.restapi PyPIAll versions9.15.6
plone.restapi PyPIFrom 10.0.010.0.1

How do I fix GHSA-8rqh-vxpr-x77p?

Upgrade plone-restapi to a fixed version for your release line: 9.15.6 or 10.0.1.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is GHSA-8rqh-vxpr-x77p being exploited?

There is no known exploitation of GHSA-8rqh-vxpr-x77p in the wild and no public exploit code.

Sources

Is GHSA-8rqh-vxpr-x77p in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free