CVE-2026-61823: code16 Sharp vulnerable to stored XSS via iframe srcdoc Attribute
code16 Sharp is a Laravel-based framework for building content-management and administrative interfaces. Versions before 9.22.5 contain a stored cross-site scripting vulnerability in the rich-text editor because the HTML sanitizer permits the srcdoc attribute on iframe elements. Although markup inside srcdoc is HTML-encoded during sanitization, browsers decode attribute entities before interpreting the iframe document, allowing an authenticated user with permission to edit an Editor field to store executable JavaScript that runs when another user views the content. Successful exploitation can result in session hijacking, unauthorized actions, account takeover, privilege escalation, or disclosure of administrative data. Version 9.22.5 patches the vulnerability by removing srcdoc from the permitted iframe attributes. As a workaround, applications that cannot upgrade should manually sanitize all Editor field content and remove every iframe srcdoc attribute before storing or rendering it.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
code16 Sharpto a version that resolves this vulnerability.Fixed in 9.22.5 - Compensating control
For applications that cannot upgrade, manually sanitize all Editor field content and remove every iframe srcdoc attribute before storing or rendering it.
Event History
Frequently Asked Questions
Who can exploit this issue, and who is at risk from the stored payload?
An authenticated user who has permission to edit an Editor field can store the malicious content. The payload executes when another user views that content, which can expose higher-privileged users such as administrators to session hijacking, unauthorized actions, account takeover, privilege escalation, or administrative-data disclosure.
What configuration condition makes an application vulnerable?
The issue affects Sharp versions before 9.22.5 when rich-text Editor field content can include iframe elements with a srcdoc attribute. The vulnerable sanitizer permits that attribute, and browser entity decoding causes the encoded srcdoc markup to be interpreted as an iframe document.
What should be done if an upgrade cannot be applied immediately?
Manually sanitize all Editor field content and remove every iframe srcdoc attribute before the content is stored or rendered. Upgrade to version 9.22.5 when possible, as it removes srcdoc from the permitted iframe attributes.