Shaarli
CVE-2026-48822
MEDIUM
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
Lifecycle Timeline
2DescriptionCVE.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.
AnalysisAI
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.
Technical ContextAI
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.
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.
In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it
sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not
(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear
The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by
ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C
Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au
Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c
Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows
The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1
Same weakness CWE-79 – Cross-site Scripting (XSS)
View allShare
External POC / Exploit Code
Leaving vuln.today