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-108942 Overview
CVE-2026-108942 is a cross-site scripting (XSS) vulnerability in the philz1337x clarity-upscaler project, an open-source image upscaling tool derived from AUTOMATIC1111/stable-diffusion-webui v1.7.0. The flaw resides in the create_html_for_item function of modules/ui_extra_networks.py within the Extra Networks Card Rendering component. Attackers can inject malicious script content through the Description argument, which is rendered without proper sanitization. The project uses a rolling release model, so all repository versions through commit cfbdb842c6c839c8e97741722b8cf9a4b7662d98 are affected. The upstream AUTOMATIC1111/stable-diffusion-webui project resolved the issue in v1.8.0, released March 1, 2024.
Critical Impact
Remote attackers with low privileges can execute arbitrary JavaScript in the context of a victim's browser session, enabling session theft, UI manipulation, and client-side data exfiltration from the clarity-upscaler web interface.
Affected Products
- philz1337x/clarity-upscaler — all repository versions up to and including commit cfbdb842c6c839c8e97741722b8cf9a4b7662d98
- Codebase derived from AUTOMATIC1111/stable-diffusion-webui v1.7.0
- The modules/ui_extra_networks.py component, specifically the create_html_for_item function
Discovery Timeline
- 2026-10-13 - CVE-2026-108942 published to NVD
- 2026-10-13 - Last updated in NVD database
Technical Details for CVE-2026-108942
Vulnerability Analysis
The vulnerability is a stored or reflected cross-site scripting flaw [CWE-79] in the Extra Networks card rendering pipeline. The create_html_for_item function in modules/ui_extra_networks.py constructs HTML cards describing network items such as models, embeddings, or LoRAs. User-controlled metadata supplied through the Description field is concatenated directly into the generated HTML without escaping dangerous characters. When a victim loads the Extra Networks UI, the browser parses and executes the attacker-supplied markup. The attack requires network access to the application and user interaction to view the affected card.
Root Cause
The root cause is improper neutralization of input during web page generation. The create_html_for_item function trusts the Description field from item metadata and emits it inline. No HTML entity encoding or templating-engine escape is applied before the string becomes part of the response. Any attacker who can influence item descriptions, through model card uploads, imported configuration files, or shared repositories, controls executable markup in another user's session.
Attack Vector
An authenticated attacker with low privileges supplies a crafted Description value containing JavaScript payloads such as <img> tags with onerror handlers or <script> blocks. The malicious description is persisted in the item metadata that clarity-upscaler reads at render time. When another user browses the Extra Networks tab, the vulnerable function emits the payload directly into the DOM. The script runs with the privileges of the victim's session and can exfiltrate tokens, trigger API calls against the backend, or alter the interface. Because clarity-upscaler is often deployed behind authenticated frontends that proxy generation jobs, successful exploitation can pivot to abuse of upstream inference endpoints.
No verified public exploit code is available. See the GitHub Issue #72 Discussion and the VulDB CVE-2026-108942 entry for additional context.
Detection Methods for CVE-2026-108942
Indicators of Compromise
- Extra Networks item metadata files containing HTML tags, <script> elements, or JavaScript event handlers such as onerror, onload, or onclick inside Description fields.
- Unexpected outbound HTTP requests from browser sessions that have the clarity-upscaler Extra Networks tab open.
- Model card or embedding files imported from untrusted sources with abnormally long or encoded Description values.
Detection Strategies
- Scan item metadata storage for Description values containing <, >, javascript:, or encoded equivalents such as <script.
- Deploy a Content Security Policy report-only header on the clarity-upscaler frontend and monitor violation reports for inline script execution.
- Review web server access logs for repeated loads of the Extra Networks endpoint by sessions that then issue unexpected authenticated API calls.
Monitoring Recommendations
- Alert on new or modified files under the Extra Networks data directories, particularly JSON or metadata sidecar files.
- Monitor browser telemetry on administrator workstations for script execution originating from the clarity-upscaler origin.
- Track upstream AUTOMATIC1111/stable-diffusion-webui security advisories, since clarity-upscaler inherits unpatched fixes from the v1.8.0 release line.
How to Mitigate CVE-2026-108942
Immediate Actions Required
- Restrict access to the clarity-upscaler web interface to trusted users on isolated network segments until a patch is applied.
- Audit all existing Extra Networks item metadata and remove any Description fields containing HTML or script content.
- Block imports of model, embedding, and LoRA packages from untrusted sources.
- Enforce a strict Content Security Policy that disallows inline scripts on the clarity-upscaler origin.
Patch Information
No vendor patch has been issued for philz1337x/clarity-upscaler. According to the advisory, the project was notified through an issue report but has not responded. The upstream AUTOMATIC1111/stable-diffusion-webui project fixed the equivalent issue in v1.8.0, released March 1, 2024. Operators can port the upstream fix in modules/ui_extra_networks.py to their fork, or rebase onto a current upstream release. Refer to the GitHub Clarity Upscaler Repository and the GitHub Issue #72 Discussion for status updates.
Workarounds
- Place the clarity-upscaler UI behind a reverse proxy that enforces authentication and injects a restrictive Content Security Policy.
- Modify the local create_html_for_item function to HTML-escape the Description argument before inclusion in the output, for example by routing it through html.escape().
- Disable the Extra Networks feature or hide user-supplied Description fields from rendering when the component is not required.
- Operate the service in single-user mode on localhost to eliminate the cross-user attack surface.
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

