Vue 2.6.7 is a minor release following version 2.6.6 of this popular JavaScript framework for building user interfaces. Both versions share the same core description: a reactive, component-oriented view layer designed for crafting modern web experiences. A notable change lies in the webpack dev dependency. Version 2.6.6 uses webpack version ^4.22.0, while version 2.6.7 uses webpack version ~4.28.4. This tweak suggests potential improvements or bug fixes related to how Vue is bundled during development in the newer version.
While the vast majority of dev dependencies remain identical, including tools like rollup, terser, eslint, and various Babel plugins, this seemingly small shift in webpack could impact build times, bundle sizes, or compatibility with other development tools. Developers migrating from 2.6.6 to 2.6.7 should be aware of this change and test their build processes to ensure a smooth transition. Additionally, unpacked size of the package differs between the versions, but not significantly. The other data, such as author, license, repository, and even the file count in the distributed package, remain consistent, indicating that the change is focused on internal development enhancements rather than significant API alterations or feature additions. The release date also tells us that the version 2.6.7 was released later than version 2.6.6.
All the vulnerabilities related to the version 2.6.7 of the package
ReDoS vulnerability in vue package that is exploitable through inefficient regex evaluation in the parseHTML function
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.
To 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>
.
new Vue({
el: '#app',
template: '
<div>
Hello, world!
<script>${'<'.repeat(1000000)}</textarea>
</div>'
});
Next, set up a basic HTML page (e.g., index.html) to load this JavaScript and mount the Vue instance:
<!DOCTYPE html>
<html>
<head>
<title>My first Vue app</title>
</head>
<body>
<div id=\"app\">Loading...</div>
</body>
</html>
When 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.