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

loofah 2.10.0 release flagged as CVE-2018-8048 (loofah < 2.2.1) #1603

Closed
ryanfb opened this issue Jun 6, 2021 · 2 comments · Fixed by #1607
Closed

loofah 2.10.0 release flagged as CVE-2018-8048 (loofah < 2.2.1) #1603

ryanfb opened this issue Jun 6, 2021 · 2 comments · Fixed by #1607

Comments

@ryanfb
Copy link

ryanfb commented Jun 6, 2021

Background

Brakeman version: 5.0.1
Rails version: 6.1.3.2
Ruby version: 3.0.1

False Positive

Full warning from Brakeman:

== Warnings ==

Confidence: Medium
Category: Cross-Site Scripting
Check: SanitizeMethods
Message: loofah gem 2.10.0 is vulnerable (CVE-2018-8048). Upgrade to 2.2.1
File: Gemfile.lock
Line: 215

Why might this be a false positive?

loofah 2.10.0 (released today) is later than 2.2.1, but the version comparison seems to be parsing it as being earlier than 2.2.1.

@runephilosof-abtion
Copy link
Contributor

irb: "2.10" < "2.2.1"
=> true

loofah_version and loofah_version < "2.2.1"

@biow0lf
Copy link

biow0lf commented Jun 7, 2021

Gem::Version.new("2.10") < Gem::Version.new("2.2.1") # => false

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants