Apostrophe has stored XSS via javascript: URL in Image Widget Link
Date: 2026-05
Affected: npm/apostrophe
Attack vector: xss
Category: vulnerability-disclosure
Severity: High
CVE: CVE-2026-45011
CWE: CWE-116
CWE-79
CVSS: 7.3 (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N)

### 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.


Mitigations:

Architectural layers (MAESTRO):