Hello fellow hackers, I have been wondering whether it is necessary to keep your javascript libraries up to date. I came across an article
https://snyk.io/blog/77-percent-of-sites-use-vulnerable-js-libraries/
Is it really necessary to keep libraries up to date ?
What happens if they are not updated ?
Have you experienced migrations due to deprecated libraries ?
It's important to do regularly, but I wouldn't worry about it too much. It's not just about security, but it's also about keeping pace with the libraries you are depending on. It's much harder to upgrade if you've missed on on various intermediate upgrades - doing lots of little upgrades is easier than few bigger upgrades.
It can even get to the point where you just get stuck in upgrade hell because jumping from version 1 to version 5 of something triggers all of these other problems in your code and you can't even figure it out because it's so broken.
The counter argument is that you also don't want to be on the bleeding edge, bumping into problems that nobody else has had and you can't quickly Google for a solution.
Small regular updates - and it's not just JS anymore, things like Java and .Net have exactly the same issues.
I am going to make the assumption you are talking about js libraries like jquery or sweetAlert.
The short answer is it is not required but it is recommended in order to remove general bugs, improve end-user/developer experience, and reduce potential vulnerabilities.
When it comes to front end libraries, updating isn't always necessary because the library can work perfectly for your needs. As far as security goes, a malicious user isn't going to break into your website if you are using jquery 1 instead of 3. But a malicious user can take down your website if you are dependent on front-end data validation for what is coming into your server.
Make sure to check twice, once on the front end and once on the server.
Migrating to brand new versions (1 -> 3) can be very messy as the methods you were using probably changed and no longer work the same way. This can take a long time to clean up if you have an old/disorganized app.