Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regular Expression Denial of Service in useragent #3224

Closed
Tracked by #137
jason-upchurch opened this issue Oct 2, 2019 · 10 comments
Closed
Tracked by #137

Regular Expression Denial of Service in useragent #3224

jason-upchurch opened this issue Oct 2, 2019 · 10 comments

Comments

@jason-upchurch
Copy link
Contributor

jason-upchurch commented Oct 2, 2019

Summary

High severity vulnerability found in useragent
Description: Regular Expression Denial of Service (ReDoS)
Info: https://snyk.io/vuln/SNYK-JS-USERAGENT-174737
Introduced through: karma@4.1.0
From: karma@4.1.0 > useragent@2.3.0

Remediation: None yet

@jason-upchurch jason-upchurch changed the title [Snyk: Med] ReDoS in useragent (Due 11/1/2019) [Snyk: High] ReDoS in useragent (Due 11/1/2019) Oct 2, 2019
@jason-upchurch jason-upchurch added the Security: high Remediate within 30 days label Oct 2, 2019
@jason-upchurch jason-upchurch added this to the Sprint 10.3 milestone Oct 2, 2019
@jason-upchurch jason-upchurch changed the title [Snyk: High] ReDoS in useragent (Due 11/1/2019) [Snyk: High] Regular Expression Denial of Service in useragent (Due 11/1/2019) Oct 8, 2019
@lbeaufort
Copy link
Member

lbeaufort commented Oct 8, 2019

@patphongs @jason-upchurch if the karma package is only used by our automated tests, is it safe to say that this useragent@2.3.0 vulnerability doesn't impact us?

@jason-upchurch
Copy link
Contributor Author

@patphongs @lbeaufort
The maintainer's repo is here:
3rd-Eden/useragent#147

@jason-upchurch
Copy link
Contributor Author

@patphongs @lbeaufort The karma library repo is here: https://github.com/karma-runner/karma (this library makes use of useragent).
A fix does not appear to be available at this time, either through updating karma or useragent. I recommend keeping an eye on these two libraries/repos so that when a fix is available we can incorporate it.

@lbeaufort
Copy link
Member

lbeaufort commented Oct 8, 2019

@jason-upchurch thanks, I agree we should keep an eye out.

However, if I'm understanding the vulnerability, it requires user input as the attack vector, which we're not making available to the public. All the input to karma comes from our automated tests, so I don't think this vulnerability impacts us.

If that's the case, I think we can remove the due date and security label and bump this issue to a future sprint.

@patphongs
Copy link
Member

@jason-upchurch @lbeaufort Did some additional research on this. Because we are using karma under devDependencies, we are not compiling it in the final JS that gets pushed out to production. If you look inside of the ./fec/dist/fec/static/js files that the JS files get compiled to in production, you'll notice that searching for "karma" in the code will yield no results. Therefore, we're not pushing out dev dependencies to production. Do I have this correct @rfultz ?

@jason-upchurch
Copy link
Contributor Author

Moving to sprint 10.4 per @PaulClark2, keeping assigned to me, and I will keep an eye on remediation.

@rfultz
Copy link
Contributor

rfultz commented Oct 9, 2019

💯devDependencies are only used at compile-time and don't go to the production server. Only the code in /fec/dist goes to Prod.

I'm even less worried about this issue because Karma plays traffic cop during our JavaScript tests (npm run test-single) and isn't compiled into our code. It's called during npm run build-production, yes, but it only outputs to the screen.

@jason-upchurch
Copy link
Contributor Author

Reached out to SISO to discuss options for path forward. Planning discussion for next week.

@jason-upchurch
Copy link
Contributor Author

useragent is not used in production code. We will keep an eye on the package for updates nonetheless and update when available or investigate alternative packages if the need arises. Pushing out to Sprint 10.6 for now.

@jason-upchurch jason-upchurch changed the title [Snyk: High] Regular Expression Denial of Service in useragent (Due 11/1/2019) [Snyk: High] Regular Expression Denial of Service in useragent Oct 28, 2019
@lbeaufort lbeaufort removed the Security: high Remediate within 30 days label Oct 29, 2019
@lbeaufort lbeaufort changed the title [Snyk: High] Regular Expression Denial of Service in useragent Regular Expression Denial of Service in useragent Nov 18, 2019
@PaulClark2 PaulClark2 removed this from the Sprint 10.6 milestone Nov 19, 2019
@patphongs
Copy link
Member

only used for development, so we don't need this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants