# GHSA-VJ3Q-VP3G-J9C8: code16/sharp has a stored XSS via data-html-content Sanitizer Bypass

- Database: GitHub
- Severity: high (stated by ghsa, no CVSS score)
- Published: 2026-09-25
- Modified: 2026-09-25

## Tracked as

- [CVE-2026-61825](https://cve.now/CVE-2026-61825.md): code16/sharp has a stored XSS via data-html-content Sanitizer Bypass

## Affected versions

- code16/sharp (Packagist): fixed in 9.22.5

## Description

### 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::RAW_HTML` in the toolbar to keep this behavior. **When using the  `RAW_HTML` 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)

## References

- https://github.com/code16/sharp/security/advisories/GHSA-vj3q-vp3g-j9c8
- https://nvd.nist.gov/vuln/detail/CVE-2026-61825
- https://github.com/code16/sharp/commit/ec509a22c808a5bd9dfad6a0a85c92ce6f411e21
- https://github.com/code16/sharp

Page: https://cve.now/GHSA-VJ3Q-VP3G-J9C8

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
