CVE-2026-45011: Apostrophe Security Vulnerability Vulnerability

HIGH
Advisory Identifier: GHSA-5f64-7vfc-rcx6
CVSS 7.3
CWE-116 CWE-79
Published
Advisory Summary

CVE-2026-45011 is a HIGH (CVSS 7.3) security vulnerability vulnerability (CWE-116: Improper Encoding or Escaping of Output) affecting Apostrophe libraries in the npm ecosystem. The issue involves url in image widget link. Remediation is available in the latest vendor maintenance releases.

CVE-2026-45011 at a Glance

CVE Identifier CVE-2026-45011
GHSA Identifier GHSA-5f64-7vfc-rcx6
Severity HIGH
CVSS v3.1 Base Score 7.3
CWE Classification CWE-116: Improper Encoding or Escaping of Output
Affected Product Apostrophe
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2026-45011

To remediate this vulnerability, upgrade all affected Apostrophe dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

apostrophe fixed: Latest secure release
npm install apostrophe@Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls apostrophe

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-45011, inspect your project dependencies using npm:

npm ls apostrophe

Analyze the terminal output to locate any version of Apostrophe in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The npm ls apostrophe command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-116: Improper Encoding or Escaping of Output, where 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. In Apostrophe, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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

CVE-2026-45011 Affected Apostrophe Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
apostrophe
npm
4.29.0
All 1 versions
4.29.0
None specified

References

Frequently Asked Questions

What is CVE-2026-45011?
CVE-2026-45011 is a security vulnerability in Apostrophe involving URL in Image Widget Link under CWE-116: Improper Encoding or Escaping of Output.
Which Apostrophe versions are affected?
Affected versions include releases prior to current release patches across affected packages: apostrophe.
What version fixes CVE-2026-45011?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is apostrophe affected?
Yes, apostrophe is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2026-45011?
CVE-2026-45011 has a CVSS v3.1 base score of 7.3 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2026-45011?
CVE-2026-45011 is classified under CWE-116: 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.).
How can I check npm dependencies for CVE-2026-45011?
Run the dependency tree command: 'npm ls apostrophe'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-5f64-7vfc-rcx6",
  "modified" : "2026-06-12T22:02:05Z",
  "published" : "2026-05-14T18:27:56Z",
  "aliases" : [ "CVE-2026-45011" ],
  "summary" : "Apostrophe has stored XSS via javascript: URL in Image Widget Link",
  "details" : "### Summary\nA 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.\n\nBecause 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.\n\n### Affected Version\nApostropheCMS (tested on version: v4.29.0)\n\n### Steps to Reproduce\n**Precondition**\nEnsure at least one image exists in the media library.\n\nIf the media library is empty:\n- Log in as an Editor.\n- Open the media library.\n- Upload any JPG or PNG image.\n- Set any title, for example Probe image.\n- Publish the image and close the media manager.\n\n**Exploitation Steps**\n\n- Log in as an Editor.\n- Open the home page.\n- Enable edit mode for the page.\n- In the main content area, click Add content.\n- Select the Image widget.\n- Choose any existing image from the image picker and save/select it.\n- Open the image widget settings.\n- Locate the Link to field and change it to URL.\n- In the URL field, enter: ```javascript:alert(document.domain)```\n<img width=\"1249\" height=\"979\" alt=\"image\" src=\"https://github.com/user-attachments/assets/c7f77177-1711-461d-b9bd-14292a6996d5\" />\n\n- Save the image and click on Update.\n- As another user, such as an administrator or guest, open the published page and click the linked image.\n- Observe that the JavaScript payload executes.\n<img width=\"1267\" height=\"1034\" alt=\"image\" src=\"https://github.com/user-attachments/assets/a80484b4-873a-47c1-8682-84626523008a\" />\n\n**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.\n\nIf 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.\n\n### Impact\nSuccessful 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.\n\nThis may allow an attacker to:\n\n- perform actions in the context of an authenticated administrator\n- access sensitive information available in the CMS interface\n- modify page content or configuration\n- conduct phishing attacks within the trusted site\n- compromise visitors who interact with the published image link\n\n### Recommendation\n\nValidate and sanitize all user-supplied URLs used in widget link fields.\n\nSpecifically:\n\n- Reject dangerous URL schemes such as javascript:, data:, and other executable schemes.\n- Allow only safe protocols such as http:, https:, mailto:, and relative URLs where appropriate.\n- Normalize and validate URLs server-side before storage.\n- Encode rendered URLs safely in templates.\n- Consider applying a strict Content Security Policy to reduce the impact of XSS.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "apostrophe"
    },
    "versions" : [ "4.29.0" ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/apostrophecms/apostrophe/security/advisories/GHSA-5f64-7vfc-rcx6"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-45011"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apostrophecms/apostrophe"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apostrophecms/apostrophe/releases/tag/apostrophe%404.29.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-116", "CWE-79" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-14T18:27:56Z",
    "nvd_published_at" : "2026-06-12T21:16:22Z"
  }
}