BuzzPHP
LightDarkSystem

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?

PackageAffected versionsFixed in
code16/sharp (opens in a new tab)< 9.22.59.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 audit

Advisory details

SeverityHighCVSS 7.3
Published
Updated
CVECVE-2026-61823 (opens in a new tab)
GHSAGHSA-qxg3-46rw-79j8 (opens in a new tab)
WeaknessCWE-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 &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.

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

All Composer security advisories