Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-48821

CVE-2026-48821: Shaarli DOM-Based XSS Vulnerability

CVE-2026-48821 is a DOM-based XSS flaw in Shaarli's Thumbnail Synchronizer that enables malicious code execution through unsanitized bookmark titles. This article covers technical details, affected versions, and mitigation.

Published:

CVE-2026-48821 Overview

CVE-2026-48821 is a DOM-based Cross-Site Scripting (XSS) vulnerability in Shaarli, a personal bookmarking service. The flaw affects versions 0.16.1 and earlier and resides in the Thumbnail Synchronizer feature. Malicious bookmark titles returned by the backend are inserted into the DOM through innerHTML without sanitization, executing attacker-controlled JavaScript in the administrator's browser. The vulnerability is tracked under [CWE-79] and was fixed in version 0.16.2.

Critical Impact

Successful exploitation executes JavaScript in an administrator's session, enabling session hijacking, privilege escalation, backdoor injection, and full application compromise.

Affected Products

  • Shaarli versions 0.16.1 and prior
  • ThumbnailsController::ajaxUpdate backend endpoint
  • thumbnails-update.js frontend script

Discovery Timeline

  • 2026-06-17 - CVE-2026-48821 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2026-48821

Vulnerability Analysis

The vulnerability stems from an unsafe interaction between Shaarli's backend thumbnail update endpoint and the frontend rendering logic. When an administrator triggers the thumbnail synchronization workflow, the client-side script issues AJAX requests to update bookmark thumbnails in batches. The server returns bookmark metadata, including the bookmark title, formatted through the raw formatter. This formatter does not HTML-encode field contents.

The frontend script thumbnails-update.js consumes the JSON response and writes the bookmark title directly into the progress interface using innerHTML. Because the title is neither escaped on the server nor sanitized on the client, any HTML or script payload embedded in the title becomes live DOM content. The browser parses the injected markup and executes attacker-supplied JavaScript in the administrator's authenticated context.

Exploitation requires that an attacker first place a bookmark with a malicious title into the Shaarli instance, then wait for an administrator to run the thumbnail synchronizer. The attack is local in scope and requires user interaction, but the resulting code execution runs with full administrator privileges in the application.

Root Cause

The root cause is missing output encoding. The raw formatter emits unescaped bookmark fields, and the client uses innerHTML rather than safe DOM APIs such as textContent to render those fields. Either layer alone would have prevented script execution.

Attack Vector

An attacker with the ability to create or modify a bookmark crafts a title containing an HTML payload. When an administrator runs the Thumbnail Synchronizer, the title is fetched and injected into the progress DOM, executing the payload. The attacker can then exfiltrate session tokens, modify administrator settings, or implant persistent backdoors.

No verified public exploitation code is available. See the GitHub Security Advisory GHSA-mw63-f9qj-c5h3 for technical details.

Detection Methods for CVE-2026-48821

Indicators of Compromise

  • Bookmarks whose title field contains HTML tags such as <script>, <img onerror=...>, or <svg onload=...>.
  • Unexpected outbound requests from an administrator's browser shortly after running the thumbnail synchronizer.
  • New or modified administrator accounts, API tokens, or plugin configurations following a thumbnail update.

Detection Strategies

  • Audit the Shaarli datastore for bookmark titles containing angle brackets, event handler attributes, or javascript: URIs.
  • Inspect HTTP responses from the ajaxUpdate endpoint for unescaped HTML in the title field.
  • Compare the running Shaarli version against 0.16.2 and flag any instance reporting 0.16.1 or earlier.

Monitoring Recommendations

  • Log and review all administrative actions that follow execution of the Thumbnail Synchronizer.
  • Alert on changes to Shaarli configuration files, plugin directories, and credential stores.
  • Monitor administrator browser sessions for anomalous JavaScript activity using browser security telemetry.

How to Mitigate CVE-2026-48821

Immediate Actions Required

  • Upgrade Shaarli to version 0.16.2 or later, available from the GitHub Release v0.16.2.
  • Avoid running the Thumbnail Synchronizer on vulnerable versions until the upgrade is complete.
  • Review existing bookmark titles for embedded HTML and remove suspicious entries before patching.

Patch Information

The maintainers fixed the issue in Shaarli 0.16.2. The patch escapes bookmark titles before they are returned to the client and updates the frontend rendering path to avoid unsafe DOM insertion. Refer to the GitHub Security Advisory GHSA-mw63-f9qj-c5h3 for the full advisory.

Workarounds

  • Restrict bookmark creation and editing to trusted accounts until the upgrade is applied.
  • Disable the Thumbnail Synchronizer feature on affected instances by avoiding the thumbnail update workflow.
  • Apply a strict Content Security Policy that blocks inline script execution to reduce XSS impact.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.