Attacks on today’s web are an unsurprising reality – websites are hacked daily, data is being stolen and leaked left, right and centre. In many (though not all) cases, attacks on web applications are successful because a targeted web application is susceptible to security vulnerabilities – vulnerabilities which derive from its components. In the penultimate segment of the 2017 OWASP Top 10 series, I will cover how using components with known vulnerabilities can affect your web application, tell how such risks are exploited in the wild and explain why it is an issue that needs attention.
This risk is really as simple as it sounds – it is such a security vulnerability that derives from using components with known security vulnerabilities. Here’s how OWASP summarises the flaw:
Threat Agents / Attack Vectors | Security Weakness | Impacts | |||
---|---|---|---|---|---|
App Specific | Exploitability: 2 | Prevalence: 3 | Detectability: 2 | Technical: 2 | Business: ? |
While it is easy to find already-written exploits for many known vulnerabilities, other vulnerabilities require concentrated effort to develop a custom exploit. | Prevalence of this issue is very widespread. Component-heavy development patterns can lead to development teams not even understanding which components they use in their application or API, much less keeping them up to date. Some scanners such as retire.js help in detection, but determining exploitability requires additional effort. | While some known vulnerabilities lead to only minor impacts, some of the largest breaches to date have relied on exploiting known vulnerabilities in components. Depending on the assets you are protecting, perhaps this risk should be at the top of the list. |
This is a question that will inevitably be asked and such a question is hard to answer precisely, but honestly, if your web application is running software of some kind, it most likely is. WordPress is a perfect example – the majority of data breaches regarding it are possible because web developers use third-party add-ons that contain security vulnerabilities. Third-party features and plugins are great – they can extend the functionality of the system that is being used; the problem is, however, that in many cases, new features introduce new security vulnerabilities. In order to know if your web application is susceptible to this issue, ask yourself these questions:
Of course, there are other measures that could be taken, I’ve only listed a few of them.
For a second, imagine that your web application is susceptible to this security vulnerability. As a security conscious web developer, you are probably wondering how would a nefarious party attack your web application? The answer is, it depends – because this risk is non-specific (your web application could become vulnerable to all sorts of flaws which might be exploited in all sorts of ways – it all depends on what web application components you use and what vulnerabilities they have), it’s hard to comprehensively demonstrate, but consider this:
You completed all points I’ve mentioned above – your web application is no longer vulnerable to this security flaw! Yes, I’m kidding, because that’s not how it works. In most cases (including this one), web security comes down to risk mitigation. I’ve said it before and I will say it again: there is no such thing as 100% security. Security can (and should) be hardened though, which brings me to the next point…
Web application firewalls are a great additional layer of defense – WAF’s can be put in front of your web application, understand when it’s getting attacked, and halt exploitation attempts. They are dead easy to implement too, thanks to WAF-as-a-service solutions. With that mentioned, none of this is to say Web Application Firewalls should be a justification for writing vulnerable code – they should be used as an additional layer of defense, not as an excuse for writing unsafe code without thinking about the consequences such actions might bring. Oh, and if you’re about to use a firewall (or are already using one) actually utilize the features available and log the rule violations (meme by Jack Rhysider):
Usage of components with known vulnerabilities is a very widespread and serious issue. While the explanation how to overcome such a flaw could be pretty obvious (web developers should not use components that are known to have vulnerabilities), the completion of such a task nowadays is close to impossible.
It is pretty hard to arrive at the description of what should you do in order to avoid this vulnerability being introduced to your web application (chances are your web application is already susceptible to it), but some general tips you can takeaway include knowing what components your web application is using, only using those components that are necessary, utilizing a web application firewall in order to reflect some of the web application security threats and frequently checking security bulletins such as the CVE (Common Vulnerabilities and Exploits) database and the Exploit-DB.
This blog will walk you through some lessons for conference speakers who speak remotely no…
Insecure data storage is the second vulnerability in the OWASP Mobile Top 10 list. Insecure…
The improper platform usage vulnerability is the first vulnerability in the OWASP Mobile Top 10.…
If you ever heard of web application security, you probably heard of OWASP. And if…
If you have ever built a website, chances are you took care of security. Securing…
It's November. For some developers it's just an ordinary month - for some of them…