Hoch

Apostrophe has stored XSS via javascript: URL in Image Widget Link

  • Veröffentlicht: 14.05.2026
  • Aktualisiert: 11.10.2026 10:22

Summary

A stored cross-site scripting vulnerability was identified in the image widget functionality. A user with the Editor role can configure an image widget link to use a javascript: URL payload.

Because editors have permission to publish pages, the malicious widget can be published to the live site. When another user, including an administrator or public visitor, clicks the affected image/link, arbitrary JavaScript executes in the victim’s browser.

Affected Version

ApostropheCMS (tested on version: v4.29.0)

Steps to Reproduce

Precondition Ensure at least one image exists in the media library.

If the media library is empty:

  • Log in as an Editor.
  • Open the media library.
  • Upload any JPG or PNG image.
  • Set any title, for example Probe image.
  • Publish the image and close the media manager.

Exploitation Steps

  • Log in as an Editor.

  • Open the home page.

  • Enable edit mode for the page.

  • In the main content area, click Add content.

  • Select the Image widget.

  • Choose any existing image from the image picker and save/select it.

  • Open the image widget settings.

  • Locate the Link to field and change it to URL.

  • In the URL field, enter: javascript:alert(document.domain) <img width="1249" height="979" alt="image" src="https://github.com/user-attachments/assets/c7f77177-1711-461d-b9bd-14292a6996d5" />

  • Save the image and click on Update.

  • As another user, such as an administrator or guest, open the published page and click the linked image.

  • Observe that the JavaScript payload executes. <img width="1267" height="1034" alt="image" src="https://github.com/user-attachments/assets/a80484b4-873a-47c1-8682-84626523008a" />

Note: This attack can also be performed by a Contributor. However, because contributors cannot publish content directly, the malicious image widget remains in the draft version and is only visible to users with access to review drafts, such as administrators or editors.

If an administrator reviews and approves/publishes the affected draft, the stored XSS becomes part of the live page and can then affect all users who interact with the malicious image link.

Impact

Successful exploitation allows an Editor to store a JavaScript payload in published page content. When a victim clicks the affected image link, the payload executes in the victim’s browser.

This may allow an attacker to:

  • perform actions in the context of an authenticated administrator
  • access sensitive information available in the CMS interface
  • modify page content or configuration
  • conduct phishing attacks within the trusted site
  • compromise visitors who interact with the published image link

Recommendation

Validate and sanitize all user-supplied URLs used in widget link fields.

Specifically:

  • Reject dangerous URL schemes such as javascript:, data:, and other executable schemes.
  • Allow only safe protocols such as http:, https:, mailto:, and relative URLs where appropriate.
  • Normalize and validate URLs server-side before storage.
  • Encode rendered URLs safely in templates.
  • Consider applying a strict Content Security Policy to reduce the impact of XSS.

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
npm-Paket apostrophe = 4.29.0 keine Korrektur

Verweise

CVSS-Wert 7.3/10
CVSS-Vektor
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N
Schwäche (CWE)
CWE-116, CWE-79
Plattform
npm
Paket
apostrophe
Veröffentlicht
14.05.2026
Aktualisiert
11.10.2026 10:22

Quellen und Lizenzen

OSV / GitHub Advisory Database - GHSA-5f64-7vfc-rcx6 - CC BY 4.0

Schwachstellenhistorie: apostrophe

Alle veröffentlichten Schwachstellen dieses Pakets (npm-Paket), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Alle (27) im Archiv
Einträge insgesamt
27
Erste → letzte
09.2020 10.2026
Ohne Fix
4
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Kritisch 2
  • Hoch 8
  • Mittel 13
  • Niedrig 4

Veröffentlichungen pro Jahr

  1. 2020: 2
  2. 2021: 2
  3. 2022: 0
  4. 2023: 0
  5. 2024: 0
  6. 2025: 0
  7. 2026: 23
Schweregrad:
  1. Apostrophe has stored XSS via javascript: URL in Image Widget Link dieser Eintrag
    Hoch · 7.3 CVE-2026-45011 = 4.29.0 keine Korrektur
  2. Kritisch · 9.8 CVE-2021-25979 >= 2.63.0, < 3.4.0 3.4.0

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.