CVE-2024-9506: Vue Denial of Service Vulnerability
LOWCVE-2024-9506 is a LOW (CVSS 3.7) denial of service vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting Vue libraries in the npm ecosystem. The issue involves redos vulnerability in vue package that is exploitable through inefficient regex evaluation in the parsehtml function. Remediation is available by upgrading affected packages to version 3.0.0-alpha.0.
CVE-2024-9506 at a Glance
Security Impact
CVSS: 3.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L).
How to Fix CVE-2024-9506
To remediate this vulnerability, upgrade all affected Vue 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@3.0.0-alpha.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls vue
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2024-9506, inspect your project dependencies using npm:
npm ls vue
Analyze the terminal output to locate any version of Vue in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.0.0-alpha.0), your application is affected.
Note: The npm ls vue 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-1333: Inefficient Regular Expression Complexity, where the product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. In Vue, 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-9506 Affected Vue Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
vue
|
npm |
≥ 2.0.0-alpha.1
< 3.0.0-alpha.0
|
3.0.0-alpha.0
|
References
Frequently Asked Questions
What is CVE-2024-9506?
Which Vue versions are affected?
What version fixes CVE-2024-9506?
Is vue affected?
What is the CVSS score of CVE-2024-9506?
What CWE is associated with CVE-2024-9506?
How can I check npm dependencies for CVE-2024-9506?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5j4c-8p2g-v4jx",
"modified" : "2024-10-24T18:42:59Z",
"published" : "2024-10-15T18:30:50Z",
"aliases" : [ "CVE-2024-9506" ],
"summary" : "ReDoS vulnerability in vue package that is exploitable through inefficient regex evaluation in the parseHTML function",
"details" : "The ReDoS can be exploited through the `parseHTML` function in the `html-parser.ts` file. This flaw allows attackers to slow down the application by providing specially crafted input that causes inefficient processing of regular expressions, leading to excessive resource consumption.\n\nTo demonstrate this vulnerability, here's an example. In a Vue client-side application, create a new Vue instance with a template string that includes a `<script>` tag but closes it incorrectly with something like `</textarea>`.\n\n```javascript\nnew Vue({\n el: '#app',\n template: '\n <div>\n Hello, world!\n <script>${'<'.repeat(1000000)}</textarea>\n </div>'\n});\n```\nNext, set up a basic HTML page (e.g., index.html) to load this JavaScript and mount the Vue instance:\n\n```html\n<!DOCTYPE html>\n<html>\n<head>\n <title>My first Vue app</title>\n</head>\n<body>\n <div id=\\\"app\\\">Loading...</div>\n</body>\n</html>\n```\n\nWhen you visit the app in your browser at http://localhost:3000, you'll notice that the time taken to parse and mount the Vue application increases significantly due to the ReDoS vulnerability, demonstrating how the flaw can affect performance.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "vue"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0-alpha.1"
}, {
"fixed" : "3.0.0-alpha.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-9506"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/vuejs/core"
}, {
"type" : "WEB",
"url" : "https://www.herodevs.com/vulnerability-directory/cve-2024-9506"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1333" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2024-10-24T18:42:59Z",
"nvd_published_at" : "2024-10-15T16:15:06Z"
}
}