code16 Sharp vulnerable to stored XSS via iframe srcdoc Attribute
High severity. Published 25 September 2026. Update code16/sharp to 9.22.5 or later: composer update code16/sharp.
Which versions are affected?
| Package | Affected versions | Fixed in |
|---|---|---|
| code16/sharp (opens in a new tab) | < 9.22.5 | 9.22.5 |
What should you do?
Update every affected package you use to its fixed version, then check that nothing else in your project matches an advisory. To see which version you run, and whether anything is still affected:
composer show code16/sharp
composer auditAdvisory details
| Severity | HighCVSS 7.3 |
|---|---|
| Published | |
| Updated | |
| CVE | CVE-2026-61823 (opens in a new tab) |
| GHSA | GHSA-qxg3-46rw-79j8 (opens in a new tab) |
| Weakness | CWE-79 |
What the advisory says
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 <script>), 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.
Source: GHSA-qxg3-46rw-79j8 (opens in a new tab) in the GitHub Advisory Database (CC BY 4.0). Data from GitHub (opens in a new tab) as of .
Other recent advisories for this package
- code16/sharp: Arbitrary class instantiation through the embed_key API parameter (opens in a new tab) (medium, 12 November 2026)
- code16/sharp: Server-side request forgery through an unanchored autocomplete endpoint check (opens in a new tab) (medium, 12 November 2026)
- code16/sharp has a stored XSS via data-html-content Sanitizer Bypass (high, 25 September 2026)
- Sharp Missing Authorization Check in Quick Creation Command Endpoints (opens in a new tab) (medium, 8 July 2026)