CVE-2025-57520: Decap cms Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-xp8g-32qh-mv28
CVSS 6.1
CWE-79
Published
Advisory Summary

CVE-2025-57520 is a MODERATE (CVSS 6.1) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Decap cms libraries in the npm ecosystem. The issue involves decap cms cross site scripting (xss) vulnerability. Remediation is available in the latest vendor maintenance releases.

CVE-2025-57520 at a Glance

CVE Identifier CVE-2025-57520
GHSA Identifier GHSA-xp8g-32qh-mv28
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Decap cms
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.1

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

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

How to Fix CVE-2025-57520

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

decap-cms fixed: Latest secure release
npm install decap-cms@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 decap-cms

How to Check if You Are Affected

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

npm ls decap-cms

Analyze the terminal output to locate any version of Decap cms 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 decap-cms 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-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where 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. In Decap cms, 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

Decap CMS through 3.8.3 is vulnerable to stored Cross-Site Scripting (XSS) in the admin preview pane. User-controlled fields (e.g., title, description, tags, and body) are rendered in the preview without sufficient sanitization/escaping. An attacker with low-privilege author/contributor access can persist a JavaScript payload in content; when a maintainer or reviewer opens the preview, the payload executes in the CMS admin origin, enabling token/session theft or the execution of privileged actions via the DOM. The issue affects multiple input vectors and requires only passive interaction from the previewing user. As no patched version is available, administrators should restrict untrusted contributor roles and filter or disable preview rendering of untrusted HTML.

CVE-2025-57520 Affected Decap cms Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
decap-cms
npm
≤ 3.8.3

References

Frequently Asked Questions

What is CVE-2025-57520?
CVE-2025-57520 is a security vulnerability in Decap cms involving Decap CMS Cross Site Scripting (XSS) vulnerability under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Decap cms versions are affected?
Affected versions include releases prior to current release patches across affected packages: decap-cms.
What version fixes CVE-2025-57520?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is decap-cms affected?
Yes, decap-cms 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-2025-57520?
CVE-2025-57520 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2025-57520?
CVE-2025-57520 is classified under CWE-79: 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.).
How can I check npm dependencies for CVE-2025-57520?
Run the dependency tree command: 'npm ls decap-cms'. 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-xp8g-32qh-mv28",
  "modified" : "2025-09-23T20:24:42Z",
  "published" : "2025-09-10T18:30:16Z",
  "aliases" : [ "CVE-2025-57520" ],
  "summary" : "Decap CMS Cross Site Scripting (XSS) vulnerability",
  "details" : "Decap CMS through 3.8.3 is vulnerable to stored Cross-Site Scripting (XSS) in the admin preview pane. User-controlled fields (e.g., title, description, tags, and body) are rendered in the preview without sufficient sanitization/escaping. An attacker with low-privilege author/contributor access can persist a JavaScript payload in content; when a maintainer or reviewer opens the preview, the payload executes in the CMS admin origin, enabling token/session theft or the execution of privileged actions via the DOM. The issue affects multiple input vectors and requires only passive interaction from the previewing user. As no patched version is available, administrators should restrict untrusted contributor roles and filter or disable preview rendering of untrusted HTML.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "decap-cms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "3.8.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-57520"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/decaporg/decap-cms"
  }, {
    "type" : "WEB",
    "url" : "https://onurcangenc.com.tr/posts/cve-2025-57520--stored-xss-in-decap-cms-3-8-3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-09-10T20:48:53Z",
    "nvd_published_at" : "2025-09-10T17:15:33Z"
  }
}