Vulnerabilities in pkg:npm/vue-template-compiler
PACKAGECVE-2024-6783 is a MODERATE (CVSS 4.2) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Vue template compiler libraries in the npm ecosystem. The issue involves vue-template-compiler vulnerable to client-side cross-site scripting (xss). Remediation is available in the latest vendor maintenance releases.
pkg:npm/vue-template-compiler
Vulnerability advisories affecting package pkg:npm/vue-template-compiler. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-g3ch-rx76-35fx | CVE-2024-6783 | MODERATE | vue-template-compiler vulnerable to client-side Cross-Site Scripting (XSS) |
CVE-2024-6783 at a Glance
Security Impact
CVSS: 4.2
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N).
How to Fix CVE-2024-6783
To remediate this vulnerability, upgrade all affected Vue template compiler 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 vue-template-compiler@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls vue-template-compiler
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2024-6783, inspect your project dependencies using npm:
npm ls vue-template-compiler
Analyze the terminal output to locate any version of Vue template compiler 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 vue-template-compiler 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 Vue template compiler, 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-2024-6783 Affected Vue template compiler Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
vue-template-compiler
|
npm |
≥ 2.0.0
|
|
References
Frequently Asked Questions
What is CVE-2024-6783?
Which Vue template compiler versions are affected?
What version fixes CVE-2024-6783?
Is vue-template-compiler affected?
What is the CVSS score of CVE-2024-6783?
What CWE is associated with CVE-2024-6783?
How can I check npm dependencies for CVE-2024-6783?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g3ch-rx76-35fx",
"modified" : "2025-12-31T22:04:13Z",
"published" : "2024-07-23T15:31:09Z",
"aliases" : [ "CVE-2024-6783" ],
"summary" : "vue-template-compiler vulnerable to client-side Cross-Site Scripting (XSS)",
"details" : "A vulnerability has been discovered in vue-template-compiler, that allows an attacker to perform XSS via prototype pollution. The attacker could change the prototype chain of some properties such as `Object.prototype.staticClass` or `Object.prototype.staticStyle` to execute arbitrary JavaScript code. Vue 2 has reached End-of-Life. This vulnerability has been patched in Vue 3.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "vue-template-compiler"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "< 3.0.0"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-6783"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/vuejs/vue"
}, {
"type" : "WEB",
"url" : "https://www.herodevs.com/vulnerability-directory/cve-2024-6783"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-07-23T16:26:53Z",
"nvd_published_at" : "2024-07-23T15:15:06Z"
}
}