Shaarli
CVE-2026-48822
MEDIUM
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAuthenticate as Shaarli admin or compromise admin account
-
DeliveryCraft bookmark description using Markdown reference-style javascript: URI syntax
-
ExploitSubmit bookmark to persistent storage
-
InstallVictim loads bookmark listing or detail page
-
C2Markdown parser resolves reference link, bypassing sanitization
-
ExecuteInjected JavaScript executes in victim browser
-
ImpactSteal session token or perform actions as victim
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 an authenticated session with bookmark creation privileges on the target Shaarli instance - consistent with PR:H in the CVSS vector, reflecting Shaarli's default single-owner design where only the instance administrator can create bookmarks. The Markdown rendering feature must be enabled for bookmark descriptions (the vulnerable code path in BookmarkMarkdownFormatter.php is only exercised when Markdown processing is active). A second user interaction is required: a victim - any user or guest - must load the page containing the crafted bookmark description (UI:R). The specific bypass requires use of Markdown reference-style link syntax rather than inline links, because the filterProtocols regex exclusively targets inline syntax. Exploitation is therefore bounded by: (1) attacker control of a high-privilege Shaarli account or successful compromise of one, and (2) Markdown plugin being active. Instances that have disabled Markdown rendering or restricted all access to a single trusted operator are not exploitable via this path. |
| Impact | The NVD-assigned CVSS base score of 5.8 uses the vector CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N. The AV:L (local attack vector) metric is inconsistent with a network-accessible web application and appears to be a classification error - independent assessment yields AV:N. PR:H (high privileges required) is plausible given Shaarli's default single-owner design where only the instance administrator creates bookmarks, though multi-user configurations could lower this to PR:L. S:U (no scope change) in the provided vector is also questionable for a stored XSS that executes in a victim's browser context, suggesting S:C is more accurate. No EPSS data was supplied, no CISA KEV listing was indicated, and no public POC exploit has been identified at time of analysis. For self-hosted single-user deployments the practical risk is constrained - the attacker must first hold or compromise the owner account - but for public or multi-user Shaarli instances the stored XSS represents a meaningful threat to any visitor. |
| Exploit ScenarioDerived | An attacker authenticated as a Shaarli administrator creates a bookmark whose description contains a Markdown reference-style link - for example, [click here][ref] paired with a separate line [ref]: javascript:alert(document.cookie) - which passes through the filterProtocols sanitization undetected. When any user or unauthenticated guest loads the bookmark listing or detail page, the Markdown parser resolves the reference and renders a javascript: anchor that executes in the viewer's browser, delivering the attacker's payload. No public proof-of-concept code has been confirmed at time of analysis, but the vulnerability is straightforward to reproduce given the published description and patch diff. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 17, 2026
Stored XSS in Shaarli's Markdown rendering pipeline (versions 0.16.1 and prior) allows an authenticated user to inject malicious javascript: URIs via Markdown reference-style links in bookmark descriptions, bypassing the filterProtocols sanitization method in BookmarkMarkdownFormatter.php. When any user or guest visitor views the crafted bookmark, arbitrary JavaScript executes in their browser context, enabling session theft or unauthorized actions. No public exploit has been identified at time of analysis and this CVE is not listed in CISA KEV; vendor-released patch v0.16.2 is available as of 2026-05-23.
RemediationAI
Upgrade to Shaarli v0.16.2, released 2026-05-23, which patches the filterProtocols method to handle Markdown reference-style link definitions and also addresses two additional XSS vectors: encoding of tag text in Awesomplete autocomplete suggestions and sanitization of thumbnail update DOM insertions (see https://github.com/shaarli/Shaarli/releases/tag/v0.16.2 and advisory GHSA-2hgr-63wv-x462). If an immediate upgrade is not feasible, disabling the Markdown plugin for bookmark descriptions eliminates the vulnerable code path entirely - this is the most effective compensating control, though it removes Markdown formatting functionality for all descriptions. Restricting bookmark creation to a single trusted administrator and disabling public/guest access to the instance reduces the attack surface but does not eliminate risk if the admin account is compromised.
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: cpe:2.3:a:shaarli:shaarli:*:*:*:*:*:*:*:*) is a PHP-based self-hosted personal bookmarking service. The root cause (CWE-79: Improper Neutralization of Input During Web Page Generation) lies in the filterProtocols method of BookmarkMarkdownFormatter.php, which uses the regex (#]\((.*?)\)#is) to detect and strip dangerous protocols such as javascript: from Markdown links before rendering. This pattern only matches inline Markdown link syntax ([text](url)) and is completely blind to reference-style Markdown links ([text][ref] paired with a separate [ref]: url definition). Because the Markdown parser resolves reference definitions after filterProtocols has already run, a javascript: URI embedded in a reference definition is never inspected by the sanitizer and passes through to the rendered HTML as a functional anchor tag.
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
AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N
Network-accessible web application warrants AV:N over AV:L; S:C applies as injected script executes in victim's browser; PR:H reflects Shaarli's default single-owner bookmark creation model.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
DescriptionCVE.org
Shaarli is a personal bookmarking service. Versions 0.16.1 and prior contain a stored Cross-Site Scripting (XSS) vulnerability in the Markdown-to-HTML conversion process used in the Bookmark Description field. An authenticated user can inject a malicious javascript: URI inside a Markdown link. The vulnerability originates in the filterProtocols method within BookmarkMarkdownFormatter.php.This method attempts to sanitize Markdown links by filtering dangerous protocols (such as javascript:) before rendering. It uses the following regular expression: (#]\((.*?)\)#is). This regex is designed to detect inline Markdown links, but it fails to detect Markdown reference-style links because reference-style links are resolved by the Markdown parser after preprocessing. The filterProtocols method never inspects the actual URL used in these references and as a result, an attacker can supply a javascript: URI inside a reference definition. This issue has been fixed in version 0.16.2.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
Affected Products (CPE)CVE.org
Reflected Cross Site Scripting (XSS) vulnerability in Shaarli v0.12.2, allows remote attackers to execute arbitrary code
Stored XSS in Shaarli versions before 0.16.0 allows authenticated attackers to inject malicious HTML by crafting tags st
Stored XSS in Shaarli versions prior to 0.16.3 enables administrator account takeover through a low-effort social engine
Reflected XSS vulnerability in Shaarli v0.9.1 allows an unauthenticated attacker to inject JavaScript via the searchtags
Cross-site scripting (XSS) vulnerability in Shaarli before 0.8.5 and 0.9.x before 0.9.3 allows remote attackers to injec
DOM-based XSS in Shaarli's Thumbnail Synchronizer allows stored malicious bookmark titles to execute arbitrary JavaScrip
Server-side request forgery (SSRF) in Shaarli up to 0.16.3 allows an attacker who can reach the admin-only MetadataContr
Stored XSS in Shaarli's tag filtering functionality permits an authenticated user to inject persistent JavaScript payloa
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB