GHSA-vj3q-vp3g-j9c8: XSS

Published Sep 25, 2026
·
Updated

Impact The vulnerability allows an attacker to bypass the HTML sanitizer by using the data-html-content attribute in the content of a SharpEditorFormField.

Patches The field must now explicitly configure SharpFormEditorField::RAWHTML in the toolbar to keep this behavior. When using the RAWHTML button, the application using code16/sharp must sanitize manually the content coming from the field. Vulnerability has been patched in version 9.22.5.

Workarounds Sanitize every contents of editors manually (e.g. using Symfony/HtmlSanitizer)

Affected Software

1 affected componentFixes available
composer/code16/sharp<9.22.5
9.22.5

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/code16/sharp to a version that resolves this vulnerability.

    Fixed in 9.22.5
  2. Upgrade

    Upgrade code16/sharp to a version that resolves this vulnerability.

    Fixed in 9.22.5
  3. Configuration

    Explicitly configure SharpFormEditorField::RAW_HTML in the toolbar to retain this behavior.

    SharpFormEditorField toolbar = RAW_HTML
  4. Compensating control

    When using the RAW_HTML button, manually sanitize all content coming from the field, including every editor's contents, using Symfony/HtmlSanitizer.

Event History

Sep 25, 2026
Advisory Published
via GitHub·03:00 PM
Data Sourced
via GitHub·03:00 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Who is exposed to this issue?

Applications using code16/sharp that render content from SharpEditorFormField are exposed if untrusted users can submit or influence editor content. The issue can lead to cross-site scripting when malicious HTML bypasses the field's sanitizer.

2

What does an attacker need to exploit it?

An attacker needs low-privileged access and user interaction, as indicated by the provided CVSS vector. They would need to place a payload using the data-html-content attribute in SharpEditorFormField content and have it rendered to a victim.

3

Are patched versions affected by default?

Version 9.22.5 contains the patch. After the change, retaining raw HTML behavior requires explicitly configuring SharpFormEditorField::RAW_HTML in the toolbar; applications that enable it must manually sanitize field content.

4

What can be done if upgrading is not immediately possible?

Manually sanitize all editor content before rendering or storing it, for example with Symfony/HtmlSanitizer. This is the documented workaround for installations that cannot immediately apply the patch.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203