Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
m3t3kh4n committed Oct 24, 2024
1 parent 55e9ec8 commit 2602b29
Showing 1 changed file with 26 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,39 @@
{
"schema_version": "1.4.0",
"id": "GHSA-5j4c-8p2g-v4jx",
"modified": "2024-10-15T18:30:50Z",
"modified": "2024-10-15T18:31:00Z",
"published": "2024-10-15T18:30:50Z",
"aliases": [
"CVE-2024-9506"
],
"details": "Improper regular expression in Vue's parseHTML function leads to a potential regular expression denial of service vulnerability.",
"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```\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.\n\n\n\n",
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L"
}
],
"affected": [

{
"package": {
"ecosystem": "npm",
"name": "vue"
},
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "2.0.0-alpha.1"
},
{
"fixed": "3.0.0-alpha.0"
}
]
}
]
}
],
"references": [
{
Expand All @@ -24,6 +43,10 @@
{
"type": "WEB",
"url": "https://www.herodevs.com/vulnerability-directory/cve-2024-9506"
},
{
"type": "PACKAGE",
"url": "https://www.npmjs.com/package/vue"
}
],
"database_specific": {
Expand Down

0 comments on commit 2602b29

Please sign in to comment.