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.
ApostropheCMS (tested on version: v4.29.0)
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
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.
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.
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:
Validate and sanitize all user-supplied URLs used in widget link fields.
Specifically:
No EPSS score in this advisory JSON.
| Base score | Version | Severity | Vector |
|---|---|---|---|
| 7.3 | 3.1 | — |
|
| Type | Value |
|---|---|
| GHSA | GHSA-5f64-7vfc-rcx6 ↗ |
| CVE | CVE-2026-45011 ↗ |
Vulnerable version ranges and first patched releases as published by GitHub.
| Ecosystem | Package | Vulnerable range | First patched | Vulnerable functions |
|---|---|---|---|---|
| npm | apostrophe | = 4.29.0 | — | — |