PYSEC-2026-3497

See a problem?
Import Source
https://github.com/pypa/advisory-database/blob/main/vulns/plone-app-textfield/PYSEC-2026-3497.yaml
JSON Data
https://api.osv.dev/v1/vulns/PYSEC-2026-3497
Aliases
Published
2026-07-23T11:41:46.855463Z
Modified
2026-07-23T15:00:19.411920440Z
Severity
  • 4.3 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N CVSS Calculator
Summary
plone.app.textfield: Stored XSS by spoofing mime type
Details

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

Affected packages

PyPI / plone-app-textfield

Package

Name
plone-app-textfield
View open source insights on deps.dev
Purl
pkg:pypi/plone-app-textfield

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2.0.2
Introduced
3.0.0
Fixed
3.0.2
Introduced
4.0.0
Fixed
4.0.1

Affected versions

1.*
1.0b1
1.0b2
1.0b3
1.0b4
1.0b5
1.0b6
1.0b7
1.0
1.0.1
1.0.2
1.1
1.2
1.2.1
1.2.2
1.2.3
1.2.4
1.2.5
1.2.6
1.2.7
1.2.8
1.2.9
1.2.10
1.2.11
1.2.12
1.3.0
1.3.1
1.3.2
1.3.3
1.3.4
1.3.5
1.3.6
1.3.7
2.*
2.0.0
2.0.1
3.*
3.0.0
3.0.1
4.*
4.0.0

Database specific

source
"https://github.com/pypa/advisory-database/blob/main/vulns/plone-app-textfield/PYSEC-2026-3497.yaml"