# code16 Sharp vulnerable to stored XSS via iframe srcdoc Attribute

High severity, published 2026-09-25. Update code16/sharp to 9.22.5 or later: composer update code16/sharp.

Canonical URL: https://buzzphp.com/security/ghsa-qxg3-46rw-79j8 · Data from GitHub as of 2026-11-25.

| | |
| --- | --- |
| Severity | high (CVSS 7.3) |
| Published | 2026-09-25 |
| Updated | 2026-09-25 |
| CVE | [CVE-2026-61823](https://nvd.nist.gov/vuln/detail/CVE-2026-61823) |
| GHSA | [GHSA-qxg3-46rw-79j8](https://github.com/advisories/GHSA-qxg3-46rw-79j8) |
| Weakness | CWE-79 |

| Package | Affected versions | Fixed in |
| --- | --- | --- |
| code16/sharp | < 9.22.5 | 9.22.5 |

## What to do

Update code16/sharp to 9.22.5 or later: composer update code16/sharp.

Check which version you run with `composer show code16/sharp`, and every affected package with `composer audit`.

## About this advisory

Impact A Stored Cross-Site Scripting (XSS) vulnerability exists in the rich text editor due to improper sanitization of the srcdoc attribute on elements.

While the underlying Symfony HtmlSanitizer correctly HTML-encodes special characters inside the attribute value (e.g., converting to &lt;script&gt;), the HTML specification mandates that browsers automatically decode HTML entities inside attribute values before processing them. As a result, any encoded JavaScript inside a srcdoc attribute is evaluated and executed as live HTML/JS in the context of the iframe when the page is rendered.



## Links

- [GHSA-qxg3-46rw-79j8 on GitHub](https://github.com/advisories/GHSA-qxg3-46rw-79j8)
- [CVE-2026-61823 on the National Vulnerability Database](https://nvd.nist.gov/vuln/detail/CVE-2026-61823)
- [All Composer security advisories](https://buzzphp.com/security)
