Skip to content

Commit

Permalink
Merge branch 'issue_43_cve_2014_0036' into development
Browse files Browse the repository at this point in the history
Conflicts:
	lib/codesake/dawn/knowledge_base.rb
	spec/lib/dawn/codesake_knowledgebase_spec.rb
  • Loading branch information
thesp0nge committed Mar 14, 2014
2 parents 690531b + a82cb08 commit 9550d0a
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Expand Up @@ -52,6 +52,7 @@ _latest update: Thu Feb 13 08:31:37 CET 2014_
or just old. I enabled only check against ruby

* Added a check for CVE-2014-2322
* Added a check for CVE-2014-0036

## Version 1.0.4 - codename: Lightning McQueen (2014-03-14)

Expand Down
29 changes: 29 additions & 0 deletions lib/codesake/dawn/kb/cve_2014_0036.rb
@@ -0,0 +1,29 @@
module Codesake
module Dawn
module Kb
# Automatically created with rake on 2014-03-14
class CVE_2014_0036
include DependencyCheck

def initialize
message = "rbovirt Gem for Ruby contains a flaw related to certificate validation. The issue is due to the program failing to validate SSL certificates. This may allow an attacker with access to network traffic (e.g. MiTM, DNS cache poisoning) to spoof the SSL server via an arbitrary certificate that appears valid. Such an attack would allow for the interception of sensitive traffic, and potentially allow for the injection of content into the SSL stream."

super({
:name=>"CVE-2014-0036",
:cvss=>"",
:release_date => Date.new(2014, 3, 5),
:cwe=>"20",
:owasp=>"A9",
:applies=>["sinatra", "padrino", "rails"],
:kind=>Codesake::Dawn::KnowledgeBase::DEPENDENCY_CHECK,
:message=>message,
:mitigation=>"Please upgrade rbovirt version at least to 0.0.24. As a general rule, using the latest version is recommended.",
:aux_links=>["http://www.securityfocus.com/bid/66006"]
})

self.safe_dependencies = [{:name=>"rbovirt", :version=>['0.0.24']}]
end
end
end
end
end
2 changes: 2 additions & 0 deletions lib/codesake/dawn/knowledge_base.rb
Expand Up @@ -211,6 +211,7 @@

# CVE - 2014

require "codesake/dawn/kb/cve_2014_0036"
require "codesake/dawn/kb/cve_2014_0080"
require "codesake/dawn/kb/cve_2014_0081"
require "codesake/dawn/kb/cve_2014_0082"
Expand Down Expand Up @@ -442,6 +443,7 @@ def self.load_security_checks
Codesake::Dawn::Kb::CVE_2013_7086.new,
Codesake::Dawn::Kb::CVE_2014_1233.new,
Codesake::Dawn::Kb::CVE_2014_1234.new,
Codesake::Dawn::Kb::CVE_2014_0036.new,
Codesake::Dawn::Kb::CVE_2014_0080.new,
Codesake::Dawn::Kb::CVE_2014_0081.new,
Codesake::Dawn::Kb::CVE_2014_0082.new,
Expand Down
6 changes: 6 additions & 0 deletions spec/lib/dawn/codesake_knowledgebase_spec.rb
Expand Up @@ -866,4 +866,10 @@
sc.should_not be_nil
sc.class.should == Codesake::Dawn::Kb::CVE_2014_2322
end

it "must have test for CVE-2014-0036" do
sc = kb.find("CVE-2014-0036")
sc.should_not be_nil
sc.class.should == Codesake::Dawn::Kb::CVE_2014_0036
end
end
16 changes: 16 additions & 0 deletions spec/lib/kb/cve_2014_0036_spec.rb
@@ -0,0 +1,16 @@
require 'spec_helper'
describe "The CVE-2014-0036 vulnerability" do
before(:all) do
@check = Codesake::Dawn::Kb::CVE_2014_0036.new
# @check.debug = true
end
it "must be filled with CVSS information"
it "is reported when a vulnerable rbovirt gem version is detected (0.0.23)" do
@check.dependencies = [{:name=>"rbovirt", :version=>'0.0.23'}]
@check.vuln?.should be_true
end
it "is not reported when a sage rbovirt gem version is detected (0.0.24)" do
@check.dependencies = [{:name=>"rbovirt", :version=>'0.0.24'}]
@check.vuln?.should be_false
end
end

0 comments on commit 9550d0a

Please sign in to comment.