CVE-2022-25037: @wangeditor/editor Cross-Site Scripting Vulnerability
MODERATECVE-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.
CVE-2022-25037 at a Glance
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).
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.
npm install @wangeditor/editor@4.7.12
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
CVE-2022-25037 Affected @wangeditor/editor Versions
1 component(s)| 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?
Which @wangeditor/editor versions are affected?
What version fixes CVE-2022-25037?
Is @wangeditor/editor affected?
What is the CVSS score of CVE-2022-25037?
What CWE is associated with CVE-2022-25037?
How can I check npm dependencies for CVE-2022-25037?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}