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

False Positive CSRF Warning for RAILS LTS 4.2.11.20 #1656

Open
james-burkill opened this issue Dec 15, 2021 · 2 comments
Open

False Positive CSRF Warning for RAILS LTS 4.2.11.20 #1656

james-burkill opened this issue Dec 15, 2021 · 2 comments

Comments

@james-burkill
Copy link

Background

We are running Rails LTS version 4.2.11.20 and Brakeman is reporting a CSRF vulnerability warning. While no CVE id is provided in the warning, the closest match I can find in known vulnerabilities for vanilla Rails is CVE-2020-8166, which RailsLTS says does not affect v4.2 of LTS or any of their other supported Rails versions.

Brakeman version: 5.0.0
Rails version: 4.2.11.20 (RailsLTS)
Ruby version: 2.5.9

Link to Rails application code: N/A

False Positive

Full warning from Brakeman:
Confidence: Medium Category: Cross-Site Request Forgery Check: CSRFTokenForgeryCVE Message: Rails 4.2.11.20 has a vulnerability that may allow CSRF token forgery. Upgrade to Rails 5.2.4.3 or patch File: Gemfile.lock Line: 586

Relevant code:

Gemfile.lock

Line 586 contains this:
rails (4.2.11.20)

Why might this be a false positive?
CVE-2020-8166 is listed as not affecting RailsLTS v 4.2 and RailsLTS tell us they're unaware of any known vulnarabilities in RailsLTS v4.2.11.20.

`CVE-2020-8166

Rails 2.3 LTS is not affected.
Rails 3.2 LTS is not affected.
Rails 4.2 LTS is not affected.`
https://makandracards.com/railslts/474590-list-of-cves-addressed-by-rails-lts

@presidentbeef
Copy link
Owner

Thank you for reporting!

Brakeman isn't really up-to-date on RailsLTS versions.

@michaelglass
Copy link

howdy @jamesburkill-sage if you want to cut a PR to fix this, here's the last attempt:

#481

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

3 participants