codesake-dawn 0.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +18 -0
- data/.rvmrc +48 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +54 -0
- data/Rakefile +64 -0
- data/Roadmap.md +44 -0
- data/bin/dawn +106 -0
- data/codesake_dawn.gemspec +25 -0
- data/lib/codesake-dawn.rb +7 -0
- data/lib/codesake/dawn/engine.rb +144 -0
- data/lib/codesake/dawn/kb/basic_check.rb +93 -0
- data/lib/codesake/dawn/kb/cve_2011_2931.rb +32 -0
- data/lib/codesake/dawn/kb/cve_2012_2660.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2012_2661.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2012_2694.rb +31 -0
- data/lib/codesake/dawn/kb/cve_2012_2695.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2012_3465.rb +28 -0
- data/lib/codesake/dawn/kb/cve_2012_6496.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2012_6497.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2013_0155.rb +30 -0
- data/lib/codesake/dawn/kb/cve_2013_0269.rb +29 -0
- data/lib/codesake/dawn/kb/cve_2013_0333.rb +33 -0
- data/lib/codesake/dawn/kb/cve_2013_1800.rb +28 -0
- data/lib/codesake/dawn/kb/cve_2013_1855.rb +20 -0
- data/lib/codesake/dawn/kb/cve_2013_1857.rb +22 -0
- data/lib/codesake/dawn/kb/dependency_check.rb +39 -0
- data/lib/codesake/dawn/kb/not_revised_code.rb +24 -0
- data/lib/codesake/dawn/kb/pattern_match_check.rb +60 -0
- data/lib/codesake/dawn/knowledge_base.rb +105 -0
- data/lib/codesake/dawn/rails.rb +17 -0
- data/lib/codesake/dawn/sinatra.rb +14 -0
- data/lib/codesake/dawn/version.rb +5 -0
- data/spec/lib/dawn/codesake_knowledgebase_spec.rb +100 -0
- data/spec/lib/dawn/codesake_sinatra_engine_spec.rb +80 -0
- data/spec/lib/kb/codesake_cve_2013_1800_spec.rb +66 -0
- data/spec/lib/kb/codesake_cve_2013_1855_spec.rb +16 -0
- data/spec/lib/kb/cve_2011_2931_spec.rb +7 -0
- data/spec/lib/kb/cve_2012_2660_spec.rb +9 -0
- data/spec/lib/kb/cve_2012_2661_spec.rb +7 -0
- data/spec/lib/kb/cve_2012_2694_spec.rb +7 -0
- data/spec/lib/kb/cve_2012_2695_spec.rb +7 -0
- data/spec/lib/kb/cve_2012_3465_spec.rb +7 -0
- data/spec/lib/kb/cve_2012_6496_spec.rb +7 -0
- data/spec/lib/kb/cve_2012_6497_spec.rb +7 -0
- data/spec/lib/kb/cve_2013_0155_spec.rb +7 -0
- data/spec/lib/kb/cve_2013_0269_spec.rb +7 -0
- data/spec/lib/kb/cve_2013_0333_spec.rb +7 -0
- data/spec/lib/kb/cve_2013_1857_spec.rb +13 -0
- data/spec/spec_helper.rb +1 -0
- data/spec/support/hello_world_3.0.19/.gitignore +4 -0
- data/spec/support/hello_world_3.0.19/Gemfile +31 -0
- data/spec/support/hello_world_3.0.19/README +256 -0
- data/spec/support/hello_world_3.0.19/Rakefile +7 -0
- data/spec/support/hello_world_3.0.19/app/controllers/application_controller.rb +3 -0
- data/spec/support/hello_world_3.0.19/app/helpers/application_helper.rb +2 -0
- data/spec/support/hello_world_3.0.19/app/views/layouts/application.html.erb +14 -0
- data/spec/support/hello_world_3.0.19/config.ru +4 -0
- data/spec/support/hello_world_3.0.19/config/application.rb +42 -0
- data/spec/support/hello_world_3.0.19/config/boot.rb +6 -0
- data/spec/support/hello_world_3.0.19/config/database.yml +22 -0
- data/spec/support/hello_world_3.0.19/config/environment.rb +5 -0
- data/spec/support/hello_world_3.0.19/config/environments/development.rb +26 -0
- data/spec/support/hello_world_3.0.19/config/environments/production.rb +49 -0
- data/spec/support/hello_world_3.0.19/config/environments/test.rb +35 -0
- data/spec/support/hello_world_3.0.19/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/support/hello_world_3.0.19/config/initializers/inflections.rb +10 -0
- data/spec/support/hello_world_3.0.19/config/initializers/mime_types.rb +5 -0
- data/spec/support/hello_world_3.0.19/config/initializers/secret_token.rb +7 -0
- data/spec/support/hello_world_3.0.19/config/initializers/session_store.rb +8 -0
- data/spec/support/hello_world_3.0.19/config/locales/en.yml +5 -0
- data/spec/support/hello_world_3.0.19/config/routes.rb +58 -0
- data/spec/support/hello_world_3.0.19/db/seeds.rb +7 -0
- data/spec/support/hello_world_3.0.19/lib/tasks/.gitkeep +0 -0
- data/spec/support/hello_world_3.0.19/public/404.html +26 -0
- data/spec/support/hello_world_3.0.19/public/422.html +26 -0
- data/spec/support/hello_world_3.0.19/public/500.html +26 -0
- data/spec/support/hello_world_3.0.19/public/favicon.ico +0 -0
- data/spec/support/hello_world_3.0.19/public/images/rails.png +0 -0
- data/spec/support/hello_world_3.0.19/public/index.html +239 -0
- data/spec/support/hello_world_3.0.19/public/javascripts/application.js +2 -0
- data/spec/support/hello_world_3.0.19/public/javascripts/controls.js +965 -0
- data/spec/support/hello_world_3.0.19/public/javascripts/dragdrop.js +974 -0
- data/spec/support/hello_world_3.0.19/public/javascripts/effects.js +1123 -0
- data/spec/support/hello_world_3.0.19/public/javascripts/prototype.js +6001 -0
- data/spec/support/hello_world_3.0.19/public/javascripts/rails.js +202 -0
- data/spec/support/hello_world_3.0.19/public/robots.txt +5 -0
- data/spec/support/hello_world_3.0.19/public/stylesheets/.gitkeep +0 -0
- data/spec/support/hello_world_3.0.19/script/rails +6 -0
- data/spec/support/hello_world_3.0.19/test/performance/browsing_test.rb +9 -0
- data/spec/support/hello_world_3.0.19/test/test_helper.rb +13 -0
- data/spec/support/hello_world_3.0.19/vendor/plugins/.gitkeep +0 -0
- data/spec/support/hello_world_3.1.0/.gitignore +5 -0
- data/spec/support/hello_world_3.1.0/Gemfile +33 -0
- data/spec/support/hello_world_3.1.0/README +261 -0
- data/spec/support/hello_world_3.1.0/Rakefile +7 -0
- data/spec/support/hello_world_3.1.0/app/assets/images/rails.png +0 -0
- data/spec/support/hello_world_3.1.0/app/assets/javascripts/application.js +9 -0
- data/spec/support/hello_world_3.1.0/app/assets/stylesheets/application.css +7 -0
- data/spec/support/hello_world_3.1.0/app/controllers/application_controller.rb +3 -0
- data/spec/support/hello_world_3.1.0/app/helpers/application_helper.rb +2 -0
- data/spec/support/hello_world_3.1.0/app/mailers/.gitkeep +0 -0
- data/spec/support/hello_world_3.1.0/app/models/.gitkeep +0 -0
- data/spec/support/hello_world_3.1.0/app/views/layouts/application.html.erb +14 -0
- data/spec/support/hello_world_3.1.0/config.ru +4 -0
- data/spec/support/hello_world_3.1.0/config/application.rb +48 -0
- data/spec/support/hello_world_3.1.0/config/boot.rb +6 -0
- data/spec/support/hello_world_3.1.0/config/database.yml +25 -0
- data/spec/support/hello_world_3.1.0/config/environment.rb +5 -0
- data/spec/support/hello_world_3.1.0/config/environments/development.rb +30 -0
- data/spec/support/hello_world_3.1.0/config/environments/production.rb +60 -0
- data/spec/support/hello_world_3.1.0/config/environments/test.rb +42 -0
- data/spec/support/hello_world_3.1.0/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/support/hello_world_3.1.0/config/initializers/inflections.rb +10 -0
- data/spec/support/hello_world_3.1.0/config/initializers/mime_types.rb +5 -0
- data/spec/support/hello_world_3.1.0/config/initializers/secret_token.rb +7 -0
- data/spec/support/hello_world_3.1.0/config/initializers/session_store.rb +8 -0
- data/spec/support/hello_world_3.1.0/config/initializers/wrap_parameters.rb +14 -0
- data/spec/support/hello_world_3.1.0/config/locales/en.yml +5 -0
- data/spec/support/hello_world_3.1.0/config/routes.rb +58 -0
- data/spec/support/hello_world_3.1.0/db/seeds.rb +7 -0
- data/spec/support/hello_world_3.1.0/lib/assets/.gitkeep +0 -0
- data/spec/support/hello_world_3.1.0/lib/tasks/.gitkeep +0 -0
- data/spec/support/hello_world_3.1.0/log/.gitkeep +0 -0
- data/spec/support/hello_world_3.1.0/public/404.html +26 -0
- data/spec/support/hello_world_3.1.0/public/422.html +26 -0
- data/spec/support/hello_world_3.1.0/public/500.html +26 -0
- data/spec/support/hello_world_3.1.0/public/favicon.ico +0 -0
- data/spec/support/hello_world_3.1.0/public/index.html +241 -0
- data/spec/support/hello_world_3.1.0/public/robots.txt +5 -0
- data/spec/support/hello_world_3.1.0/script/rails +6 -0
- data/spec/support/hello_world_3.1.0/test/fixtures/.gitkeep +0 -0
- data/spec/support/hello_world_3.1.0/test/functional/.gitkeep +0 -0
- data/spec/support/hello_world_3.1.0/test/integration/.gitkeep +0 -0
- data/spec/support/hello_world_3.1.0/test/performance/browsing_test.rb +12 -0
- data/spec/support/hello_world_3.1.0/test/test_helper.rb +13 -0
- data/spec/support/hello_world_3.1.0/test/unit/.gitkeep +0 -0
- data/spec/support/hello_world_3.1.0/vendor/assets/stylesheets/.gitkeep +0 -0
- data/spec/support/hello_world_3.1.0/vendor/plugins/.gitkeep +0 -0
- data/spec/support/hello_world_3.2.13/.gitignore +15 -0
- data/spec/support/hello_world_3.2.13/Gemfile +38 -0
- data/spec/support/hello_world_3.2.13/README.rdoc +261 -0
- data/spec/support/hello_world_3.2.13/Rakefile +7 -0
- data/spec/support/hello_world_3.2.13/app/assets/images/rails.png +0 -0
- data/spec/support/hello_world_3.2.13/app/assets/javascripts/application.js +15 -0
- data/spec/support/hello_world_3.2.13/app/assets/stylesheets/application.css +13 -0
- data/spec/support/hello_world_3.2.13/app/controllers/application_controller.rb +3 -0
- data/spec/support/hello_world_3.2.13/app/helpers/application_helper.rb +2 -0
- data/spec/support/hello_world_3.2.13/app/mailers/.gitkeep +0 -0
- data/spec/support/hello_world_3.2.13/app/models/.gitkeep +0 -0
- data/spec/support/hello_world_3.2.13/app/views/layouts/application.html.erb +14 -0
- data/spec/support/hello_world_3.2.13/config.ru +4 -0
- data/spec/support/hello_world_3.2.13/config/application.rb +62 -0
- data/spec/support/hello_world_3.2.13/config/boot.rb +6 -0
- data/spec/support/hello_world_3.2.13/config/database.yml +25 -0
- data/spec/support/hello_world_3.2.13/config/environment.rb +5 -0
- data/spec/support/hello_world_3.2.13/config/environments/development.rb +37 -0
- data/spec/support/hello_world_3.2.13/config/environments/production.rb +67 -0
- data/spec/support/hello_world_3.2.13/config/environments/test.rb +37 -0
- data/spec/support/hello_world_3.2.13/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/support/hello_world_3.2.13/config/initializers/inflections.rb +15 -0
- data/spec/support/hello_world_3.2.13/config/initializers/mime_types.rb +5 -0
- data/spec/support/hello_world_3.2.13/config/initializers/secret_token.rb +7 -0
- data/spec/support/hello_world_3.2.13/config/initializers/session_store.rb +8 -0
- data/spec/support/hello_world_3.2.13/config/initializers/wrap_parameters.rb +14 -0
- data/spec/support/hello_world_3.2.13/config/locales/en.yml +5 -0
- data/spec/support/hello_world_3.2.13/config/routes.rb +58 -0
- data/spec/support/hello_world_3.2.13/db/seeds.rb +7 -0
- data/spec/support/hello_world_3.2.13/lib/assets/.gitkeep +0 -0
- data/spec/support/hello_world_3.2.13/lib/tasks/.gitkeep +0 -0
- data/spec/support/hello_world_3.2.13/log/.gitkeep +0 -0
- data/spec/support/hello_world_3.2.13/public/404.html +26 -0
- data/spec/support/hello_world_3.2.13/public/422.html +26 -0
- data/spec/support/hello_world_3.2.13/public/500.html +25 -0
- data/spec/support/hello_world_3.2.13/public/favicon.ico +0 -0
- data/spec/support/hello_world_3.2.13/public/index.html +241 -0
- data/spec/support/hello_world_3.2.13/public/robots.txt +5 -0
- data/spec/support/hello_world_3.2.13/script/rails +6 -0
- data/spec/support/hello_world_3.2.13/test/fixtures/.gitkeep +0 -0
- data/spec/support/hello_world_3.2.13/test/functional/.gitkeep +0 -0
- data/spec/support/hello_world_3.2.13/test/integration/.gitkeep +0 -0
- data/spec/support/hello_world_3.2.13/test/performance/browsing_test.rb +12 -0
- data/spec/support/hello_world_3.2.13/test/test_helper.rb +13 -0
- data/spec/support/hello_world_3.2.13/test/unit/.gitkeep +0 -0
- data/spec/support/hello_world_3.2.13/vendor/assets/javascripts/.gitkeep +0 -0
- data/spec/support/hello_world_3.2.13/vendor/assets/stylesheets/.gitkeep +0 -0
- data/spec/support/hello_world_3.2.13/vendor/plugins/.gitkeep +0 -0
- data/spec/support/lorem.txt +23 -0
- data/spec/support/sinatra-safe/.gems +4 -0
- data/spec/support/sinatra-safe/.gitignore +6 -0
- data/spec/support/sinatra-safe/Gemfile +18 -0
- data/spec/support/sinatra-safe/MIT-LICENSE +20 -0
- data/spec/support/sinatra-safe/README.rdoc +35 -0
- data/spec/support/sinatra-safe/Rakefile +32 -0
- data/spec/support/sinatra-safe/application.rb +23 -0
- data/spec/support/sinatra-safe/config.ru +11 -0
- data/spec/support/sinatra-safe/environment.rb +25 -0
- data/spec/support/sinatra-safe/lib/profile.rb +11 -0
- data/spec/support/sinatra-safe/public/main.css +52 -0
- data/spec/support/sinatra-safe/script/console +16 -0
- data/spec/support/sinatra-safe/views/layout.haml +14 -0
- data/spec/support/sinatra-safe/views/root.haml +4 -0
- data/spec/support/sinatra-vulnerable/.gems +4 -0
- data/spec/support/sinatra-vulnerable/.gitignore +6 -0
- data/spec/support/sinatra-vulnerable/Gemfile +17 -0
- data/spec/support/sinatra-vulnerable/MIT-LICENSE +20 -0
- data/spec/support/sinatra-vulnerable/README.rdoc +35 -0
- data/spec/support/sinatra-vulnerable/Rakefile +32 -0
- data/spec/support/sinatra-vulnerable/application.rb +28 -0
- data/spec/support/sinatra-vulnerable/config.ru +11 -0
- data/spec/support/sinatra-vulnerable/environment.rb +25 -0
- data/spec/support/sinatra-vulnerable/lib/profile.rb +11 -0
- data/spec/support/sinatra-vulnerable/public/main.css +52 -0
- data/spec/support/sinatra-vulnerable/script/console +16 -0
- data/spec/support/sinatra-vulnerable/views/layout.haml +14 -0
- data/spec/support/sinatra-vulnerable/views/root.haml +4 -0
- metadata +519 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
require 'cvss'
|
|
2
|
+
|
|
3
|
+
module Codesake
|
|
4
|
+
module Dawn
|
|
5
|
+
module Kb
|
|
6
|
+
module BasicCheck
|
|
7
|
+
|
|
8
|
+
attr_reader :name
|
|
9
|
+
attr_reader :cvss
|
|
10
|
+
attr_reader :cwe
|
|
11
|
+
attr_reader :owasp
|
|
12
|
+
attr_reader :release_date
|
|
13
|
+
attr_reader :applies
|
|
14
|
+
attr_reader :kind
|
|
15
|
+
attr_reader :message
|
|
16
|
+
attr_reader :remediation
|
|
17
|
+
attr_reader :aux_links
|
|
18
|
+
attr_reader :mitigated
|
|
19
|
+
|
|
20
|
+
# The framework target version
|
|
21
|
+
attr_reader :target_version
|
|
22
|
+
# The versions of the framework that fixes the vulnerability
|
|
23
|
+
attr_reader :fixes_version
|
|
24
|
+
|
|
25
|
+
# Vulnerability evidences
|
|
26
|
+
attr_reader :evidences
|
|
27
|
+
|
|
28
|
+
def initialize(options={})
|
|
29
|
+
@name = options[:name]
|
|
30
|
+
@cvss = options[:cvss]
|
|
31
|
+
@cwe = options[:cwe]
|
|
32
|
+
@owasp = options[:owasp]
|
|
33
|
+
@release_date = options[:release_date]
|
|
34
|
+
@applies = []
|
|
35
|
+
@applies = options[:applies] unless options[:applies].nil?
|
|
36
|
+
@kind = options[:kind]
|
|
37
|
+
@message = options[:message]
|
|
38
|
+
@remediation = options[:mitigation]
|
|
39
|
+
@aux_links = options[:aux_links]
|
|
40
|
+
|
|
41
|
+
@target_version = options[:target_version]
|
|
42
|
+
@fixes_version = options[:fixes_version]
|
|
43
|
+
|
|
44
|
+
@evidences = []
|
|
45
|
+
@mitigated = false
|
|
46
|
+
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def applies_to?(name)
|
|
51
|
+
! @applies.find_index(name).nil?
|
|
52
|
+
end
|
|
53
|
+
def cve_link
|
|
54
|
+
"http://cve.mitre.org/cgi-bin/cvename.cgi?name=#{@name}"
|
|
55
|
+
end
|
|
56
|
+
def nvd_link
|
|
57
|
+
"http://web.nvd.nist.gov/view/vuln/detail?vulnId=#{@name}"
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# @target_version = '2.3.11'
|
|
61
|
+
# @fixes_version = ['2.3.18', '3.2.13', '3.1.12' ]
|
|
62
|
+
def is_vulnerable_version?(target = nil, fixes = nil)
|
|
63
|
+
target = @target_version if target.nil?
|
|
64
|
+
fixes = @fixes_version if fixes.nil?
|
|
65
|
+
return false if target.nil? or fixes.empty?
|
|
66
|
+
|
|
67
|
+
ret = false
|
|
68
|
+
|
|
69
|
+
target_v_array = target.split(".").map! { |n| n.to_i }
|
|
70
|
+
fixes.each do |fv|
|
|
71
|
+
fixes_v_array = fv.split(".").map! { |n| n.to_i }
|
|
72
|
+
if target_v_array[0] == fixes_v_array[0]
|
|
73
|
+
ret = true if target_v_array[1] < fixes_v_array[1] # same major but previous minor
|
|
74
|
+
ret = true if target_v_array[1] == fixes_v_array[1] and target_v_array[2] < fixes_v_array[2]
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
ret
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def cvss_score
|
|
82
|
+
return Cvss::Engine.new.score(self.cvss) unless self.cvss.nil?
|
|
83
|
+
" "
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
def mitigated?
|
|
87
|
+
self.mitigated
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
module Codesake
|
|
2
|
+
module Dawn
|
|
3
|
+
module Kb
|
|
4
|
+
# Automatically created with rake on 2013-05-13
|
|
5
|
+
class CVE_2011_2931
|
|
6
|
+
include DependencyCheck
|
|
7
|
+
|
|
8
|
+
def initialize
|
|
9
|
+
message = "Cross-site scripting (XSS) vulnerability in the strip_tags helper in actionpack/lib/action_controller/vendor/html-scanner/html/node.rb in Ruby on Rails before 2.3.13, 3.0.x before 3.0.10, and 3.1.x before 3.1.0.rc5 allows remote attackers to inject arbitrary web script or HTML via a tag with an invalid name."
|
|
10
|
+
super({
|
|
11
|
+
:name=>"CVE-2011-2931",
|
|
12
|
+
:cvss=>"AV:N/AC:M/Au:N/C:N/I:P/A:N",
|
|
13
|
+
:release_date => Date.new(2011, 8, 29),
|
|
14
|
+
:cwe=>"79",
|
|
15
|
+
:owasp=>"A3",
|
|
16
|
+
:applies=>["rails"],
|
|
17
|
+
:kind=>Codesake::Dawn::KnowledgeBase::DEPENDENCY_CHECK,
|
|
18
|
+
:message=>message,
|
|
19
|
+
:mitigation=>"Please upgrade rails version at least to 2.3.13, 3.0.10, 3.1.0. As a general rule, using the latest stable rails version is recommended.",
|
|
20
|
+
:aux_links=>["https://groups.google.com/d/topic/rubyonrails-security/Vr_7WSOrEZU/discussion"]
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
self.fixed_dependency = {:name=>"rails", :version=>['2.3.13', '3.0.10', '3.1.0']}
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
module Codesake
|
|
2
|
+
module Dawn
|
|
3
|
+
module Kb
|
|
4
|
+
# Automatically created with rake on 2013-05-02
|
|
5
|
+
class CVE_2012_2660
|
|
6
|
+
include DependencyCheck
|
|
7
|
+
|
|
8
|
+
def initialize
|
|
9
|
+
message = "actionpack/lib/action_dispatch/http/request.rb in Ruby on Rails before 3.0.13, 3.1.x before 3.1.5, and 3.2.x before 3.2.4 does not properly consider differences in parameter handling between the Active Record component and the Rack interface, which allows remote attackers to bypass intended database-query restrictions and perform NULL checks via a crafted request, as demonstrated by certain \"[nil]\" values, a related issue to CVE-2012-2694."
|
|
10
|
+
|
|
11
|
+
super({
|
|
12
|
+
:name=>"CVE-2012-2660",
|
|
13
|
+
:cvss=>"AV:N/AC:L/Au:N/C:P/I:P/A:N",
|
|
14
|
+
:release_date => Date.new(2012, 6, 22),
|
|
15
|
+
:cwe=>"",
|
|
16
|
+
:owasp=>"A9",
|
|
17
|
+
:applies=>["rails"],
|
|
18
|
+
:kind=>Codesake::Dawn::KnowledgeBase::DEPENDENCY_CHECK,
|
|
19
|
+
:message=>message,
|
|
20
|
+
:mitigation=>"Please upgrade rails version at least to 2.3.15, 3.2.5, 3.1.5 or 3.0.13. As a general rule, using the latest stable rails version is recommended.",
|
|
21
|
+
:aux_links=>["https://groups.google.com/d/topic/rubyonrails-security/8SA-M3as7A8/discussion"]
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
self.fixed_dependency = {:name=>"rails", :version=>['2.3.15', '3.0.13', '3.2.5', '3.1.5']}
|
|
25
|
+
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
module Codesake
|
|
2
|
+
module Dawn
|
|
3
|
+
module Kb
|
|
4
|
+
# Automatically created with rake on 2013-05-06
|
|
5
|
+
class CVE_2012_2661
|
|
6
|
+
include DependencyCheck
|
|
7
|
+
|
|
8
|
+
def initialize
|
|
9
|
+
message = "The Active Record component in Ruby on Rails 3.0.x before 3.0.13, 3.1.x before 3.1.5, and 3.2.x before 3.2.4 does not properly implement the passing of request data to a where method in an ActiveRecord class, which allows remote attackers to conduct certain SQL injection attacks via nested query parameters that leverage unintended recursion, a related issue to CVE-2012-2695."
|
|
10
|
+
|
|
11
|
+
super({
|
|
12
|
+
:name=>"CVE-2012-2661",
|
|
13
|
+
:cvss=>"AV:N/AC:L/Au:N/C:P/I:N/A:N",
|
|
14
|
+
:release_date => Date.new(2012, 6, 22),
|
|
15
|
+
:cwe=>"",
|
|
16
|
+
:owasp=>"A9",
|
|
17
|
+
:applies=>["rails"],
|
|
18
|
+
:kind=>Codesake::Dawn::KnowledgeBase::DEPENDENCY_CHECK,
|
|
19
|
+
:message=>message,
|
|
20
|
+
:mitigation=>"Please upgrade rails version at least to 3.2.5, 3.1.5 or 3.0.13. As a general rule, using the latest stable rails version is recommended.",
|
|
21
|
+
:aux_links=>["https://groups.google.com/d/topic/rubyonrails-security/dUaiOOGWL1k/discussion"]
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
self.fixed_dependency = {:name=>"rails", :version=>['3.0.13', '3.2.5', '3.1.5']}
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
module Codesake
|
|
2
|
+
module Dawn
|
|
3
|
+
module Kb
|
|
4
|
+
# Automatically created with rake on 2013-05-03
|
|
5
|
+
class CVE_2012_2694
|
|
6
|
+
include DependencyCheck
|
|
7
|
+
|
|
8
|
+
def initialize
|
|
9
|
+
message = "actionpack/lib/action_dispatch/http/request.rb in Ruby on Rails before 3.0.14, 3.1.x before 3.1.6, and 3.2.x before 3.2.6 does not properly consider differences in parameter handling between the Active Record component and the Rack interface, which allows remote attackers to bypass intended database-query restrictions and perform NULL checks via a crafted request, as demonstrated by certain \"['xyz', nil]\" values, a related issue to CVE-2012-2660."
|
|
10
|
+
|
|
11
|
+
super({
|
|
12
|
+
:name=>"CVE-2012-2694",
|
|
13
|
+
:cvss=>"AV:N/AC:M/Au:N/C:P/I:N/A:N",
|
|
14
|
+
:release_date => Date.new(2012, 6, 22),
|
|
15
|
+
:cwe=>"",
|
|
16
|
+
:owasp=>"A9",
|
|
17
|
+
:applies=>["rails"],
|
|
18
|
+
:kind=>Codesake::Dawn::KnowledgeBase::DEPENDENCY_CHECK,
|
|
19
|
+
:message=>message,
|
|
20
|
+
:mitigation=>"Please upgrade rails version at least to 2.3.15, 3.2.6, 3.1.6 or 3.0.14. As a general rule, using the latest stable rails version is recommended.",
|
|
21
|
+
:aux_links=>["https://groups.google.com/d/topic/rubyonrails-security/l4L0TEVAz1k/discussion"]
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
self.fixed_dependency = {:name=>"rails", :version=>['2.3.15', '3.0.14', '3.2.6', '3.1.6']}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
module Codesake
|
|
2
|
+
module Dawn
|
|
3
|
+
module Kb
|
|
4
|
+
# Automatically created with rake on 2013-05-06
|
|
5
|
+
class CVE_2012_2695
|
|
6
|
+
include DependencyCheck
|
|
7
|
+
|
|
8
|
+
def initialize
|
|
9
|
+
message = "The Active Record component in Ruby on Rails before 3.0.14, 3.1.x before 3.1.6, and 3.2.x before 3.2.6 does not properly implement the passing of request data to a where method in an ActiveRecord class, which allows remote attackers to conduct certain SQL injection attacks via nested query parameters that leverage improper handling of nested hashes, a related issue to CVE-2012-2661."
|
|
10
|
+
|
|
11
|
+
super({
|
|
12
|
+
:name=>"CVE-2012-2695",
|
|
13
|
+
:cvss=>"AV:N/AC:L/Au:N/C:P/I:P/A:P",
|
|
14
|
+
:release_date => Date.new(2012, 6, 22),
|
|
15
|
+
:cwe=>"",
|
|
16
|
+
:owasp=>"A9",
|
|
17
|
+
:applies=>["rails"],
|
|
18
|
+
:kind=>Codesake::Dawn::KnowledgeBase::DEPENDENCY_CHECK,
|
|
19
|
+
:message=>message,
|
|
20
|
+
:mitigation=>"Please upgrade rails version at least to 3.2.6, 3.1.6 or 3.0.14. As a general rule, using the latest stable rails version is recommended.",
|
|
21
|
+
:aux_links=>["https://groups.google.com/d/topic/rubyonrails-security/l4L0TEVAz1k/discussion"]
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
self.fixed_dependency = {:name=>"rails", :version=>['3.0.14', '3.2.6', '3.1.6']}
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
module Codesake
|
|
2
|
+
module Dawn
|
|
3
|
+
module Kb
|
|
4
|
+
# Automatically created with rake on 2013-05-13
|
|
5
|
+
class CVE_2012_3465
|
|
6
|
+
include DependencyCheck
|
|
7
|
+
|
|
8
|
+
def initialize
|
|
9
|
+
message = "Cross-site scripting (XSS) vulnerability in actionpack/lib/action_view/helpers/sanitize_helper.rb in the strip_tags helper in Ruby on Rails before 3.0.17, 3.1.x before 3.1.8, and 3.2.x before 3.2.8 allows remote attackers to inject arbitrary web script or HTML via malformed HTML markup."
|
|
10
|
+
super({
|
|
11
|
+
:name=>"CVE-2012-3465",
|
|
12
|
+
:cvss=>"AV:N/AC:M/Au:N/C:N/I:P/A:N",
|
|
13
|
+
:release_date => Date.new(2012, 8, 10),
|
|
14
|
+
:cwe=>"79",
|
|
15
|
+
:owasp=>"A3",
|
|
16
|
+
:applies=>["rails"],
|
|
17
|
+
:kind=>Codesake::Dawn::KnowledgeBase::DEPENDENCY_CHECK,
|
|
18
|
+
:message=>message,
|
|
19
|
+
:mitigation=>"Please upgrade rails version at least to 2.3.13, 3.0.10, 3.1.0. As a general rule, using the latest stable rails version is recommended.",
|
|
20
|
+
:aux_links=>["https://groups.google.com/d/topic/rubyonrails-security/FgVEtBajcTY/discussion"]
|
|
21
|
+
})
|
|
22
|
+
self.fixed_dependency = {:name=>"rails", :version=>['2.3.14', '3.0.17', '3.1.8', '3.2.8']}
|
|
23
|
+
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
module Codesake
|
|
2
|
+
module Dawn
|
|
3
|
+
module Kb
|
|
4
|
+
# Automatically created with rake on 2013-05-06
|
|
5
|
+
class CVE_2012_6496
|
|
6
|
+
include DependencyCheck
|
|
7
|
+
|
|
8
|
+
def initialize
|
|
9
|
+
message = "SQL injection vulnerability in the Active Record component in Ruby on Rails before 3.0.18, 3.1.x before 3.1.9, and 3.2.x before 3.2.10 allows remote attackers to execute arbitrary SQL commands via a crafted request that leverages incorrect behavior of dynamic finders in applications that can use unexpected data types in certain find_by_ method calls."
|
|
10
|
+
|
|
11
|
+
super({
|
|
12
|
+
:name=>"CVE-2012-6496",
|
|
13
|
+
:cvss=>"AV:N/AC:L/Au:N/C:P/I:P/A:P",
|
|
14
|
+
:release_date => Date.new(2013, 1, 4),
|
|
15
|
+
:cwe=>"200",
|
|
16
|
+
:owasp=>"A9",
|
|
17
|
+
:applies=>["rails"],
|
|
18
|
+
:kind=>Codesake::Dawn::KnowledgeBase::DEPENDENCY_CHECK,
|
|
19
|
+
:message=>message,
|
|
20
|
+
:mitigation=>"Please upgrade rails version at least to 3.2.10, 3.1.9 or 3.0.18. As a general rule, using the latest stable rails version is recommended.",
|
|
21
|
+
:aux_links=>["https://groups.google.com/d/topic/rubyonrails-security/DCNTNp_qjFM/discussion"]
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
self.fixed_dependency = {:name=>"rails", :version=>['3.0.18', '3.2.10', '3.1.9']}
|
|
25
|
+
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
module Codesake
|
|
2
|
+
module Dawn
|
|
3
|
+
module Kb
|
|
4
|
+
# Automatically created with rake on 2013-05-06
|
|
5
|
+
class CVE_2012_6497
|
|
6
|
+
include DependencyCheck
|
|
7
|
+
|
|
8
|
+
def initialize
|
|
9
|
+
message = "The Authlogic gem for Ruby on Rails, when used with certain versions before 3.2.10, makes potentially unsafe find_by_id method calls, which might allow remote attackers to conduct CVE-2012-6496 SQL injection attacks via a crafted parameter in environments that have a known secret_token value, as demonstrated by a value contained in secret_token.rb in an open-source product."
|
|
10
|
+
|
|
11
|
+
super({
|
|
12
|
+
:name=>"CVE-2012-6497",
|
|
13
|
+
:cvss=>"AV:N/AC:L/Au:N/C:P/I:N/A:N",
|
|
14
|
+
:release_date => Date.new(2013, 1, 4),
|
|
15
|
+
:cwe=>"200",
|
|
16
|
+
:owasp=>"A9",
|
|
17
|
+
:applies=>["rails"],
|
|
18
|
+
:kind=>Codesake::Dawn::KnowledgeBase::DEPENDENCY_CHECK,
|
|
19
|
+
:message=>message,
|
|
20
|
+
:mitigation=>"Please upgrade rails version to the latest stable rails version.",
|
|
21
|
+
:aux_links=>["https://groups.google.com/d/topic/rubyonrails-security/DCNTNp_qjFM/discussion"]
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
self.fixed_dependency = {:name=>"authlogic", :version=>['3.2.10']}
|
|
25
|
+
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
module Codesake
|
|
2
|
+
module Dawn
|
|
3
|
+
module Kb
|
|
4
|
+
# Automatically created with rake on 2013-05-10
|
|
5
|
+
class CVE_2013_0155
|
|
6
|
+
include DependencyCheck
|
|
7
|
+
|
|
8
|
+
def initialize
|
|
9
|
+
message = "Ruby on Rails 3.0.x before 3.0.19, 3.1.x before 3.1.10, and 3.2.x before 3.2.11 does not properly consider differences in parameter handling between the Active Record component and the JSON implementation, which allows remote attackers to bypass intended database-query restrictions and perform NULL checks or trigger missing WHERE clauses via a crafted request, as demonstrated by certain \"[nil]\" values, a related issue to CVE-2012-2660 and CVE-2012-2694."
|
|
10
|
+
|
|
11
|
+
super({
|
|
12
|
+
:name=>"CVE-2013-0155",
|
|
13
|
+
:cvss=>"AV:N/AC:L/Au:N/C:P/I:P/A:N",
|
|
14
|
+
:release_date => Date.new(2013, 1, 13),
|
|
15
|
+
:cwe=>"",
|
|
16
|
+
:owasp=>"A9",
|
|
17
|
+
:applies=>["rails"],
|
|
18
|
+
:kind=>Codesake::Dawn::KnowledgeBase::DEPENDENCY_CHECK,
|
|
19
|
+
:message=>message,
|
|
20
|
+
:mitigation=>"Please upgrade rails version at least to 3.0.19, 3.1.10 and 3.2.11. As a general rule, using the latest stable rails version is recommended.",
|
|
21
|
+
:aux_links=>["https://groups.google.com/d/topic/rubyonrails-security/c7jT-EeN9eI/discussion"]
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
self.fixed_dependency = {:name=>"rails", :version=>['3.0.19', '3.1.10', '3.2.11']}
|
|
25
|
+
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
module Codesake
|
|
2
|
+
module Dawn
|
|
3
|
+
module Kb
|
|
4
|
+
# Automatically created with rake on 2013-05-10
|
|
5
|
+
class CVE_2013_0269
|
|
6
|
+
include DependencyCheck
|
|
7
|
+
|
|
8
|
+
def initialize
|
|
9
|
+
message = "The JSON gem before 1.5.5, 1.6.x before 1.6.8, and 1.7.x before 1.7.7 for Ruby allows remote attackers to cause a denial of service (resource consumption) or bypass the mass assignment protection mechanism via a crafted JSON document that triggers the creation of arbitrary Ruby symbols or certain internal objects, as demonstrated by conducting a SQL injection attack against Ruby on Rails, aka \"Unsafe Object Creation Vulnerability.\""
|
|
10
|
+
|
|
11
|
+
super({
|
|
12
|
+
:name=>"CVE-2013-0269",
|
|
13
|
+
:cvss=>"AV:N/AC:L/Au:N/C:P/I:P/A:P",
|
|
14
|
+
:release_date => Date.new(2013, 2, 13),
|
|
15
|
+
:cwe=>"",
|
|
16
|
+
:owasp=>"A9",
|
|
17
|
+
:applies=>["rails", "sinatra", "padrino"],
|
|
18
|
+
:kind=>Codesake::Dawn::KnowledgeBase::DEPENDENCY_CHECK,
|
|
19
|
+
:message=>message,
|
|
20
|
+
:mitigation=>"Please upgrade JSON gem to version 1.5.5, 1.6.8 or 1.7.7 or latest version available",
|
|
21
|
+
:aux_links=>["https://groups.google.com/d/topic/rubyonrails-security/4_YvCpLzL58/discussion"]
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
self.fixed_dependency = {:name=>"json", :version=>['1.5.5', '1.6.8', '1.7.7']}
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
module Codesake
|
|
2
|
+
module Dawn
|
|
3
|
+
module Kb
|
|
4
|
+
# Automatically created with rake on 2013-04-30
|
|
5
|
+
class CVE_2013_0333
|
|
6
|
+
#
|
|
7
|
+
# Include the testing skeleton for this CVE
|
|
8
|
+
# include PatternMatchCheck
|
|
9
|
+
include DependencyCheck
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def initialize
|
|
13
|
+
message = "lib/active_support/json/backends/yaml.rb in Ruby on Rails 2.3.x before 2.3.16 and 3.0.x before 3.0.20 does not properly convert JSON data to YAML data for processing by a YAML parser, which allows remote attackers to execute arbitrary code, conduct SQL injection attacks, or bypass authentication via crafted data that triggers unsafe decoding, a different vulnerability than CVE-2013-0156."
|
|
14
|
+
super({
|
|
15
|
+
:name=>"CVE-2013-0333",
|
|
16
|
+
:cvss=>"AV:N/AC:L/Au:N/C:P/I:P/A:P",
|
|
17
|
+
:release_date => Date.new(2013, 1, 30),
|
|
18
|
+
:cwe=>"",
|
|
19
|
+
:owasp=>"A9",
|
|
20
|
+
:applies=>["rails"],
|
|
21
|
+
:kind=>Codesake::Dawn::KnowledgeBase::DEPENDENCY_CHECK,
|
|
22
|
+
:message=>message,
|
|
23
|
+
:mitigation=>"Please upgrade rails version at least to 2.3.16 or 3.0.20. As a general rule, using the latest stable rails version is recommended.",
|
|
24
|
+
:aux_links=>["https://groups.google.com/forum/?fromgroups=#!topic/rubyonrails-security/1h2DR63ViGo"]
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
self.fixed_dependency = {:name=>"rails", :version=>['2.3.16', '3.0.20']}
|
|
28
|
+
self.aux_mitigation_gem = {:name=>"yajl", :versione=>['any']}
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
module Codesake
|
|
2
|
+
module Dawn
|
|
3
|
+
module Kb
|
|
4
|
+
class CVE_2013_1800
|
|
5
|
+
include DependencyCheck
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def initialize
|
|
9
|
+
|
|
10
|
+
message = "The crack gem 0.3.1 and earlier for Ruby does not properly restrict casts of string values, which might allow remote attackers to conduct object-injection attacks and execute arbitrary code, or cause a denial of service (memory and CPU consumption) by leveraging Action Pack support for (1) YAML type conversion or (2) Symbol type conversion, a similar vulnerability to CVE-2013-0156."
|
|
11
|
+
|
|
12
|
+
super({:name=>"CVE-2013-1800",
|
|
13
|
+
:cvss=>"AV:N/AC:L/Au:N/C:P/I:P/A:P",
|
|
14
|
+
:release_date => Date.new(2013, 4, 9),
|
|
15
|
+
:cwe=>"264",
|
|
16
|
+
:owasp=>"A9",
|
|
17
|
+
:applies=>["sinatra", "padrino", "rails"],
|
|
18
|
+
:kind=>Codesake::Dawn::KnowledgeBase::DEPENDENCY_CHECK,
|
|
19
|
+
:message=>message,
|
|
20
|
+
:mitigation=>"Please use crack gem version 0.3.2 or above. Correct your gemfile"
|
|
21
|
+
})
|
|
22
|
+
self.fixed_dependency = {:name=>'crack', :version=>['0.3.2']}
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|