CVE-2026-54503
JSON

4.3medium

plone.app.textfield: Stored XSS by spoofing mime type

Severity
4.3medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.40% (higher than 26% of CVEs)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-4r4f-gg25-rmg5PYSEC-2026-3497

Description

plone.app.textfield provides a zope.schema-style field type called RichText for storing a value with a related MIME type. Prior to 2.0.2, 3.0.2, and 4.0.1, depending on the release line, RichTextValue.output returns an unsanitized stored RichText value when mimeType equals outputMimeType, including values that claim the text/x-html-safe output type. This equality shortcut bypasses the safe_html transform even though the transform itself correctly removes event-handler attributes and unsafe URI schemes. Equal types can result from a RichText field configured with the same mimeType and outputMimeType or from REST API input that supplies text/x-html-safe as its content type. The raw stored value is then emitted through tal:content=structure without escaping, allowing a user who can set a RichText field to store JavaScript that executes in a viewer's browser. This issue is fixed in versions 2.0.2, 3.0.2, and 4.0.1.

Affected

Product or packageVersionsReported by
plone plone.app.textfield< 2.0.2, >= 3.0.0, < 3.0.2, >= 4.0.0, < 4.0.1CVE List
plone-app-textfield (PyPI)before 2.0.2, from 3.0.0 before 3.0.2, from 4.0.0 before 4.0.1GitHub Advisory Database, PyPA Advisory Database

All scores

GitHub_M4.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
GitHub4.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
PyPA Advisory Database4.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N

Classification

CWE-80

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

plone.app.textfield provides a zope.schema-style field type called RichText for storing a value with a related MIME type. Prior to 2.0.2, 3.0.2, and 4.0.1, depending on the release line, RichTextValue.output returns an unsanitized stored RichText value when mimeType equals outputMimeType, including values that claim the text/x-html-safe output type. This equality shortcut bypasses the safe_html transform even though the transform itself correctly removes event-handler attributes and unsafe URI schemes. Equal types can result from a RichText field configured with the same mimeType and outputMimeType or from REST API input that supplies text/x-html-safe as its content type. The raw stored value is then emitted through tal:content=structure without escaping, allowing a user who can set a RichText field to store JavaScript that executes in a viewer's browser. This issue is fixed in versions 2.0.2, 3.0.2, and 4.0.1.

GitHub Advisory Database
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.

Patches

The problem has been patched:

  • For Plone 6.0, upgrade plone.app.textfield to 2.0.2.
  • For Plone 6.1, upgrade plone.app.textfield to 3.0.2.
  • For Plone 6.2, upgrade plone.app.textfield to 4.0.1.
Workarounds

There is no known workaround.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-54503 changed 2026-09-15CVE Terms of Use
GitHub Advisory DatabaseGHSA-4r4f-gg25-rmg5 changed 2026-07-23CC-BY-4.0
NVDCVE-2026-54503 changed 2026-09-30Public domain
PyPA Advisory DatabasePYSEC-2026-3497 changed 2026-07-23CC-BY-4.0