Skip to main content

Shaarli CVE-2026-48821

MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-06-17 GitHub_M
5.8
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Plant malicious bookmark title in Shaarli DB
  2. Delivery
    Admin triggers Thumbnail Synchronizer
  3. Exploit
    Backend returns raw unescaped title in AJAX JSON
  4. Execution
    thumbnails-update.js injects payload via innerHTML
  5. Persist
    XSS payload executes in admin browser
  6. Impact
    Exfiltrate session cookie or inject backdoor

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires two concrete preconditions: first, a malicious bookmark title containing an XSS payload must be present in the Shaarli bookmark database - this could be introduced by any user account with bookmark creation privileges or via bulk import of external bookmark data. Second, a Shaarli administrator must actively invoke the Thumbnail Synchronizer feature (the AJAX thumbnail update process), which is a non-default, manually triggered administrative operation. Exploitation is therefore NOT possible against passive browsing of the application; it is gated on the admin's deliberate use of this specific feature. Scope is unchanged (S:U), meaning the XSS executes within the admin's existing browser session and does not cross to other systems directly. Exploitation is limited to: Shaarli instances running version ≤ 0.16.1, deployments where untrusted or semi-trusted users can add bookmarks or where bookmark data is imported from external sources, and sessions where an administrator has reason to run thumbnail synchronization. Single-user personal instances where the administrator controls all bookmark input face self-XSS risk only.

Impact

Real-world risk is moderate but contextually serious for Shaarli deployments. The CVSS 3.1 base score of 5.8 (AV:L/AC:L/PR:H/UI:R) reflects the constrained exploitation path: the attacker must have already introduced a malicious bookmark title into the system, and an administrator must actively trigger the thumbnail synchronization feature. The attack vector AV:L acknowledges the web-session-local context; PR:H confirms administrative privilege is required on the triggering side. That said, the Confidentiality and Integrity impacts are both High, reflecting the realistic outcome of session hijacking and persistent backdoor injection if the chain succeeds. EPSS data was not provided in the input and cannot be inferred. KEV status is not confirmed, and no public proof-of-concept is referenced. The SSVC signals suggest this is a low-automation, targeted attack path rather than a mass-exploitation scenario. The primary risk population is organizations or individuals running self-hosted Shaarli instances where untrusted users can create bookmarks, or where bookmark data is imported from external/untrusted sources. For strictly single-administrator personal instances where the admin controls all bookmark input, the attack degenerates to self-XSS with limited incremental risk.

Exploit ScenarioDerived

An attacker who can create or import a bookmark into a Shaarli instance crafts a title containing a JavaScript payload (e.g., an event-handler-bearing HTML tag). When a Shaarli administrator subsequently navigates to the Thumbnail Synchronizer and initiates the update process, the backend returns the malicious title as raw JSON, and thumbnails-update.js injects it into the page DOM via innerHTML, triggering the payload in the admin's browser session. The payload can exfiltrate the admin's session cookie to an attacker-controlled server, enabling session hijacking and full application compromise.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 17, 2026

DOM-based XSS in Shaarli's Thumbnail Synchronizer allows stored malicious bookmark titles to execute arbitrary JavaScript in an administrator's browser session when thumbnail synchronization is triggered. Versions 0.16.1 and prior are affected; the root cause is unsanitized innerHTML injection in thumbnails-update.js after the backend's ThumbnailsController::ajaxUpdate returns raw, unescaped bookmark titles via AJAX. Successful exploitation can lead to session hijacking, privilege escalation, and backdoor injection against administrator accounts. No public exploit or KEV listing is confirmed at time of analysis; a vendor patch is available in v0.16.2.

RemediationAI

The primary fix is to upgrade Shaarli to version 0.16.2, released 2026-05-23, which specifically patches thumbnail update DOM insertions alongside other XSS fixes (Awesomplete autocomplete tag encoding and Markdown href protocol sanitization). The patched release is available at https://github.com/shaarli/Shaarli/releases/tag/v0.16.2. If immediate upgrade is not possible, administrators should avoid running the Thumbnail Synchronizer feature until patched - disabling or restricting access to the thumbnail update AJAX endpoint (/api/thumbnails or equivalent) via web server configuration (e.g., nginx location block deny) is an effective workaround, though it disables thumbnail functionality entirely. As an additional compensating control, Content Security Policy (CSP) headers can be configured on the Shaarli host to block inline script execution, which would mitigate exploitation even if the vulnerable code path is triggered - trade-off is potential breakage of other inline JS in the Shaarli UI. Input sanitization or escaping at the API response layer before the patch is not a trivial code-level workaround without deeper PHP knowledge of Shaarli internals.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Shaarli (cpe:2.3:a:shaarli:shaarli:*:*:*:*:*:*:*:*) is a self-hosted PHP bookmarking application. The vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation) manifests across a client-server boundary: the backend ThumbnailsController::ajaxUpdate endpoint serializes bookmark data using the 'raw' formatter, which performs no HTML encoding on the bookmark title field before embedding it in the JSON response. The frontend script thumbnails-update.js consumes this AJAX payload and injects content into the DOM via innerHTML - a well-known dangerous sink - rather than textContent or a safe DOM manipulation API. Because innerHTML parses HTML markup including script-bearing constructs, any stored bookmark title containing XSS payloads (e.g., <img onerror=...> or <script> tags) is interpreted and executed in the administrator's browser context. This is a stored/persistent DOM-XSS chain: the payload persists in the bookmark store and fires during a specific privileged administrative action.

Know when Shaarli gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 5.8 MEDIUM
AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N
vuln.today AI 5.7 MEDIUM

AV:N reflects the web application delivery; AC:H because attack requires a pre-planted malicious bookmark AND an admin-triggered sync event; PR:H for the required administrative trigger; UI:R as the admin must initiate thumbnail synchronization.

3.1 AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N
4.0 AV:N/AC:H/AT:P/PR:H/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
Low
Privileges Required
High
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.1%
Top 97% exploitable
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

29
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +29
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

Privilege escalation occurs when an attacker leverages flaws in access control mechanisms to gain permissions beyond what they were originally granted.

Affected Products (CPE)CVE.org

cpe:2.3:a:shaarli:shaarli:*:*:*:*:*:*:*:*

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy