Re:Looking at how many sites use vulnerable JavaScript libra...
by bastawhiz on Wednesday November 22, 2017 @03:14PM
(#15760162)
An XSS issue could make your users' data vulnerable.
Re:Looking at how many sites use vulnerable JavaScript libra...
by oneweekwonder on Wednesday November 22, 2017 @03:47PM
(#15760475)
But cors[0] headers can mitigate some of the risk?
Re:Looking at how many sites use vulnerable JavaScript libra...
by amenghra on Wednesday November 22, 2017 @05:17PM
(#15761177)
You want CSP headers to mitigate XSS risks.
Re:Looking at how many sites use vulnerable JavaScript libra...
by thefreeman on Wednesday November 22, 2017 @04:51PM
(#15761016)
Not really. CORS headers are set by the destination of the XHR. In the case of XSS it would be an attacker controlled server used to exfiltrate user cookies, etc.
Re:Looking at how many sites use vulnerable JavaScript libra...
by zaarn on Thursday November 23, 2017 @08:17AM
(#15764815)
Your backend should be double-checking any escaping the frontend does.
Otherwise you can throw your fancy anti-XSS on the frontend in the bin.
Also CSP helps.
Re:Looking at how many sites use vulnerable JavaScript libra...
by merb on Wednesday November 22, 2017 @03:14PM
(#15760171)
is still only an issue if you pass untrusted data to your js code.
Re:Looking at how many sites use vulnerable JavaScript libra...
by Klathmon on Wednesday November 22, 2017 @03:22PM
(#15760247)
And there is a pretty good chance of that happening in most JS projects.
Anywhere you take or show input from the user (an input box, a URL query, displaying data stored by some other system on the DB, etc...) could be a vector for an XSS attack.
And it's not just data passed to JS, but data passed to HTML or any data that could make it's way into CSS in many cases!
Re:Looking at how many sites use vulnerable JavaScript libra...
by sakshyamshah on Thursday November 23, 2017 @01:24AM
(#15763209)
turns out that most of times, untrusted user supplied data slips through JS codes https://www.owasp.org/index.php/Top_10_2017-Top_10
Re:Looking at how many sites use vulnerable JavaScript libra...
by will4274 on Thursday November 23, 2017 @02:22PM
(#15767247)
> No Front-End JS Library should actually make your backend vulnerable.
FUD. Most SPAs keep the authentication token accessible to JavaScript so it can be sent to the API server. And XSS in the FE JS can permit an attacker to steal the user's authentication token and then the attacker could impersonate the user and take any action as the user.
Re:Looking at how many sites use vulnerable JavaScript libra...
by wrinkl3 on Wednesday November 22, 2017 @03:24PM
(#15760270)
Vulnerabilities don't have to affect the backend - most of JQuery-related CVEs that I could find had to do with XSS.
Re:Looking at how many sites use vulnerable JavaScript libra...
by merb on Wednesday November 22, 2017 @05:39PM
(#15761314)
which can only happen if you pass wrong data from the backend to the jquery related function. I.e. dynamically generate input for $()...
Re:Looking at how many sites use vulnerable JavaScript libra...
by PetahNZ on Wednesday November 22, 2017 @06:26PM
(#15761591)
Well not really backend exclusive: `$('#foo').append('Showing search results for ' + (new URL(location)).searchParams.search);`
Re:Looking at how many sites use vulnerable JavaScript libra...
by sakshyamshah on Thursday November 23, 2017 @01:20AM
(#15763196)
Only if your front end is SPA and backend just serves through data via api. even in that case, xss in front-end can compromise admin's web sessions to pivot into backend services.
Does that even matter? No Front-End JS Library should actually make your backend vulnerable.