Skip to content

Stored XSS via javascript: URL in Image Widget Link

High
boutell published GHSA-5f64-7vfc-rcx6 May 13, 2026

Package

No package listed

Affected versions

4.29.0

Patched versions

None

Description

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)
image
  • 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.
image

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.

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N

CVE ID

CVE-2026-45011

Weaknesses

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. Learn more on MITRE.

Improper Encoding or Escaping of Output

The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved. Learn more on MITRE.

Credits