MEDIUM 4.8

CVE-2026-48823: Stored XSS in Shaarli Tag Filtering—CVSS 4.8 Medium

Shaarli, a self-hosted bookmarking application, contains a stored cross-site scripting (XSS) flaw in how it handles user-supplied tags. An authenticated attacker can embed malicious JavaScript into a bookmark's tags field. When other users search by tag on the homepage, the attacker's code executes in their browser. This affects anyone using the tag filtering feature, including administrators. The issue is fixed in version 0.16.2.

Source data · NVD / CISA · public domain

CVSS
3.1 · 4.8 MEDIUM · CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:L/A:N
Weaknesses (CWE)
CWE-79
Affected products
0 configuration(s)
Published / Modified
2026-06-17 / 2026-06-18

NVD description (verbatim)

Shaarli is a personal bookmarking service. Versions 0.16.1 and prior contain a stored Cross-Site Scripting (XSS) vulnerability in the tag filtering functionality of Shaarli. An authenticated user can inject arbitrary JavaScript into the tags field when creating a bookmark (Shaare). The malicious payload is stored and later executed when users interact with the "Filter by tag" search feature on the homepage. User-supplied input in the tags field is not properly sanitized or output-escaped before being rendered in the tag filtering interface. When a bookmark is created with a malicious payload inside the tag field, the payload is stored in the database. Later, when a user searches using the "Filter by tag" functionality on the homepage, the application renders matching tags dynamically. If the tag value contains HTML with JavaScript event handlers, it is injected into the DOM. This impacts anyone interacting with the "Filter by tag" search functionality, administrators and privileged users. 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-48823 is a stored XSS vulnerability (CWE-79) in Shaarli versions 0.16.1 and prior. The vulnerability exists in the tag filtering functionality where user input from the tags field is neither sanitized during storage nor properly output-encoded when rendered in the dynamic tag search interface on the homepage. An authenticated user can inject HTML and JavaScript into the tags field when creating a Shaare (bookmark). The payload persists in the database and executes client-side when the "Filter by tag" feature dynamically renders matching tags in the DOM, exposing any visitor who interacts with that search feature to session hijacking, credential theft, or other malicious client-side actions.

Business impact

While stored XSS vulnerabilities are typically high-risk, this instance is constrained by its requirement for prior authentication and local attack vector. However, the impact remains significant: attackers with valid credentials can compromise the browsing sessions and accounts of other users, including administrators. In shared or multi-user Shaarli instances, this enables account takeover, privilege escalation (if an admin interacts with a poisoned tag), and theft of sensitive bookmarks or private data. Organizations relying on Shaarli for sensitive bookmark sharing face potential data exfiltration and loss of system integrity.

Affected systems

Shaarli versions 0.16.1 and earlier are affected. The vulnerability is patched in version 0.16.2 and later. Both standard installations and Docker-based deployments are in scope. Any instance where multiple users share access—particularly those hosting private or sensitive bookmarks—should prioritize patching. Self-hosted instances without external network exposure still face risk from internal authenticated users.

Exploitability

Exploitation requires valid Shaarli credentials, limiting the attack surface to authenticated users only. An attacker cannot directly compromise a system remotely via the vulnerability alone; they must first authenticate. Once authenticated, injecting the payload is straightforward—it requires only creating or editing a bookmark with JavaScript in the tags field. The execution is guaranteed when any user (including admins) uses tag filtering on the homepage. The attack requires user interaction (clicking "Filter by tag"), but on active instances this is inevitable and frequent. The CVSS score of 4.8 (MEDIUM) reflects this authentication requirement and local attack vector, though the stored nature of the payload and guaranteed execution upon user interaction elevate practical risk in collaborative environments.

Remediation

Upgrade Shaarli to version 0.16.2 or later immediately. This version includes proper input sanitization and output encoding of tag values in the filtering interface. For instances that cannot be upgraded immediately, restrict user creation privileges to trusted administrators only, and educate users not to click tag filters from untrusted sources. These interim measures do not eliminate risk and should not replace timely patching.

