Vulnerabilities in pkg:npm/@wangeditor/editor

PACKAGE
Advisory Identifier: GHSA-9hfw-cvf4-5x25
Advisory Summary

CVE-2022-25037 is a MODERATE (CVSS 5.4) cross-site scripting vulnerability (General Security Weakness) affecting @wangeditor/editor libraries in the npm ecosystem. The issue involves wangeditor was discovered to contain a cross-site scripting (xss) vulnerability via the image upload function. Remediation is available by upgrading affected packages to version 4.7.12.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@wangeditor/editor

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@wangeditor/editor. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-9hfw-cvf4-5x25 CVE-2022-25037 MODERATE wangEditor was discovered to contain a cross-site scripting (XSS) vulnerability via the image upload function

CVE-2022-25037 at a Glance

CVE Identifier CVE-2022-25037
GHSA Identifier GHSA-9hfw-cvf4-5x25
Severity MODERATE
CVSS v3.1 Base Score 5.4
CWE Classification General Security Weakness
Affected Product @wangeditor/editor
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 5.4

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:C/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
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-2022-25037

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

@wangeditor/editor fixed: 4.7.12
npm install @wangeditor/editor@4.7.12
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 @wangeditor/editor

How to Check if You Are Affected

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

npm ls @wangeditor/editor

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

Note: The npm ls @wangeditor/editor 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 General Security Weakness. In @wangeditor/editor, 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

There is a cross-site scripting (XSS) issue in wangEditor via the image upload function in version 4.7.11. This issue has been fixed in version 4.7.12.

CVE-2022-25037 Affected @wangeditor/editor Versions

1 component(s)
Fixed Versions:
4.7.12
Product / Package Ecosystem Affected Versions Fixed Version
@wangeditor/editor
npm
< 4.7.12
4.7.12

References

Frequently Asked Questions

What is CVE-2022-25037?
CVE-2022-25037 is a security vulnerability in @wangeditor/editor involving wangEditor was discovered to contain a cross-site scripting (XSS) vulnerability via the image upload function under General Security Weakness.
Which @wangeditor/editor versions are affected?
Affected versions include releases prior to 4.7.12 across affected packages: @wangeditor/editor.
What version fixes CVE-2022-25037?
Upgrading to 4.7.12 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @wangeditor/editor affected?
Yes, @wangeditor/editor is affected in releases prior to 4.7.12. Upgrade your dependency to 4.7.12 or later.
What is the CVSS score of CVE-2022-25037?
CVE-2022-25037 has a CVSS v3.1 base score of 5.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2022-25037?
CVE-2022-25037 is classified under General Security Weakness.
How can I check npm dependencies for CVE-2022-25037?
Run the dependency tree command: 'npm ls @wangeditor/editor'. 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-9hfw-cvf4-5x25",
  "modified" : "2026-06-11T14:15:43Z",
  "published" : "2024-05-31T18:31:14Z",
  "aliases" : [ "CVE-2022-25037" ],
  "summary" : "wangEditor was discovered to contain a cross-site scripting (XSS) vulnerability via the image upload function",
  "details" : "There is a cross-site scripting (XSS) issue in wangEditor via the image upload function in version 4.7.11. This issue has been fixed in version 4.7.12.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@wangeditor/editor"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.7.12"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 4.7.11"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-25037"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wangeditor-team/wangEditor/issues/3870"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wangeditor-team/wangEditor/issues/3872"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wangeditor-team/wangEditor/commit/6257a2e166346913c34ac5cfb31b6a46e9544c5a"
  }, {
    "type" : "WEB",
    "url" : "https://gist.github.com/Mdxjj/5cf0a31e8abf24ed688ceb5b3543516d"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/wangeditor-team/wangEditor"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-06-02T22:32:11Z",
    "nvd_published_at" : "2024-05-31T16:15:09Z"
  }
}