CVSS (Common Vulnerability Scoring System) is a system created to help expressing the severity of vulnerabilities. This makes it easier for developers and maintainers to get a clear overview over the current known vulnerabilities and help to prioritize them. This results in them being able to create the “right patches at the right time” to a greater extent than they would’ve been able to without such a tool. Detectify uses CVSSv2 (which is the latest version of CVSS and also the standard classification system for PCI DSS) and CWSSv0.8 (Common Weakness Scoring System) for the same reason.
The CVSSv2 consists of the following metric(measurement) groups:
- Base Metrics
- Temporal Metrics
- Environmental Metrics
The Base Metrics describe the fundamental qualities of the vulnerability, namely the exploitability and impact, and can not change over time. The Temporal Metrics deal with time-related details, and are likely to change, for example when a PoC (Proof-of-concept) has been released. These metrics are optional, but often included. The third and last group are the Environmental Metrics. These convey information on how serious a vulnerability is to a specific company, individual or organization.
After figuring out the metrics of a group, you can put their abbreviations into a list, called a vector. This is just a summary of the metrics. What is interesting, is the score. If you have the metrics all sorted out, you can calculate the vulnerability score of each group or overall. A CVSS score is a number from 0 to 10 where 10 is the most critical. To calculate the score of a vulnerability you have to insert the numbers in the CVSSv2 equation. This, however, takes time, and you’ll probably be better off using a calculator like this.
Calculating a vulnerability
A few months ago we wrote about a new Universal XSS (UXSS) in Opera. To calculate the CVSS score of that, we need to look into each and everyone of the metrics types. We have exemplified this below by going through all metrics. (Below the example you find a table with the scoring for each metrics.)
The base metrics
Access vector
The Opera bug is most likely to be exploited over the internet, so we chose the metric AV:N (Access Vector: Network).
Access complexity
The bug got a few requirements (like the Opera browser) and requires in-depth knowledge about how to (ab)use it, and how to put the bug in practice, so we choose to classify it as a moderately complex attack, AC:M (Access Complexity: Medium).
Authentication
There is no need to be authenticated to any system to use the bug, therefore we choose to rate it as: Au:N (Authentication: None).
Confidentiality Impact
One can argue how much confidential information is lost by this bug (through the said XSS vulnerability). The classification is of course dependent on what systems that is affected and so forth. However, the risk of documents stored on the local machine getting leaked is close to zero. What is more likely to happen, is session information stored in cookies, or other browser information to be leaked. With that said, we chose to classify the confidentiality metric as: C:P (Confidentiality Impact: Partial).
Integrity Impact
Same applies with the integrity, the most likely effect would be modification of say, cookies or your user profile (on say, a vulnerable forum), but not physical files on your hard disk. With other words, I:P (Integrity Impact: Partial).
Availability Impact
Lastly, the availability factor. How likely is it to disrupt the systems operations? Well, I argue like this: XSS’es tend to run JavaScript, the worst availability impact JavaScript can do is either to eat RAM or to make CPU spikes. However, by closing the tab in the browser the system will (hopefully) be restored to a more stable state. A:P (Availability Impact: Partial).
Summary of the Base metrics
So to summarize, with that evaluation, we’ll end up with the base metric of: AV:N/AC:M/Au:N/C:P/I:P/A:N, and by applying the CVSSv2 algorithm on the metrics, we’d see that the final score, in turn, would become 5.8. Although, CVSSv2 algorithm supports two more “groups”, used to make finer adjustments, namely the temporal and environmental groups.
The environmental group
The environmental group is used for explaining the target distribution (in this case the amount of vulnerable internet users) and the collateral damage that the bug may cause. Whilst the environmental group tries to explain the likelihood of exploitation versus what patches and solutions that are available to solve the issue.
Collateral Damage Potential
So let’s take a look at the environmental group. One may ask: what collateral damage is most likely to happen if someone were to run an attack using this bug? To be honest, I have no clue. It’s system dependant, and it highly depends on what party/parties that’s get involved. Therefore we choose to classify it as: CDP:ND (Collateral Damage Potential: Not Defined).
Target Distribution
All right. This one is simple. How many users (internet users in this case) are likely to be vulnerable? According to wikipedia Opera represented about 4.5% of all internet users September 2012. If we look at the metric, we’ll see that the Low factor fits perfect (0%-25% target distribution). That means the metric in turn is: TD:L (Target Distribution: Low).
Security Requirements
The Security Requirements metric is calculated from three sub-metrics, Integrity Requirement, Availability Requirement and Confidentiality Requirement. Namely IR, AR and CR. The CVSSv2 documentation found at first.org states the following: “These metrics enable the analyst to customize the CVSS score depending on the importance of the affected IT asset to a user’s organization, measured in terms of confidentiality, integrity, and availability, That is, if an IT asset supports a business function for which availability is most important, the analyst
can assign a greater value to availability, relative to confidentiality and integrity. Each security requirement has three possible values: “low,” “medium,” or “high.””. With that said, we don’t know what may be affected or not, or what other vulnerabilities the individual or corporation have. We cannot classify any of these vectors in a reasonable manner without further information of the target. Therefore: CR:ND (Confidentiality Requirement: Not Defined), IR:ND (Integrity Requirement: Not Defined) and AR:ND (Availability Requirement: Not Defined).
Lastly, we have the Temporal group.
Exploitability
On what level is the exploit available? CVSSv2 have several variants on how to tackle this issue, namely: “Not Defined”, “Unproven that exploit exists”, “Proof of concept code”, “Functional exploit exists” and “High”. As far as I know, there only exists proof of concept code, as seen in our previous post about Opera UXSS. With that said, the metric in turn would become something like: E:POC (Exploitability: Proof of concept code).
Remediation Level
Is there an official patch available? Why, yes there is, over at opera.com: “Opera Software has released Opera 12.10, where this issue has been fixed.”. The metric? RL:O (Remediation Level: Official fix).
Report Confidence
Is this bug for real? Has there been any research on it? Yes, Opera did release a patch. The threat is (was) very real. So the last metric: RC:C (Report Confidence: Confirmed).
So to summarize, we put all the individual metrics through the algorithm, and we’ll end up with the following:
CVSS Base Score
5.8
Impact Subscore
4.9
Exploitability Subscore
8.6
CVSS Temporal Score
4.5
CVSS Environmental Score
1.1
Modified Impact Subscore
4.9
Overall CVSS Score
1.1
With the resulting vector
AV:N/AC:M/Au:N/C:P/I:P/A:N/E:P/RL:O/RC:C/CDP:ND/TD:L/CR:ND/IR:ND/AR:ND.
The score to use in this case would become 1.1. Remember the base vector of 5.8?
The point of the temporal and environmental groups is to better classify the real threat about this specific bug, to help developers, analysts and other staff to rank how important the threat really is. With our argumentation on the additional vectors above, we’ve successfully reduced the threat by -4.7 to 1.1.
The whole point of bug classification is to help the managing staff to get a hold on the importance of specific bugs, to help prioritizing what to patch. CVSSv2 is not an exact and perfect magic thing, but rather a tool to help developers see what to focus on.
A comprehensive and correct reference of each metric can be found here, or you can check them out in the table below.
| Metric group |
Metric |
Values |
Numerical values |
|---|
| Base metrics |
Access vector |
Local |
0.395 |
|
|
Adjacent Network |
0.646 |
|
|
Network |
1 |
|
Access complexity |
High |
0.35 |
|
|
Medium |
0.61 |
|
|
Low |
0.71 |
|
Authentication |
Multiple |
0.45 |
|
|
Single |
0.56 |
|
|
None |
0.704 |
|
Confidentiality impact |
None |
0 |
|
|
Partial |
0.275 |
|
|
Complete |
0.660 |
|
Integrity impact |
None |
0 |
|
|
Partial |
0.275 |
|
|
Complete |
0.660 |
|
Avaliability impact |
None |
0 |
|
|
Partial |
0.275 |
|
|
Complete |
0.660 |
| Temporal Metrics |
Exploitability |
Unproven |
0.85 |
|
|
Proof-of-concept |
0.9 |
|
|
Functional |
0.95 |
|
|
High |
1 |
|
|
Not defined |
1 |
|
Remedation level |
Official fix |
0.87 |
|
|
Temporary fix |
0.9 |
|
|
Workaround |
0.95 |
|
|
Unavaliable |
1 |
|
|
Not defined |
1 |
|
Report Confidence |
Unconfirmed |
0.9 |
|
|
Uncorroborated |
0.95 |
|
|
Confirmed |
1 |
|
|
Not defined |
1 |
| Enviornmental Metrics |
Collateral Damage Potential |
None |
1 |
|
|
Low |
0.1 |
|
|
Low-Medium |
0.3 |
|
|
Medium-high |
0.4 |
|
|
High |
0.5 |
|
|
Not defined |
0 |
|
Target Distrubution |
None |
0 |
|
|
Low |
0.25 |
|
|
Medium |
0.75 |
|
|
High |
1 |
|
|
Not defined |
1 |
|
Security requirements |
Low |
N/A |
|
|
Medium |
N/A |
|
|
High |
N/A |
|
|
Not defined |
N/A |
Please note that the Security Requirements metric is calculated from three sub-metrics, Integrity Requirement, Availability Requirement and Confidentiality Requirement.
Read more:
www.first.org/cvss
www.first.org/cvss/cvss-guide.html
www.first.org/cvss/cvss_basic-2.0.pdf
By: Håkon Vågsether & Fredrik Nordberg Almroth