Skip to main content

Shaarli CVE-2026-48822

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. Recon
    Authenticate as Shaarli admin or compromise admin account
  2. Delivery
    Craft bookmark description using Markdown reference-style javascript: URI syntax
  3. Exploit
    Submit bookmark to persistent storage
  4. Install
    Victim loads bookmark listing or detail page
  5. C2
    Markdown parser resolves reference link, bypassing sanitization
  6. Execute
    Injected JavaScript executes in victim browser
  7. Impact
    Steal 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.

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

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

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 8.1 HIGH

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.

3.1 AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N
4.0 AV:N/AC:L/AT:N/PR:H/UI:A/VC:L/VI:L/VA:N/SC:H/SI:H/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 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

EPSS Score
0.1%
Top 98% exploitable
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium
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
Scheduled
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Total

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.

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