Patch guidance

Verify your installed Shaarli version using the administration dashboard or by checking the `VERSION` file in the root directory. If running 0.16.1 or earlier, upgrade to 0.16.2 as soon as feasible. For Docker deployments, pull the latest official Shaarli image (verify the tag corresponds to version 0.16.2+), or manually rebuild from the patched source. Test tag filtering functionality after upgrade to confirm proper rendering without script execution. Maintain regular backups before patching in case rollback is necessary.

Detection guidance

Search database logs or stored bookmarks for suspicious tag values containing JavaScript keywords (e.g., 'onclick', 'onerror', '<script>', 'javascript:') or HTML event handlers. Monitor web server access logs for patterns suggesting tag-filter interactions after new bookmarks are created. Implement Content Security Policy (CSP) headers on the Shaarli instance to restrict inline script execution even if XSS payloads are rendered. Review audit logs (if available) for unusual bookmark creation activity by low-privileged users. After patching, verify that previously injected payloads no longer execute by attempting to reproduce with historical poisoned tags.

Why prioritize this

Although the CVSS score is MEDIUM and the vulnerability requires authentication, its stored nature and guaranteed execution during routine user activity (tag filtering) make it a practical attack vector in multi-user Shaarli deployments. Administrators should prioritize this patch to prevent account compromise and unauthorized access escalation. The fix is straightforward and low-risk, justifying rapid deployment in most environments.

Risk score, explained

The CVSS v3.1 score of 4.8 reflects a constrained but real threat: the attack vector is local (credentialed access only, AV:L), access complexity is low (AC:L), and privilege escalation is not required from the attacker's perspective (PR:H means high privilege is required to inject, but the victim's privilege is what matters—any user can interact with tags). User interaction is required (UI:R), limiting severity. Confidentiality impact is high (C:H) because session tokens or credentials can be stolen, integrity is low (I:L) because modifications are limited to client-side DOM state, and availability is unaffected (A:N). The stored persistence of the payload and its certain execution during normal use elevates practical exploitability despite the MEDIUM score.

Frequently asked questions

Do I need to patch if Shaarli is only accessible internally or behind a VPN?

Yes. The vulnerability requires authentication but not network exposure. A malicious insider or compromised internal account can still inject and execute payloads, potentially escalating to admin privileges. Internal-only deployments remain at risk from authenticated threats.

What if we only allow certain trusted users to create bookmarks?

That reduces the attack surface, but does not eliminate risk. A compromised trusted account, or a trusted user acting maliciously, can still inject payloads. Restricting permissions is a useful interim control but is not a substitute for patching.

Can we safely delete affected bookmarks instead of upgrading?

Only if you are certain you have identified all poisoned bookmarks. Searching for suspicious tag values (JavaScript keywords, event handlers) may reveal most injections, but a sophisticated attacker might use encoding or obfuscation to evade detection. Patching is more reliable and recommended.

Does this vulnerability allow remote code execution on the server?

No. This is a client-side (browser) XSS vulnerability. It cannot directly execute code on the Shaarli server. However, an attacker can steal session tokens or credentials from a victim's browser, which could then be used to gain unauthorized server-side access.

This analysis is provided for informational purposes and reflects publicly disclosed vulnerability data as of the publication date. SEC.co does not verify the accuracy of vendor claims or provide warranty regarding patch efficacy. Organizations must independently validate patch applicability, test thoroughly in non-production environments, and confirm compatibility with their specific Shaarli configuration before deployment. Interim mitigations (permission restrictions, CSP headers) reduce but do not eliminate risk. Consult official Shaarli project announcements and your vendor's security advisories for authoritative guidance. This assessment does not constitute professional security advice; engage qualified security personnel for your environment. Source: NVD (public-domain), retrieved 2026-07-27. Analysis generated by SEC.co (claude-haiku-4-5).