This is not an easy question. IMHO CVSS moved on from a generic, catch-all evaluation of all XSS (it used to be more or less rXSS[] + post-auth pXSS[] = Medium, pre-auth pXSS = High). The examples make it clear that analyzing the specific impact on the application is important.
But that hasn't really caught on (in my experience). People are hesitant to give anything higher than High
to XSS (possibly with the exception of bxss in critical applications) and for the most part stick to the old-school thinking of pre-auth pXSS = High, everything else = Medium. If CVSS is applied as - imho - it should be, you often get scores that feel too high for XSS.
That being said, let's look at the different metrics.
Scope: Changed
That's standard for XSS and what the spec demands (scope change browser -> web app). I have seen cases where it is evaluated as Unchanged unless a different web app than the vulnerable one is affected. I think there's a certain rational to that, but it's not according to the spec.
User interaction: Required
This is also standard. I think there's an argument to be had that for persistent XSS, UI is none if the payload is in an regularly-visited functionality of the webpage (eg the front page). But it's a non-standard opinion.
Attack complexity: Low / High
Low is standard. Exploiting the issue at scale (eg sending rXSS links to a lot of users, posting a pXSS payload in a lot of places) isn't captured by AC.
CIA
This is the heart of the issue. Based on the CVSS XSS example we can see that indirect impact / the impact on the app in question matters.
But in my experience, rXSS is generally evaluated CI:Low since only one user can be attacked at a time (example for rXSS in the CVSS v4 spec with the standard 6.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
).
Now, imho there's an argument for High to be made. The CVSS spec talks about a total loss of confidentiality
(we generally don't have that when attacking one user) or the disclosed information presents a direct, serious impact
. Arguably, PII, private messages, credit cards, etc would qualify.
And that's just considering attacking "normal" users. What if we attack an admin? Eg in wordpress, that can generally lead to RCE. Which would give us 9.6 crit for a rXSS.
What about pXSS? Well, in practice, it's also often set as CI:Low (see eg here). That's clearly against the spec & examples. But if you don't do it, you quickly end up with a crit for pre-auth persistent XSS (if it's account takeover, which most XSS are). Is that right? Arguably it is. But it doesn't feel right (imho mostly because people underestimate XSS).
Essentially, I think most CVSS calculations try to fudge the value so that they get the familiar pre-auth pXSS = High, everything else = Medium. That's generally done in a number of ways:
- via UI: pXSS=None, rXSS=R. CI:Low
- via scope:unchanged: pre-auth pXSS: CI:High, otherwise Low
- by fudging CIA: rXSS LowLowNone, post-auth pXSS HighLowNone, pre-auth pXSS HighHighNone (or HighLowNone, doesn't matter)
- via AC (see eg this rXSS, which uses AC to fudge a crit to High).
jenkins is an interesting example. They set Scope:Unchanged, but - correctly - CIA:High because of the impact on the application (no surprises on AC,PR,UI). So they end up with High for post-auth pXSS & rXSS and (presumably) also High for pre-auth pXSS. If they were to set Scope:Changed (as the CVSS spec demands), all XSS would be crits.
--
Problems:
Above is the theory and my experience with and interpretation of the CVSS spec and examples (essentially, I think most people fudge it so it matches their gut feeling; which often under-estimates XSS; it would probably be helpful to think: "if this were a blind XSS that fired, would I still give it this score?" because people don't underestimate bXSS the same way).
We can see that no matter what we do we are running into a lot of problems with the scores we get and what we feel like a vulnerability should be.
We have eg seen that when considering the impact on the application, we can end up with a crit rXSS. Which doesn't really feel right (even though real-world impact might actually support that evaluation). We can also get situations where an rXSS isn't higher than a pre-auth pXSS which also seems odd.
What do I think? I like to stay close to the spec (while still fudging a bit if necessary). These are some examples how I'd rate things:
As you seem to be asking for bug bounty purposes, I can also say that this will for the most part not get through (especially if you find more than one XSS issue). IMHO it's according to spec (mostly), but rXSS and post-auth pXSS will be downgraded to Medium (even if you add an ATO POC). It's not fair, but that's how it is.
CVSS 4.0 to the rescue?
CVSS 4.0 looks interesting and like it might solve some problems:
- User interaction is separated into Active (rXSS, pXSS where you need to click a link, etc) and Passive (regular pXSS). This not only helps to differentiate rXSS and pXSS, but even different pXSS vulnerabilities.
- no more Scope, instead Vulnerable System & Subsequent System. It's still unclear how this will be handled in practice. This imho makes more sense than the Scope:Changed (browser -> web app) of CVSS 3.
But if you play around with the calculator, you will notice that you still don't get XSS scores that feel right. CVSS tries to cover a lot of different vulnerabilities (not just in web apps) & imho has real difficulties capturing XSS impact (which is disappointing, considering how common they are; I wish the CVSS 4 spec would add a lot more examples for common XSS scenarios).
[*] pXSS = persistent/stored XSS
rXSS = reflected XSS
[**] post-auth = requiring privileges (self-registration would eg be pre-auth; an example for post-auth is an app without registration where the account needs to be created by an admin or a low-priv user in an organization/tenant)