code16 Sharp vulnerable to stored XSS via iframe srcdoc Attribute
Impact
A Stored Cross-Site Scripting (XSS) vulnerability exists in the rich text editor due to improper sanitization of the srcdoc attribute on <iframe> elements.
While the underlying Symfony HtmlSanitizer correctly HTML-encodes special characters inside the attribute value (e.g., converting <script> 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.
An attacker with permissions to edit an Editor field can inject malicious scripts to target other users viewing the content. Potential impacts include:
- Session Hijacking (stealing admin session cookies via document.cookie)
- Account Takeover & Privilege Escalation (e.g., a low-privileged editor triggering actions as an Administrator)
- Admin panel data theft
Patches
The vulnerability has been patched in version v9.22.5.
The fix explicitly removes srcdoc from the list of allowed iframe attributes in src/Utils/Sanitization/FormatsSanitizedValue.php.
Workarounds
Users who cannot upgrade immediately can manually sanitize all content of editor fields to strip srcdoc attributes.
Czego dotyczy
Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.
| Platforma | Paczka | Podatne wersje | Poprawka w wersji |
|---|---|---|---|
| Paczka Composer | code16/sharp | < 9.22.5 | 9.22.5 |
Odnośniki
- Wektor CVSS
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N- Słabość (CWE)
CWE-79- Platforma
- Composer
- Paczka
code16/sharp- Ujawniono
- 25.09.2026
- Aktualizacja
- 11.10.2026 10:22
Źródła i licencje
OSV / GitHub Advisory Database - GHSA-qxg3-46rw-79j8 - CC BY 4.0
Historia podatności: code16/sharp
Wszystkie opisane podatności tej paczki (Paczka Composer), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.
- Wszystkich wpisów
- 8
- Pierwsza → ostatnia
- 10.2025 09.2026
- Bez poprawki
- 0
- Wykorzystywana w atakach
- 0
Rozkład istotności
- Wysoka 5
- Średnia 3
Ujawnienia w latach
- 2025: 2
- 2026: 6
-
code16 Sharp vulnerable to stored XSS via iframe srcdoc Attribute ten wpis
Dowiedz się, które podatności dotyczą Twojej aplikacji
Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.