Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-61823 Overview
CVE-2026-61823 is a stored cross-site scripting (XSS) vulnerability in code16 Sharp, a Laravel-based framework for building content-management and administrative interfaces. Versions before 9.22.5 ship an HTML sanitizer that permits the srcdoc attribute on iframe elements inside the rich-text Editor field. An authenticated user with edit permissions can store a crafted iframe that executes JavaScript when another user views the content. The vulnerability maps to [CWE-79] (Improper Neutralization of Input During Web Page Generation).
Critical Impact
Successful exploitation enables session hijacking, unauthorized actions on behalf of victims, account takeover, privilege escalation, and disclosure of administrative data.
Affected Products
- code16 Sharp versions prior to 9.22.5
- Laravel applications embedding Sharp as a content-management or administrative interface
- Any Sharp deployment exposing Editor fields to authenticated users
Discovery Timeline
- 2026-09-24 - CVE-2026-61823 published to NVD
- 2026-09-30 - Last updated in NVD database
Technical Details for CVE-2026-61823
Vulnerability Analysis
Sharp's rich-text Editor field sanitizes HTML before persisting user-submitted content. The sanitizer in src/Utils/Sanitization/FormatsSanitizedValue.php includes srcdoc in the allow-list of attributes permitted on iframe elements. The sanitizer HTML-encodes markup placed inside srcdoc, which looks safe on inspection.
Browsers, however, decode attribute entities before parsing the srcdoc document. The encoded payload is reconstituted as live HTML inside the inline iframe document and executes with the parent origin's trust context. An authenticated low-privilege editor can therefore store JavaScript that runs in the browser of any user who views the record, including administrators.
Root Cause
The root cause is an incomplete sanitization allow-list that fails to account for browser decoding of srcdoc attribute values. Encoding content inside srcdoc is not equivalent to neutralizing it, because the attribute itself defines a nested HTML document that the browser decodes and parses independently.
Attack Vector
Exploitation requires network access to the Sharp admin interface, low privileges (an account with Editor-field write access), and user interaction (a victim viewing the stored content). The attacker crafts an <iframe srcdoc="..."> payload containing HTML-encoded script, submits it through an Editor field, and waits for a higher-privileged user to render the page.
// Patch excerpt - src/Utils/Sanitization/FormatsSanitizedValue.php
'referrerpolicy',
'sandbox',
'src',
- 'srcdoc',
'width',
'height',
'id',
Source: GitHub commit ec509a2. The fix removes srcdoc from the iframe attribute allow-list so sanitized output no longer carries the attribute.
Detection Methods for CVE-2026-61823
Indicators of Compromise
- Stored Editor-field content containing <iframe> elements with a srcdoc attribute.
- HTML-encoded <script> tags, javascript: URIs, or event handlers nested inside srcdoc values.
- Outbound requests from admin browser sessions to attacker-controlled domains shortly after rendering Sharp content pages.
- Unexpected administrative actions originating from legitimate authenticated sessions.
Detection Strategies
- Query the Sharp content store for records whose rich-text columns match the pattern iframe[^>]+srcdoc=.
- Enable and review Content Security Policy (CSP) violation reports from the admin interface for inline script and frame-src violations.
- Correlate authenticated editor activity with downstream privilege-sensitive actions performed by viewer accounts.
Monitoring Recommendations
- Log and alert on edits to Editor fields by low-privileged users, particularly submissions containing <iframe> markup.
- Monitor web application firewall (WAF) telemetry for request bodies carrying srcdoc payloads to Sharp admin endpoints.
- Track session anomalies such as token reuse from new IP addresses following administrative page views.
How to Mitigate CVE-2026-61823
Immediate Actions Required
- Upgrade code16 Sharp to version 9.22.5 or later on all Laravel applications embedding the framework.
- Audit stored Editor-field content for existing iframe elements carrying a srcdoc attribute and remove them.
- Review admin audit logs for suspicious actions performed by accounts that may have viewed poisoned content.
- Rotate session tokens and administrative credentials if exploitation is suspected.
Patch Information
Version 9.22.5 removes srcdoc from the permitted iframe attributes in FormatsSanitizedValue.php. See the GitHub Security Advisory GHSA-qxg3-46rw-79j8 and the upstream commit for the full fix.
Workarounds
- If upgrading is not immediately possible, add server-side logic that strips the srcdoc attribute from every iframe before storing or rendering Editor content.
- Enforce a strict Content Security Policy on the Sharp admin interface that blocks inline script execution and restricts frame-src to trusted origins.
- Restrict Editor-field write access to trusted roles until the patched version is deployed.
# Update Sharp via Composer
composer require code16/sharp:^9.22.5
composer update code16/sharp
php artisan view:clear
php artisan cache:clear
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

