dawnscanner 1.2.99

Sign up to get free protection for your applications and to get access to all the features.
Files changed (306) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.sig +4 -0
  3. data.tar.gz.sig +0 -0
  4. data/.gitignore +19 -0
  5. data/.ruby-gemset +1 -0
  6. data/.ruby-version +1 -0
  7. data/.travis.yml +8 -0
  8. data/Changelog.md +412 -0
  9. data/Gemfile +4 -0
  10. data/KnowledgeBase.md +213 -0
  11. data/LICENSE.txt +22 -0
  12. data/README.md +354 -0
  13. data/Rakefile +250 -0
  14. data/Roadmap.md +59 -0
  15. data/bin/dawn +210 -0
  16. data/certs/paolo_at_codesake_dot_com.pem +21 -0
  17. data/checksum/.placeholder +0 -0
  18. data/checksum/codesake-dawn-1.1.0.gem.sha512 +1 -0
  19. data/checksum/codesake-dawn-1.1.0.rc1.gem.sha512 +1 -0
  20. data/checksum/codesake-dawn-1.1.1.gem.sha512 +1 -0
  21. data/checksum/codesake-dawn-1.1.2.gem.sha512 +1 -0
  22. data/checksum/codesake-dawn-1.1.3.gem.sha512 +1 -0
  23. data/checksum/codesake-dawn-1.2.0.gem.sha512 +1 -0
  24. data/checksum/codesake-dawn-1.2.99.gem.sha512 +1 -0
  25. data/dawnscanner.gemspec +43 -0
  26. data/doc/codesake-dawn.yaml.sample +26 -0
  27. data/doc/dawn_1_0_announcement.md +139 -0
  28. data/doc/dawn_1_1_announcement.md +67 -0
  29. data/doc/dawn_1_2_announcement.md +69 -0
  30. data/features/dawn_complains_about_an_incorrect_command_line.feature.disabled +21 -0
  31. data/features/dawn_scan_a_secure_sinatra_app.feature.disabled +31 -0
  32. data/features/dawn_scan_a_vulnerable_sinatra_app.feature.disabled +36 -0
  33. data/features/step_definition/dawn_steps.rb +19 -0
  34. data/features/support/env.rb +1 -0
  35. data/lib/codesake-dawn.rb +12 -0
  36. data/lib/codesake/dawn/core.rb +175 -0
  37. data/lib/codesake/dawn/engine.rb +380 -0
  38. data/lib/codesake/dawn/gemfile_lock.rb +12 -0
  39. data/lib/codesake/dawn/kb/basic_check.rb +228 -0
  40. data/lib/codesake/dawn/kb/combo_check.rb +64 -0
  41. data/lib/codesake/dawn/kb/cve_2004_0755.rb +32 -0
  42. data/lib/codesake/dawn/kb/cve_2004_0983.rb +30 -0
  43. data/lib/codesake/dawn/kb/cve_2005_1992.rb +30 -0
  44. data/lib/codesake/dawn/kb/cve_2005_2337.rb +32 -0
  45. data/lib/codesake/dawn/kb/cve_2006_1931.rb +32 -0
  46. data/lib/codesake/dawn/kb/cve_2006_2582.rb +30 -0
  47. data/lib/codesake/dawn/kb/cve_2006_3694.rb +31 -0
  48. data/lib/codesake/dawn/kb/cve_2006_4112.rb +29 -0
  49. data/lib/codesake/dawn/kb/cve_2006_5467.rb +30 -0
  50. data/lib/codesake/dawn/kb/cve_2006_6303.rb +30 -0
  51. data/lib/codesake/dawn/kb/cve_2006_6852.rb +29 -0
  52. data/lib/codesake/dawn/kb/cve_2006_6979.rb +31 -0
  53. data/lib/codesake/dawn/kb/cve_2007_0469.rb +29 -0
  54. data/lib/codesake/dawn/kb/cve_2007_5162.rb +30 -0
  55. data/lib/codesake/dawn/kb/cve_2007_5379.rb +29 -0
  56. data/lib/codesake/dawn/kb/cve_2007_5380.rb +29 -0
  57. data/lib/codesake/dawn/kb/cve_2007_5770.rb +32 -0
  58. data/lib/codesake/dawn/kb/cve_2007_6077.rb +31 -0
  59. data/lib/codesake/dawn/kb/cve_2007_6612.rb +30 -0
  60. data/lib/codesake/dawn/kb/cve_2008_1145.rb +40 -0
  61. data/lib/codesake/dawn/kb/cve_2008_1891.rb +40 -0
  62. data/lib/codesake/dawn/kb/cve_2008_2376.rb +32 -0
  63. data/lib/codesake/dawn/kb/cve_2008_2662.rb +35 -0
  64. data/lib/codesake/dawn/kb/cve_2008_2663.rb +34 -0
  65. data/lib/codesake/dawn/kb/cve_2008_2664.rb +35 -0
  66. data/lib/codesake/dawn/kb/cve_2008_2725.rb +33 -0
  67. data/lib/codesake/dawn/kb/cve_2008_3655.rb +39 -0
  68. data/lib/codesake/dawn/kb/cve_2008_3657.rb +39 -0
  69. data/lib/codesake/dawn/kb/cve_2008_3790.rb +32 -0
  70. data/lib/codesake/dawn/kb/cve_2008_3905.rb +38 -0
  71. data/lib/codesake/dawn/kb/cve_2008_4094.rb +29 -0
  72. data/lib/codesake/dawn/kb/cve_2008_4310.rb +103 -0
  73. data/lib/codesake/dawn/kb/cve_2008_5189.rb +29 -0
  74. data/lib/codesake/dawn/kb/cve_2008_7248.rb +29 -0
  75. data/lib/codesake/dawn/kb/cve_2009_4078.rb +31 -0
  76. data/lib/codesake/dawn/kb/cve_2009_4124.rb +32 -0
  77. data/lib/codesake/dawn/kb/cve_2009_4214.rb +29 -0
  78. data/lib/codesake/dawn/kb/cve_2010_1330.rb +30 -0
  79. data/lib/codesake/dawn/kb/cve_2010_2489.rb +62 -0
  80. data/lib/codesake/dawn/kb/cve_2010_3933.rb +29 -0
  81. data/lib/codesake/dawn/kb/cve_2011_0188.rb +69 -0
  82. data/lib/codesake/dawn/kb/cve_2011_0446.rb +30 -0
  83. data/lib/codesake/dawn/kb/cve_2011_0447.rb +30 -0
  84. data/lib/codesake/dawn/kb/cve_2011_0739.rb +30 -0
  85. data/lib/codesake/dawn/kb/cve_2011_0995.rb +63 -0
  86. data/lib/codesake/dawn/kb/cve_2011_1004.rb +36 -0
  87. data/lib/codesake/dawn/kb/cve_2011_1005.rb +33 -0
  88. data/lib/codesake/dawn/kb/cve_2011_2197.rb +29 -0
  89. data/lib/codesake/dawn/kb/cve_2011_2686.rb +31 -0
  90. data/lib/codesake/dawn/kb/cve_2011_2705.rb +34 -0
  91. data/lib/codesake/dawn/kb/cve_2011_2929.rb +29 -0
  92. data/lib/codesake/dawn/kb/cve_2011_2930.rb +30 -0
  93. data/lib/codesake/dawn/kb/cve_2011_2931.rb +32 -0
  94. data/lib/codesake/dawn/kb/cve_2011_2932.rb +29 -0
  95. data/lib/codesake/dawn/kb/cve_2011_3009.rb +30 -0
  96. data/lib/codesake/dawn/kb/cve_2011_3186.rb +31 -0
  97. data/lib/codesake/dawn/kb/cve_2011_3187.rb +31 -0
  98. data/lib/codesake/dawn/kb/cve_2011_4319.rb +31 -0
  99. data/lib/codesake/dawn/kb/cve_2011_4815.rb +30 -0
  100. data/lib/codesake/dawn/kb/cve_2011_5036.rb +28 -0
  101. data/lib/codesake/dawn/kb/cve_2012_1098.rb +32 -0
  102. data/lib/codesake/dawn/kb/cve_2012_1099.rb +29 -0
  103. data/lib/codesake/dawn/kb/cve_2012_1241.rb +29 -0
  104. data/lib/codesake/dawn/kb/cve_2012_2139.rb +28 -0
  105. data/lib/codesake/dawn/kb/cve_2012_2140.rb +29 -0
  106. data/lib/codesake/dawn/kb/cve_2012_2660.rb +30 -0
  107. data/lib/codesake/dawn/kb/cve_2012_2661.rb +29 -0
  108. data/lib/codesake/dawn/kb/cve_2012_2671.rb +30 -0
  109. data/lib/codesake/dawn/kb/cve_2012_2694.rb +32 -0
  110. data/lib/codesake/dawn/kb/cve_2012_2695.rb +29 -0
  111. data/lib/codesake/dawn/kb/cve_2012_3424.rb +31 -0
  112. data/lib/codesake/dawn/kb/cve_2012_3463.rb +29 -0
  113. data/lib/codesake/dawn/kb/cve_2012_3464.rb +29 -0
  114. data/lib/codesake/dawn/kb/cve_2012_3465.rb +28 -0
  115. data/lib/codesake/dawn/kb/cve_2012_4464.rb +29 -0
  116. data/lib/codesake/dawn/kb/cve_2012_4466.rb +29 -0
  117. data/lib/codesake/dawn/kb/cve_2012_4481.rb +28 -0
  118. data/lib/codesake/dawn/kb/cve_2012_4522.rb +29 -0
  119. data/lib/codesake/dawn/kb/cve_2012_5370.rb +29 -0
  120. data/lib/codesake/dawn/kb/cve_2012_5371.rb +29 -0
  121. data/lib/codesake/dawn/kb/cve_2012_5380.rb +30 -0
  122. data/lib/codesake/dawn/kb/cve_2012_6109.rb +27 -0
  123. data/lib/codesake/dawn/kb/cve_2012_6134.rb +29 -0
  124. data/lib/codesake/dawn/kb/cve_2012_6496.rb +30 -0
  125. data/lib/codesake/dawn/kb/cve_2012_6497.rb +30 -0
  126. data/lib/codesake/dawn/kb/cve_2013_0155.rb +31 -0
  127. data/lib/codesake/dawn/kb/cve_2013_0156.rb +29 -0
  128. data/lib/codesake/dawn/kb/cve_2013_0162.rb +30 -0
  129. data/lib/codesake/dawn/kb/cve_2013_0175.rb +29 -0
  130. data/lib/codesake/dawn/kb/cve_2013_0183.rb +27 -0
  131. data/lib/codesake/dawn/kb/cve_2013_0184.rb +27 -0
  132. data/lib/codesake/dawn/kb/cve_2013_0233.rb +28 -0
  133. data/lib/codesake/dawn/kb/cve_2013_0256.rb +61 -0
  134. data/lib/codesake/dawn/kb/cve_2013_0262.rb +28 -0
  135. data/lib/codesake/dawn/kb/cve_2013_0263.rb +28 -0
  136. data/lib/codesake/dawn/kb/cve_2013_0269.rb +29 -0
  137. data/lib/codesake/dawn/kb/cve_2013_0276.rb +30 -0
  138. data/lib/codesake/dawn/kb/cve_2013_0277.rb +27 -0
  139. data/lib/codesake/dawn/kb/cve_2013_0284.rb +29 -0
  140. data/lib/codesake/dawn/kb/cve_2013_0285.rb +29 -0
  141. data/lib/codesake/dawn/kb/cve_2013_0333.rb +30 -0
  142. data/lib/codesake/dawn/kb/cve_2013_1607.rb +27 -0
  143. data/lib/codesake/dawn/kb/cve_2013_1655.rb +67 -0
  144. data/lib/codesake/dawn/kb/cve_2013_1656.rb +30 -0
  145. data/lib/codesake/dawn/kb/cve_2013_1756.rb +28 -0
  146. data/lib/codesake/dawn/kb/cve_2013_1800.rb +28 -0
  147. data/lib/codesake/dawn/kb/cve_2013_1801.rb +29 -0
  148. data/lib/codesake/dawn/kb/cve_2013_1802.rb +29 -0
  149. data/lib/codesake/dawn/kb/cve_2013_1812.rb +29 -0
  150. data/lib/codesake/dawn/kb/cve_2013_1821.rb +30 -0
  151. data/lib/codesake/dawn/kb/cve_2013_1854.rb +28 -0
  152. data/lib/codesake/dawn/kb/cve_2013_1855.rb +27 -0
  153. data/lib/codesake/dawn/kb/cve_2013_1856.rb +28 -0
  154. data/lib/codesake/dawn/kb/cve_2013_1857.rb +29 -0
  155. data/lib/codesake/dawn/kb/cve_2013_1875.rb +29 -0
  156. data/lib/codesake/dawn/kb/cve_2013_1898.rb +29 -0
  157. data/lib/codesake/dawn/kb/cve_2013_1911.rb +30 -0
  158. data/lib/codesake/dawn/kb/cve_2013_1933.rb +29 -0
  159. data/lib/codesake/dawn/kb/cve_2013_1947.rb +29 -0
  160. data/lib/codesake/dawn/kb/cve_2013_1948.rb +29 -0
  161. data/lib/codesake/dawn/kb/cve_2013_2065.rb +31 -0
  162. data/lib/codesake/dawn/kb/cve_2013_2090.rb +30 -0
  163. data/lib/codesake/dawn/kb/cve_2013_2105.rb +28 -0
  164. data/lib/codesake/dawn/kb/cve_2013_2119.rb +29 -0
  165. data/lib/codesake/dawn/kb/cve_2013_2512.rb +28 -0
  166. data/lib/codesake/dawn/kb/cve_2013_2513.rb +27 -0
  167. data/lib/codesake/dawn/kb/cve_2013_2516.rb +28 -0
  168. data/lib/codesake/dawn/kb/cve_2013_2615.rb +29 -0
  169. data/lib/codesake/dawn/kb/cve_2013_2616.rb +29 -0
  170. data/lib/codesake/dawn/kb/cve_2013_2617.rb +30 -0
  171. data/lib/codesake/dawn/kb/cve_2013_3221.rb +29 -0
  172. data/lib/codesake/dawn/kb/cve_2013_4164.rb +32 -0
  173. data/lib/codesake/dawn/kb/cve_2013_4203.rb +27 -0
  174. data/lib/codesake/dawn/kb/cve_2013_4389.rb +28 -0
  175. data/lib/codesake/dawn/kb/cve_2013_4413.rb +29 -0
  176. data/lib/codesake/dawn/kb/cve_2013_4457.rb +31 -0
  177. data/lib/codesake/dawn/kb/cve_2013_4478.rb +28 -0
  178. data/lib/codesake/dawn/kb/cve_2013_4479.rb +28 -0
  179. data/lib/codesake/dawn/kb/cve_2013_4489.rb +30 -0
  180. data/lib/codesake/dawn/kb/cve_2013_4491.rb +30 -0
  181. data/lib/codesake/dawn/kb/cve_2013_4492.rb +31 -0
  182. data/lib/codesake/dawn/kb/cve_2013_4562.rb +29 -0
  183. data/lib/codesake/dawn/kb/cve_2013_4593.rb +29 -0
  184. data/lib/codesake/dawn/kb/cve_2013_5647.rb +31 -0
  185. data/lib/codesake/dawn/kb/cve_2013_5671.rb +28 -0
  186. data/lib/codesake/dawn/kb/cve_2013_6414.rb +31 -0
  187. data/lib/codesake/dawn/kb/cve_2013_6415.rb +30 -0
  188. data/lib/codesake/dawn/kb/cve_2013_6416.rb +31 -0
  189. data/lib/codesake/dawn/kb/cve_2013_6417.rb +31 -0
  190. data/lib/codesake/dawn/kb/cve_2013_6421.rb +30 -0
  191. data/lib/codesake/dawn/kb/cve_2013_6459.rb +30 -0
  192. data/lib/codesake/dawn/kb/cve_2013_6460.rb +55 -0
  193. data/lib/codesake/dawn/kb/cve_2013_6461.rb +59 -0
  194. data/lib/codesake/dawn/kb/cve_2013_7086.rb +29 -0
  195. data/lib/codesake/dawn/kb/cve_2014_0036.rb +29 -0
  196. data/lib/codesake/dawn/kb/cve_2014_0080.rb +30 -0
  197. data/lib/codesake/dawn/kb/cve_2014_0081.rb +28 -0
  198. data/lib/codesake/dawn/kb/cve_2014_0082.rb +29 -0
  199. data/lib/codesake/dawn/kb/cve_2014_0130.rb +28 -0
  200. data/lib/codesake/dawn/kb/cve_2014_1233.rb +29 -0
  201. data/lib/codesake/dawn/kb/cve_2014_1234.rb +28 -0
  202. data/lib/codesake/dawn/kb/cve_2014_2322.rb +30 -0
  203. data/lib/codesake/dawn/kb/cve_2014_2525.rb +61 -0
  204. data/lib/codesake/dawn/kb/cve_2014_2538.rb +28 -0
  205. data/lib/codesake/dawn/kb/cve_2014_3482.rb +30 -0
  206. data/lib/codesake/dawn/kb/cve_2014_3483.rb +29 -0
  207. data/lib/codesake/dawn/kb/dependency_check.rb +86 -0
  208. data/lib/codesake/dawn/kb/deprecation_check.rb +40 -0
  209. data/lib/codesake/dawn/kb/not_revised_code.rb +24 -0
  210. data/lib/codesake/dawn/kb/operating_system_check.rb +98 -0
  211. data/lib/codesake/dawn/kb/osvdb_105971.rb +31 -0
  212. data/lib/codesake/dawn/kb/osvdb_108530.rb +29 -0
  213. data/lib/codesake/dawn/kb/osvdb_108563.rb +30 -0
  214. data/lib/codesake/dawn/kb/osvdb_108569.rb +30 -0
  215. data/lib/codesake/dawn/kb/osvdb_108570.rb +29 -0
  216. data/lib/codesake/dawn/kb/owasp_ror_cheatsheet.rb +41 -0
  217. data/lib/codesake/dawn/kb/owasp_ror_cheatsheet/check_for_backup_files.rb +22 -0
  218. data/lib/codesake/dawn/kb/owasp_ror_cheatsheet/check_for_safe_redirect_and_forward.rb +59 -0
  219. data/lib/codesake/dawn/kb/owasp_ror_cheatsheet/command_injection.rb +30 -0
  220. data/lib/codesake/dawn/kb/owasp_ror_cheatsheet/csrf.rb +31 -0
  221. data/lib/codesake/dawn/kb/owasp_ror_cheatsheet/mass_assignment_in_model.rb +35 -0
  222. data/lib/codesake/dawn/kb/owasp_ror_cheatsheet/security_related_headers.rb +38 -0
  223. data/lib/codesake/dawn/kb/owasp_ror_cheatsheet/sensitive_files.rb +31 -0
  224. data/lib/codesake/dawn/kb/owasp_ror_cheatsheet/session_stored_in_database.rb +33 -0
  225. data/lib/codesake/dawn/kb/pattern_match_check.rb +129 -0
  226. data/lib/codesake/dawn/kb/ruby_version_check.rb +91 -0
  227. data/lib/codesake/dawn/kb/simpleform_xss_20131129.rb +30 -0
  228. data/lib/codesake/dawn/kb/version_check.rb +418 -0
  229. data/lib/codesake/dawn/knowledge_base.rb +513 -0
  230. data/lib/codesake/dawn/padrino.rb +82 -0
  231. data/lib/codesake/dawn/rails.rb +17 -0
  232. data/lib/codesake/dawn/railtie.rb +9 -0
  233. data/lib/codesake/dawn/reporter.rb +280 -0
  234. data/lib/codesake/dawn/sinatra.rb +129 -0
  235. data/lib/codesake/dawn/tasks.rb +27 -0
  236. data/lib/codesake/dawn/utils.rb +21 -0
  237. data/lib/codesake/dawn/version.rb +28 -0
  238. data/lib/tasks/codesake-dawn_tasks.rake +1 -0
  239. data/spec/lib/dawn/codesake_core_spec.rb +9 -0
  240. data/spec/lib/dawn/codesake_knowledgebase_spec.rb +940 -0
  241. data/spec/lib/dawn/codesake_padrino_engine_disabled.rb +45 -0
  242. data/spec/lib/dawn/codesake_rails_engine_disabled.rb +12 -0
  243. data/spec/lib/dawn/codesake_sinatra_engine_disabled.rb +128 -0
  244. data/spec/lib/kb/codesake_cve_2013_0175_spec.rb +35 -0
  245. data/spec/lib/kb/codesake_cve_2013_4457_spec.rb +41 -0
  246. data/spec/lib/kb/codesake_dependency_version_check_spec.rb +76 -0
  247. data/spec/lib/kb/codesake_deprecation_check_spec.rb +56 -0
  248. data/spec/lib/kb/codesake_ruby_version_check_spec.rb +40 -0
  249. data/spec/lib/kb/codesake_version_check_spec.rb +165 -0
  250. data/spec/lib/kb/cve_2011_2705_spec.rb +35 -0
  251. data/spec/lib/kb/cve_2011_2930_spec.rb +31 -0
  252. data/spec/lib/kb/cve_2011_3009_spec.rb +25 -0
  253. data/spec/lib/kb/cve_2011_3187_spec.rb +24 -0
  254. data/spec/lib/kb/cve_2011_4319_spec.rb +44 -0
  255. data/spec/lib/kb/cve_2011_5036_spec.rb +95 -0
  256. data/spec/lib/kb/cve_2012_1098_spec.rb +36 -0
  257. data/spec/lib/kb/cve_2012_2139_spec.rb +20 -0
  258. data/spec/lib/kb/cve_2012_2671_spec.rb +23 -0
  259. data/spec/lib/kb/cve_2012_6109_spec.rb +112 -0
  260. data/spec/lib/kb/cve_2013_0162_spec.rb +23 -0
  261. data/spec/lib/kb/cve_2013_0183_spec.rb +54 -0
  262. data/spec/lib/kb/cve_2013_0184_spec.rb +115 -0
  263. data/spec/lib/kb/cve_2013_0256_spec.rb +34 -0
  264. data/spec/lib/kb/cve_2013_0262_spec.rb +44 -0
  265. data/spec/lib/kb/cve_2013_0263_spec.rb +11 -0
  266. data/spec/lib/kb/cve_2013_1607_spec.rb +15 -0
  267. data/spec/lib/kb/cve_2013_1655_spec.rb +31 -0
  268. data/spec/lib/kb/cve_2013_1756_spec.rb +23 -0
  269. data/spec/lib/kb/cve_2013_2090_spec.rb +15 -0
  270. data/spec/lib/kb/cve_2013_2105_spec.rb +11 -0
  271. data/spec/lib/kb/cve_2013_2119_spec.rb +27 -0
  272. data/spec/lib/kb/cve_2013_2512_spec.rb +15 -0
  273. data/spec/lib/kb/cve_2013_2513_spec.rb +15 -0
  274. data/spec/lib/kb/cve_2013_2516_spec.rb +15 -0
  275. data/spec/lib/kb/cve_2013_4203_spec.rb +15 -0
  276. data/spec/lib/kb/cve_2013_4413_spec.rb +16 -0
  277. data/spec/lib/kb/cve_2013_4489_spec.rb +63 -0
  278. data/spec/lib/kb/cve_2013_4593_spec.rb +16 -0
  279. data/spec/lib/kb/cve_2013_5647_spec.rb +19 -0
  280. data/spec/lib/kb/cve_2013_5671_spec.rb +27 -0
  281. data/spec/lib/kb/cve_2013_6416_spec.rb +31 -0
  282. data/spec/lib/kb/cve_2013_6459_spec.rb +15 -0
  283. data/spec/lib/kb/cve_2013_7086_spec.rb +22 -0
  284. data/spec/lib/kb/cve_2014_0036_spec.rb +15 -0
  285. data/spec/lib/kb/cve_2014_0080_spec.rb +28 -0
  286. data/spec/lib/kb/cve_2014_0081_spec.rb +68 -0
  287. data/spec/lib/kb/cve_2014_0082_spec.rb +52 -0
  288. data/spec/lib/kb/cve_2014_0130_spec.rb +19 -0
  289. data/spec/lib/kb/cve_2014_1233_spec.rb +15 -0
  290. data/spec/lib/kb/cve_2014_1234_spec.rb +16 -0
  291. data/spec/lib/kb/cve_2014_2322_spec.rb +15 -0
  292. data/spec/lib/kb/cve_2014_2538_spec.rb +15 -0
  293. data/spec/lib/kb/cve_2014_3482_spec.rb +15 -0
  294. data/spec/lib/kb/cve_2014_3483_spec.rb +23 -0
  295. data/spec/lib/kb/osvdb_105971_spec.rb +15 -0
  296. data/spec/lib/kb/osvdb_108530_spec.rb +22 -0
  297. data/spec/lib/kb/osvdb_108563_spec.rb +18 -0
  298. data/spec/lib/kb/osvdb_108569_spec.rb +17 -0
  299. data/spec/lib/kb/osvdb_108570_spec.rb +17 -0
  300. data/spec/lib/kb/owasp_ror_cheatsheet_disabled.rb +56 -0
  301. data/spec/spec_helper.rb +11 -0
  302. data/support/bootstrap.js +2027 -0
  303. data/support/bootstrap.min.css +9 -0
  304. data/support/codesake.css +63 -0
  305. metadata +659 -0
  306. metadata.gz.sig +0 -0
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in codesake_dawn.gemspec
4
+ gemspec
@@ -0,0 +1,213 @@
1
+ # Codesake::Dawn Knowledge base
2
+
3
+ The knowledge base library for Codesake::Dawn version 1.2.0 contains 180 security checks.
4
+ ---
5
+ * Simple Form XSS - 20131129: There is a XSS vulnerability on Simple Form's label, hint and error options. When Simple Form creates a label, hint or error message it marks the text as being HTML safe, even though it may contain HTML tags. In applications where the text of these helpers can be provided by the users, malicious values can be provided and Simple Form will mark it as safe.
6
+ * [CVE-2004-0755](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-0755): The FileStore capability in CGI::Session for Ruby before 1.8.1, and possibly PStore, creates files with insecure permissions, which can allow local users to steal session information and hijack sessions.
7
+ * [CVE-2004-0983](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-0983): The CGI module in Ruby 1.6 before 1.6.8, and 1.8 before 1.8.2, allows remote attackers to cause a denial of service (infinite loop and CPU consumption) via a certain HTTP request.
8
+ * [CVE-2005-1992](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-1992): The XMLRPC server in utils.rb for the ruby library (libruby) 1.8 sets an invalid default value that prevents "security protection" using handlers, which allows remote attackers to execute arbitrary commands.
9
+ * [CVE-2005-2337](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-2337): Ruby 1.6.x up to 1.6.8, 1.8.x up to 1.8.2, and 1.9.0 development up to 2005-09-01 allows attackers to bypass safe level and taint flag protections and execute disallowed code when Ruby processes a program through standard input (stdin).
10
+ * [CVE-2006-1931](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-1931): The HTTP/XMLRPC server in Ruby before 1.8.2 uses blocking sockets, which allows attackers to cause a denial of service (blocked connections) via a large amount of data.
11
+ * [CVE-2006-2582](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-2582): The editing form in RWiki 2.1.0pre1 through 2.1.0 allows remote attackers to execute arbitrary Ruby code via unknown attack vectors.
12
+ * [CVE-2006-3694](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-3694): Multiple unspecified vulnerabilities in Ruby before 1.8.5 allow remote attackers to bypass "safe level" checks via unspecified vectors involving (1) the alias function and (2) "directory operations".
13
+ * [CVE-2006-4112](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-4112): Unspecified vulnerability in the "dependency resolution mechanism" in Ruby on Rails 1.1.0 through 1.1.5 allows remote attackers to execute arbitrary Ruby code via a URL that is not properly handled in the routing code, which leads to a denial of service (application hang) or "data loss," a different vulnerability than CVE-2006-4111.
14
+ * [CVE-2006-5467](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-5467): The cgi.rb CGI library for Ruby 1.8 allows remote attackers to cause a denial of service (infinite loop and CPU consumption) via an HTTP request with a multipart MIME body that contains an invalid boundary specifier, as demonstrated using a specifier that begins with a "-" instead of "--" and contains an inconsistent ID.
15
+ * [CVE-2006-6303](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-6303): The read_multipart function in cgi.rb in Ruby before 1.8.5-p2 does not properly detect boundaries in MIME multipart content, which allows remote attackers to cause a denial of service (infinite loop) via crafted HTTP requests, a different issue than CVE-2006-5467.
16
+ * [CVE-2006-6852](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-6852): Eval injection vulnerability in tDiary 2.0.3 and 2.1.4.20061127 allows remote authenticated users to execute arbitrary Ruby code via unspecified vectors, possibly related to incorrect input validation by (1) conf.rhtml and (2) i.conf.rhtml. NOTE: some of these details are obtained from third party information.
17
+ * [CVE-2006-6979](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-6979): The ruby handlers in the Magnatune component in Amarok do not properly quote text in certain contexts, probably including construction of an unzip command line, which allows attackers to execute arbitrary commands via shell metacharacters.
18
+ * [CVE-2007-0469](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-0469): The extract_files function in installer.rb in RubyGems before 0.9.1 does not check whether files exist before overwriting them, which allows user-assisted remote attackers to overwrite arbitrary files, cause a denial of service, or execute arbitrary code via crafted GEM packages.
19
+ * [CVE-2007-5162](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-5162): The connect method in lib/net/http.rb in the (1) Net::HTTP and (2) Net::HTTPS libraries in Ruby 1.8.5 and 1.8.6 does not verify that the commonName (CN) field in a server certificate matches the domain name in an HTTPS request, which makes it easier for remote attackers to intercept SSL transmissions via a man-in-the-middle attack or spoofed web site.
20
+ * [CVE-2007-5379](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-5379): Rails before 1.2.4, as used for Ruby on Rails, allows remote attackers and ActiveResource servers to determine the existence of arbitrary files and read arbitrary XML files via the Hash.from_xml (Hash#from_xml) method, which uses XmlSimple (XML::Simple) unsafely, as demonstrated by reading passwords from the Pidgin (Gaim) .purple/accounts.xml file.
21
+ * [CVE-2007-5380](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-5380): Session fixation vulnerability in Rails before 1.2.4, as used for Ruby on Rails, allows remote attackers to hijack web sessions via unspecified vectors related to "URL-based sessions."
22
+ * [CVE-2007-5770](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-5770): The (1) Net::ftptls, (2) Net::telnets, (3) Net::imap, (4) Net::pop, and (5) Net::smtp libraries in Ruby 1.8.5 and 1.8.6 do not verify that the commonName (CN) field in a server certificate matches the domain name in a request sent over SSL, which makes it easier for remote attackers to intercept SSL transmissions via a man-in-the-middle attack or spoofed web site, different components than CVE-2007-5162.
23
+ * [CVE-2007-6077](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-6077): The session fixation protection mechanism in cgi_process.rb in Rails 1.2.4, as used in Ruby on Rails, removes the :cookie_only attribute from the DEFAULT_SESSION_OPTIONS constant, which effectively causes cookie_only to be applied only to the first instantiation of CgiRequest, which allows remote attackers to conduct session fixation attacks. NOTE: this is due to an incomplete fix for CVE-2007-5380. It has been reviewed in 2012 and it affects also 2.3.x, 3.0.x and 3.1.x.
24
+ * [CVE-2007-6612](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-6612): Directory traversal vulnerability in DirHandler (lib/mongrel/handlers.rb) in Mongrel 1.0.4 and 1.1.x before 1.1.3 allows remote attackers to read arbitrary files via an HTTP request containing double-encoded sequences (".%252e").
25
+ * [CVE-2008-1145](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-1145): Directory traversal vulnerability in WEBrick in Ruby 1.8 before 1.8.5-p115 and 1.8.6-p114, and 1.9 through 1.9.0-1, when running on systems that support backslash () path separators or case-insensitive file names, allows remote attackers to access arbitrary files via (1) "..%5c" (encoded backslash) sequences or (2) filenames that match patterns in the :NondisclosureName option.
26
+ * [CVE-2008-1891](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-1891): Directory traversal vulnerability in WEBrick in Ruby 1.8.4 and earlier, 1.8.5 before 1.8.5-p231, 1.8.6 before 1.8.6-p230, 1.8.7 before 1.8.7-p22, and 1.9.0 before 1.9.0-2, when using NTFS or FAT filesystems, allows remote attackers to read arbitrary CGI files via a trailing (1) + (plus), (2) %2b (encoded plus), (3) . (dot), (4) %2e (encoded dot), or (5) %20 (encoded space) character in the URI, possibly related to the WEBrick::HTTPServlet::FileHandler and WEBrick::HTTPServer.new functionality and the :DocumentRoot option.
27
+ * [CVE-2008-2376](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-2376): Integer overflow in the rb_ary_fill function in array.c in Ruby before revision 17756 allows context-dependent attackers to cause a denial of service (crash) or possibly have unspecified other impact via a call to the Array#fill method with a start (aka beg) argument greater than ARY_MAX_SIZE. NOTE: this issue exists because of an incomplete fix for other closely related integer overflows.
28
+ * [CVE-2008-2662](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-2662): Multiple integer overflows in the rb_str_buf_append function in Ruby 1.8.4 and earlier, 1.8.5 before 1.8.5-p231, 1.8.6 before 1.8.6-p230, 1.8.7 before 1.8.7-p22, and 1.9.0 before 1.9.0-2 allow context-dependent attackers to execute arbitrary code or cause a denial of service via unknown vectors that trigger memory corruption, a different issue than CVE-2008-2663, CVE-2008-2664, and CVE-2008-2725. NOTE: as of 20080624, there has been inconsistent usage of multiple CVE identifiers related to Ruby. This CVE description should be regarded as authoritative, although it is likely to change.
29
+ * [CVE-2008-2663](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-2663): Multiple integer overflows in the rb_ary_store function in Ruby 1.8.4 and earlier, 1.8.5 before 1.8.5-p231, 1.8.6 before 1.8.6-p230, and 1.8.7 before 1.8.7-p22 allow context-dependent attackers to execute arbitrary code or cause a denial of service via unknown vectors, a different issue than CVE-2008-2662, CVE-2008-2664, and CVE-2008-2725. NOTE: as of 20080624, there has been inconsistent usage of multiple CVE identifiers related to Ruby. The CVE description should be regarded as authoritative, although it is likely to change.
30
+ * [CVE-2008-2664](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-2664): The rb_str_format function in Ruby 1.8.4 and earlier, 1.8.5 before 1.8.5-p231, 1.8.6 before 1.8.6-p230, 1.8.7 before 1.8.7-p22, and 1.9.0 before 1.9.0-2 allows context-dependent attackers to trigger memory corruption via unspecified vectors related to alloca, a different issue than CVE-2008-2662, CVE-2008-2663, and CVE-2008-2725. NOTE: as of 20080624, there has been inconsistent usage of multiple CVE identifiers related to Ruby. The CVE description should be regarded as authoritative, although it is likely to change.
31
+ * [CVE-2008-2725](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-2725): Integer overflow in the (1) rb_ary_splice function in Ruby 1.8.4 and earlier, 1.8.5 before 1.8.5-p231, 1.8.6 before 1.8.6-p230, and 1.8.7 before 1.8.7-p22; and (2) the rb_ary_replace function in 1.6.x allows context-dependent attackers to trigger memory corruption via unspecified vectors, aka the "REALLOC_N" variant, a different issue than CVE-2008-2662, CVE-2008-2663, and CVE-2008-2664. NOTE: as of 20080624, there has been inconsistent usage of multiple CVE identifiers related to Ruby. The CVE description should be regarded as authoritative, although it is likely to change.
32
+ * [CVE-2008-3655](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-3655): Ruby 1.8.5 and earlier, 1.8.6 through 1.8.6-p286, 1.8.7 through 1.8.7-p71, and 1.9 through r18423 does not properly restrict access to critical variables and methods at various safe levels, which allows context-dependent attackers to bypass intended access restrictions via (1) untrace_var, (2) $PROGRAM_NAME, and (3) syslog at safe level 4, and (4) insecure methods at safe levels 1 through 3.
33
+ * [CVE-2008-3657](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-3657): The dl module in Ruby 1.8.5 and earlier, 1.8.6 through 1.8.6-p286, 1.8.7 through 1.8.7-p71, and 1.9 through r18423 does not check "taintness" of inputs, which allows context-dependent attackers to bypass safe levels and execute dangerous functions by accessing a library using DL.dlopen.
34
+ * [CVE-2008-3790](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-3790): The REXML module in Ruby 1.8.6 through 1.8.6-p287, 1.8.7 through 1.8.7-p72, and 1.9 allows context-dependent attackers to cause a denial of service (CPU consumption) via an XML document with recursively nested entities, aka an "XML entity explosion."
35
+ * [CVE-2008-3905](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-3905): resolv.rb in Ruby 1.8.5 and earlier, 1.8.6 before 1.8.6-p287, 1.8.7 before 1.8.7-p72, and 1.9 r18423 and earlier uses sequential transaction IDs and constant source ports for DNS requests, which makes it easier for remote attackers to spoof DNS responses, a different vulnerability than CVE-2008-1447.
36
+ * [CVE-2008-4094](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-4094): Multiple SQL injection vulnerabilities in Ruby on Rails before 2.1.1 allow remote attackers to execute arbitrary SQL commands via the (1) :limit and (2) :offset parameters, related to ActiveRecord, ActiveSupport, ActiveResource, ActionPack, and ActionMailer.
37
+ * [CVE-2008-4310](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-4310): httputils.rb in WEBrick in Ruby 1.8.1 and 1.8.5, as used in Red Hat Enterprise Linux 4 and 5, allows remote attackers to cause a denial of service (CPU consumption) via a crafted HTTP request. NOTE: this issue exists because of an incomplete fix for CVE-2008-3656.
38
+ * [CVE-2008-5189](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5189): CRLF injection vulnerability in Ruby on Rails before 2.0.5 allows remote attackers to inject arbitrary HTTP headers and conduct HTTP response splitting attacks via a crafted URL to the redirect_to function.
39
+ * [CVE-2008-7248](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-7248): Ruby on Rails 2.1 before 2.1.3 and 2.2.x before 2.2.2 does not verify tokens for requests with certain content types, which allows remote attackers to bypass cross-site request forgery (CSRF) protection for requests to applications that rely on this protection, as demonstrated using text/plain.
40
+ * [CVE-2009-4078](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-4078): Multiple cross-site scripting (XSS) vulnerabilities in Redmine 0.8.5 and earlier allow remote attackers to inject arbitrary web script or HTML via unspecified vectors.
41
+ * [CVE-2009-4124](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-4124): Heap-based buffer overflow in the rb_str_justify function in string.c in Ruby 1.9.1 before 1.9.1-p376 allows context-dependent attackers to execute arbitrary code via unspecified vectors involving (1) String#ljust, (2) String#center, or (3) String#rjust. NOTE: some of these details are obtained from third party information.
42
+ * [CVE-2009-4214](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-4214): Cross-site scripting (XSS) vulnerability in the strip_tags function in Ruby on Rails before before 2.3.5, allows remote attackers to inject arbitrary web script or HTML via vectors involving non-printing ASCII characters, related to HTML::Tokenizer and actionpack/lib/action_controller/vendor/html-scanner/html/node.rb.
43
+ * [CVE-2010-1330](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-1330): The regular expression engine in JRuby before 1.4.1, when $KCODE is set to 'u', does not properly handle characters immediately after a UTF-8 character, which allows remote attackers to conduct cross-site scripting (XSS) attacks via a crafted string.
44
+ * [CVE-2010-2489](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-2489): Buffer overflow in Ruby 1.9.x before 1.9.1-p429 on Windows might allow local users to gain privileges via a crafted ARGF.inplace_mode value that is not properly handled when constructing the filenames of the backup files
45
+ * [CVE-2010-3933](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-3933): Ruby on Rails 2.3.9 and 3.0.0 does not properly handle nested attributes, which allows remote attackers to modify arbitrary records by changing the names of parameters for form inputs.
46
+ * [CVE-2011-0188](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-0188): The VpMemAlloc function in bigdecimal.c in the BigDecimal class in Ruby 1.9.2-p136 and earlier, as used on Apple Mac OS X before 10.6.7 and other platforms, does not properly allocate memory, which allows context-dependent attackers to execute arbitrary code or cause a denial of service (application crash) via vectors involving creation of a large BigDecimal value within a 64-bit process, related to an "integer truncation issue."
47
+ * [CVE-2011-0446](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-0446): Multiple cross-site scripting (XSS) vulnerabilities in the mail_to helper in Ruby on Rails before 2.3.11, and 3.x before 3.0.4, when javascript encoding is used, allow remote attackers to inject arbitrary web script or HTML via a crafted (1) name or (2) email value. Please note that victim must voluntarily interact with attack mechanism
48
+ * [CVE-2011-0447](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-0447): Ruby on Rails 2.1.x, 2.2.x, and 2.3.x before 2.3.11, and 3.x before 3.0.4, does not properly validate HTTP requests that contain an X-Requested-With header, which makes it easier for remote attackers to conduct cross-site request forgery (CSRF) attacks via forged (1) AJAX or (2) API requests that leverage "combinations of browser plugins and HTTP redirects," a related issue to CVE-2011-0696.
49
+ * [CVE-2011-0739](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-0739): The deliver function in the sendmail delivery agent (lib/mail/network/delivery_methods/sendmail.rb) in Ruby Mail gem 2.2.14 and earlier allows remote attackers to execute arbitrary commands via shell metacharacters in an e-mail address.
50
+ * [CVE-2011-0995](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-0995): The sqlite3-ruby gem in the rubygem-sqlite3 package before 1.2.4-0.5.1 in SUSE Linux Enterprise (SLE) 11 SP1 uses weak permissions for unspecified files, which allows local users to gain privileges via unknown vectors.
51
+ * [CVE-2011-1004](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-1004): The FileUtils.remove_entry_secure method in Ruby 1.8.6 through 1.8.6-420, 1.8.7 through 1.8.7-330, 1.8.8dev, 1.9.1 through 1.9.1-430, 1.9.2 through 1.9.2-136, and 1.9.3dev allows local users to delete arbitrary files via a symlink attack.
52
+ * [CVE-2011-1005](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-1005): The safe-level feature in Ruby 1.8.6 through 1.8.6-420, 1.8.7 through 1.8.7-330, and 1.8.8dev allows context-dependent attackers to modify strings via the Exception#to_s method, as demonstrated by changing an intended pathname.
53
+ * [CVE-2011-2197](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-2197): The cross-site scripting (XSS) prevention feature in Ruby on Rails 2.x before 2.3.12, 3.0.x before 3.0.8, and 3.1.x before 3.1.0.rc2 does not properly handle mutation of safe buffers, which makes it easier for remote attackers to conduct XSS attacks via crafted strings to an application that uses a problematic string method, as demonstrated by the sub method.
54
+ * [CVE-2011-2686](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-2686): Ruby before 1.8.7-p352 does not reset the random seed upon forking, which makes it easier for context-dependent attackers to predict the values of random numbers by leveraging knowledge of the number sequence obtained in a different child process, a related issue to CVE-2003-0900. NOTE: this issue exists because of a regression during Ruby 1.8.6 development.
55
+ * [CVE-2011-2705](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-2705): The SecureRandom.random_bytes function in lib/securerandom.rb in Ruby before 1.8.7-p352 and 1.9.x before 1.9.2-p290 relies on PID values for initialization, which makes it easier for context-dependent attackers to predict the result string by leveraging knowledge of random strings obtained in an earlier process with the same PID.
56
+ * [CVE-2011-2929](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-2929): The template selection functionality in actionpack/lib/action_view/template/resolver.rb in Ruby on Rails 3.0.x before 3.0.10 and 3.1.x before 3.1.0.rc6 does not properly handle glob characters, which allows remote attackers to render arbitrary views via a crafted URL, related to a "filter skipping vulnerability."
57
+ * [CVE-2011-2930](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-2930): Multiple SQL injection vulnerabilities in the quote_table_name method in the ActiveRecord adapters in activerecord/lib/active_record/connection_adapters/ in Ruby on Rails before 2.3.13, 3.0.x before 3.0.10, and 3.1.x before 3.1.0.rc5 allow remote attackers to execute arbitrary SQL commands via a crafted column name.
58
+ * [CVE-2011-2931](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-2931): 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.
59
+ * [CVE-2011-2932](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-2932): Cross-site scripting (XSS) vulnerability in activesupport/lib/active_support/core_ext/string/output_safety.rb in Ruby on Rails 2.x 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 malformed Unicode string, related to a "UTF-8 escaping vulnerability."
60
+ * [CVE-2011-3009](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-3009): Ruby before 1.8.6-p114 does not reset the random seed upon forking, which makes it easier for context-dependent attackers to predict the values of random numbers by leveraging knowledge of the number sequence obtained in a different child process, a related issue to CVE-2003-0900.
61
+ * [CVE-2011-3186](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-3186): CRLF injection vulnerability in actionpack/lib/action_controller/response.rb in Ruby on Rails 2.3.x before 2.3.13 allows remote attackers to inject arbitrary HTTP headers and conduct HTTP response splitting attacks via the Content-Type header.
62
+ * [CVE-2011-3187](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-3187): The to_s method in actionpack/lib/action_dispatch/middleware/remote_ip.rb in Ruby on Rails 3.0.5 does not validate the X-Forwarded-For header in requests from IP addresses on a Class C network, which might allow remote attackers to inject arbitrary text into log files or bypass intended address parsing via a crafted header.
63
+ * [CVE-2011-4319](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-4319): Cross-site scripting (XSS) vulnerability in the i18n translations helper method in Ruby on Rails 3.0.x before 3.0.11 and 3.1.x before 3.1.2, and the rails_xss plugin in Ruby on Rails 2.3.x, allows remote attackers to inject arbitrary web script or HTML via vectors related to a translations string whose name ends with an "html" substring.
64
+ * [CVE-2011-4815](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-4815): Ruby (aka CRuby) before 1.8.7-p357 computes hash values without restricting the ability to trigger hash collisions predictably, which allows context-dependent attackers to cause a denial of service (CPU consumption) via crafted input to an application that maintains a hash table.
65
+ * [CVE-2011-5036](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-5036): Rack before 1.1.3, 1.2.x before 1.2.5, and 1.3.x before 1.3.6 computes hash values for form parameters without restricting the ability to trigger hash collisions predictably, which allows remote attackers to cause a denial of service (CPU consumption) by sending many crafted parameters.
66
+ * [CVE-2012-1098](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-1098): Cross-site scripting (XSS) vulnerability in Ruby on Rails 3.0.x before 3.0.12, 3.1.x before 3.1.4, and 3.2.x before 3.2.2 allows remote attackers to inject arbitrary web script or HTML via vectors involving a SafeBuffer object that is manipulated through certain methods.
67
+ * [CVE-2012-1099](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-1099): Cross-site scripting (XSS) vulnerability in actionpack/lib/action_view/helpers/form_options_helper.rb in the select helper in Ruby on Rails 3.0.x before 3.0.12, 3.1.x before 3.1.4, and 3.2.x before 3.2.2 allows remote attackers to inject arbitrary web script or HTML via vectors involving certain generation of OPTION elements within SELECT elements.
68
+ * [CVE-2012-1241](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-1241): GRScript18.dll before 1.2.2.0 in ActiveScriptRuby (ASR) before 1.8.7 does not properly restrict interaction with an Internet Explorer ActiveX environment, which allows remote attackers to execute arbitrary Ruby code via a crafted HTML document.
69
+ * [CVE-2012-2139](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-2139): Directory traversal vulnerability in lib/mail/network/delivery_methods/file_delivery.rb in the Mail gem before 2.4.4 for Ruby allows remote attackers to read arbitrary files via a .. (dot dot) in the to parameter.
70
+ * [CVE-2012-2140](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-2140): The Mail gem before 2.4.3 for Ruby allows remote attackers to execute arbitrary commands via shell metacharacters in a (1) sendmail or (2) exim delivery.
71
+ * [CVE-2012-2660](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-2660): 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.
72
+ * [CVE-2012-2661](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-2661): 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.
73
+ * [CVE-2012-2671](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-2671): The Rack::Cache rubygem 0.3.0 through 1.1 caches Set-Cookie and other sensitive headers, which allows attackers to obtain sensitive cookie information, hijack web sessions, or have other unspecified impact by accessing the cache.
74
+ * [CVE-2012-2694](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-2694): 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.
75
+ * [CVE-2012-2695](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-2695): 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.
76
+ * [CVE-2012-3424](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-3424): The decode_credentials method in actionpack/lib/action_controller/metal/http_authentication.rb in Ruby on Rails 3.x before 3.0.16, 3.1.x before 3.1.7, and 3.2.x before 3.2.7 converts Digest Authentication strings to symbols, which allows remote attackers to cause a denial of service by leveraging access to an application that uses a with_http_digest helper method, as demonstrated by the authenticate_or_request_with_http_digest method.
77
+ * [CVE-2012-3463](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-3463): Cross-site scripting (XSS) vulnerability in actionpack/lib/action_view/helpers/form_tag_helper.rb in Ruby on Rails 3.x 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 the prompt field to the select_tag helper.
78
+ * [CVE-2012-3464](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-3464): Cross-site scripting (XSS) vulnerability in activesupport/lib/active_support/core_ext/string/output_safety.rb in Ruby on Rails before 3.0.17, 3.1.x before 3.1.8, and 3.2.x before 3.2.8 might allow remote attackers to inject arbitrary web script or HTML via vectors involving a ' (quote) character.
79
+ * [CVE-2012-3465](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-3465): 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.
80
+ * [CVE-2012-4464](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-4464): Ruby 1.9.3 before patchlevel 286 and 2.0 before revision r37068 allows context-dependent attackers to bypass safe-level restrictions and modify untainted strings via the (1) exc_to_s or (2) name_err_to_s API function, which marks the string as tainted, a different vulnerability than CVE-2012-4466. NOTE: this issue might exist because of a CVE-2011-1005 regression.
81
+ * [CVE-2012-4466](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-4466): Ruby 1.8.7 before patchlevel 371, 1.9.3 before patchlevel 286, and 2.0 before revision r37068 allows context-dependent attackers to bypass safe-level restrictions and modify untainted strings via the name_err_mesg_to_str API function, which marks the string as tainted, a different vulnerability than CVE-2011-1005.
82
+ * [CVE-2012-4481](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-4481): The safe-level feature in Ruby 1.8.7 allows context-dependent attackers to modify strings via the NameError#to_s method when operating on Ruby objects. NOTE: this issue is due to an incomplete fix for CVE-2011-1005.
83
+ * [CVE-2012-4522](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-4522): The rb_get_path_check function in file.c in Ruby 1.9.3 before patchlevel 286 and Ruby 2.0.0 before r37163 allows context-dependent attackers to create files in unexpected locations or with unexpected names via a NUL byte in a file path.
84
+ * [CVE-2012-5370](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-5370): JRuby computes hash values without properly restricting the ability to trigger hash collisions predictably, which allows context-dependent attackers to cause a denial of service (CPU consumption) via crafted input to an application that maintains a hash table, as demonstrated by a universal multicollision attack against the MurmurHash2 algorithm, a different vulnerability than CVE-2011-4838.
85
+ * [CVE-2012-5371](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-5371): Ruby (aka CRuby) 1.9 before 1.9.3-p327 and 2.0 before r37575 computes hash values without properly restricting the ability to trigger hash collisions predictably, which allows context-dependent attackers to cause a denial of service (CPU consumption) via crafted input to an application that maintains a hash table, as demonstrated by a universal multicollision attack against a variant of the MurmurHash2 algorithm, a different vulnerability than CVE-2011-4815.
86
+ * [CVE-2012-5380](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-5380): ** DISPUTED ** Untrusted search path vulnerability in the installation functionality in Ruby 1.9.3-p194, when installed in the top-level C: directory, might allow local users to gain privileges via a Trojan horse DLL in the C:Ruby193in directory, which may be added to the PATH system environment variable by an administrator, as demonstrated by a Trojan horse wlbsctrl.dll file used by the "IKE and AuthIP IPsec Keying Modules" system service in Windows Vista SP1, Windows Server 2008 SP2, Windows 7 SP1, and Windows 8 Release Preview. NOTE: CVE disputes this issue because the unsafe PATH is established only by a separate administrative action that is not a default part of the Ruby installation.
87
+ * [CVE-2012-6109](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-6109): lib/rack/multipart.rb in Rack before 1.1.4, 1.2.x before 1.2.6, 1.3.x before 1.3.7, and 1.4.x before 1.4.2 uses an incorrect regular expression, which allows remote attackers to cause a denial of service (infinite loop) via a crafted Content-Disposion header.
88
+ * [CVE-2012-6134](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-6134): Cross-site request forgery (CSRF) vulnerability in the omniauth-oauth2 gem 1.1.1 and earlier for Ruby allows remote attackers to hijack the authentication of users for requests that modify session state.
89
+ * [CVE-2012-6496](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-6496): 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.
90
+ * [CVE-2012-6497](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-6497): 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.
91
+ * [CVE-2013-0155](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-0155): 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.
92
+ * [CVE-2013-0156](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-0156): active_support/core_ext/hash/conversions.rb in Ruby on Rails before 2.3.15, 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 restrict casts of string values, which allows remote attackers to conduct object-injection attacks and execute arbitrary code, or cause a denial of service (memory and CPU consumption) involving nested XML entity references, by leveraging Action Pack support for (1) YAML type conversion or (2) Symbol type conversion.
93
+ * [CVE-2013-0162](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-0162): The diff_pp function in lib/gauntlet_rubyparser.rb in the ruby_parser gem 3.1.1 and earlier for Ruby allows local users to overwrite arbitrary files via a symlink attack on a temporary file with a predictable name in /tmp.
94
+ * [CVE-2013-0175](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-0175): multi_xml gem 0.5.2 for Ruby, as used in Grape before 0.2.6 and possibly other products, does not properly restrict casts of string values, which allows remote attackers to conduct object-injection attacks and execute arbitrary code, or cause a denial of service (memory and CPU consumption) involving nested XML entity references, by leveraging support for (1) YAML type conversion or (2) Symbol type conversion, a similar vulnerability to CVE-2013-0156.
95
+ * [CVE-2013-0183](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-0183): multipart/parser.rb in Rack 1.3.x before 1.3.8 and 1.4.x before 1.4.3 allows remote attackers to cause a denial of service (memory consumption and out-of-memory error) via a long string in a Multipart HTTP packet.
96
+ * [CVE-2013-0184](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-0184): Unspecified vulnerability in Rack::Auth::AbstractRequest in Rack 1.1.x before 1.1.5, 1.2.x before 1.2.7, 1.3.x before 1.3.9, and 1.4.x before 1.4.4 allows remote attackers to cause a denial of service via unknown vectors related to "symbolized arbitrary strings."
97
+ * [CVE-2013-0233](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-0233): Devise gem 2.2.x before 2.2.3, 2.1.x before 2.1.3, 2.0.x before 2.0.5, and 1.5.x before 1.5.4 for Ruby, when using certain databases, does not properly perform type conversion when performing database queries, which might allow remote attackers to cause incorrect results to be returned and bypass security checks via unknown vectors, as demonstrated by resetting passwords of arbitrary accounts.
98
+ * [CVE-2013-0256](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-0256): darkfish.js in RDoc 2.3.0 through 3.12 and 4.x before 4.0.0.preview2.1, as used in Ruby, does not properly generate documents, which allows remote attackers to conduct cross-site scripting (XSS) attacks via a crafted URL.
99
+ * [CVE-2013-0262](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-0262): rack/file.rb (Rack::File) in Rack 1.5.x before 1.5.2 and 1.4.x before 1.4.5 allows attackers to access arbitrary files outside the intended root directory via a crafted PATH_INFO environment variable, probably a directory traversal vulnerability that is remotely exploitable, aka "symlink path traversals."
100
+ * [CVE-2013-0263](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-0263): Rack::Session::Cookie in Rack 1.5.x before 1.5.2, 1.4.x before 1.4.5, 1.3.x before 1.3.10, 1.2.x before 1.2.8, and 1.1.x before 1.1.6 allows remote attackers to guess the session cookie, gain privileges, and execute arbitrary code via a timing attack involving an HMAC comparison function that does not run in constant time.
101
+ * [CVE-2013-0269](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-0269): 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."
102
+ * [CVE-2013-0276](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-0276): ActiveRecord in Ruby on Rails before 2.3.17, 3.1.x before 3.1.11, and 3.2.x before 3.2.12 allows remote attackers to bypass the attr_protected protection mechanism and modify protected model attributes via a crafted request.
103
+ * [CVE-2013-0277](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-0277): ActiveRecord in Ruby on Rails before 2.3.17 and 3.x before 3.1.0 allows remote attackers to cause a denial of service or execute arbitrary code via crafted serialized attributes that cause the +serialize+ helper to deserialize arbitrary YAML.
104
+ * [CVE-2013-0284](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-0284): Ruby agent 3.2.0 through 3.5.2 serializes sensitive data when communicating with servers operated by New Relic, which allows remote attackers to obtain sensitive information (database credentials and SQL statements) by sniffing the network and deserializing the data.
105
+ * [CVE-2013-0285](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-0285): The nori gem 2.0.x before 2.0.2, 1.1.x before 1.1.4, and 1.0.x before 1.0.3 for Ruby does not properly restrict casts of string values, which allows remote attackers to conduct object-injection attacks and execute arbitrary code, or cause a denial of service (memory and CPU consumption) involving nested XML entity references, by leveraging Action Pack support for (1) YAML type conversion or (2) Symbol type conversion, a similar vulnerability to CVE-2013-0156.
106
+ * [CVE-2013-0333](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-0333): 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.
107
+ * [CVE-2013-1607](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-1607): PDFKit Gem for Ruby contains a flaw that is due to the program failing to properly validate input during the handling of parameters when generating PDF files. This may allow a remote attacker to potentially execute arbitrary code via the pdfkit generation options.
108
+ * [CVE-2013-1655](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-1655): Puppet 2.7.x before 2.7.21 and 3.1.x before 3.1.1, when
109
+ running Ruby 1.9.3 or later, allows remote attackers to execute
110
+ arbitrary code via vectors related to "serialized attributes."
111
+ * [CVE-2013-1656](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-1656): Spree Commerce 1.0.x through 1.3.2 allow remote authenticated administrators to instantiate arbitrary Ruby objects and execute arbitrary commands via the (1) payment_method parameter to core/app/controllers/spree/admin/payment_methods_controller.rb; and the (2) promotion_action parameter to promotion_actions_controller.rb, (3) promotion_rule parameter to promotion_rules_controller.rb, and (4) calculator_type parameter to promotions_controller.rb in promo/app/controllers/spree/admin/, related to unsafe use of the constantize function.
112
+ * [CVE-2013-1756](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-1756): Dragonfly Gem for Ruby contains a flaw that is triggered during the parsing of a specially crafted request. This may allow a remote attacker to execute arbitrary code.
113
+ * [CVE-2013-1800](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-1800): 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.
114
+ * [CVE-2013-1801](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-1801): The httparty gem 0.9.0 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 YAML type conversion, a similar vulnerability to CVE-2013-0156.
115
+ * [CVE-2013-1802](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-1802): The extlib gem 0.9.15 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.
116
+ * [CVE-2013-1812](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-1812): The ruby-openid gem before 2.2.2 for Ruby allows remote OpenID providers to cause a denial of service (CPU consumption) via (1) a large XRDS document or (2) an XML Entity Expansion (XEE) attack.
117
+ * [CVE-2013-1821](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-1821): lib/rexml/text.rb in the REXML parser in Ruby before 1.9.3-p392 and 2.0.0-p0 allows remote attackers to cause a denial of service (memory consumption and crash) via crafted text nodes in an XML document, aka an XML Entity Expansion (XEE) attack.
118
+ * [CVE-2013-1854](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-1854): The Active Record component in Ruby on Rails 2.3.x before 2.3.18, 3.1.x before 3.1.12, and 3.2.x before 3.2.13 processes certain queries by converting hash keys to symbols, which allows remote attackers to cause a denial of service via crafted input to a where method.
119
+ * [CVE-2013-1855](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-1855): The sanitize_css method in lib/action_controller/vendor/html-scanner/html/sanitizer.rb in the Action Pack component in Ruby on Rails before 2.3.18, 3.0.x and 3.1.x before 3.1.12, and 3.2.x before 3.2.13 does not properly handle \n (newline) characters, which makes it easier for remote attackers to conduct cross-site scripting (XSS) attacks via crafted Cascading Style Sheets (CSS) token sequences.
120
+ * [CVE-2013-1856](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-1856): The ActiveSupport::XmlMini_JDOM backend in lib/active_support/xml_mini/jdom.rb in the Active Support component in Ruby on Rails 3.0.x and 3.1.x before 3.1.12 and 3.2.x before 3.2.13, when JRuby is used, does not properly restrict the capabilities of the XML parser, which allows remote attackers to read arbitrary files or cause a denial of service (resource consumption) via vectors involving (1) an external DTD or (2) an external entity declaration in conjunction with an entity reference.
121
+ * [CVE-2013-1857](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-1857): The sanitize helper in lib/action_controller/vendor/html-scanner/html/sanitizer.rb in the Action Pack component in Ruby on Rails before 2.3.18, 3.0.x and 3.1.x before 3.1.12, and 3.2.x before 3.2.13 does not properly handle encoded : (colon) characters in URLs, which makes it easier for remote attackers to conduct cross-site scripting (XSS) attacks via a crafted scheme name, as demonstrated by including a : sequence.
122
+ * [CVE-2013-1875](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-1875): command_wrap.rb in the command_wrap Gem for Ruby allows remote attackers to execute arbitrary commands via shell metacharacters in a URL or filename.
123
+ * [CVE-2013-1898](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-1898): lib/thumbshooter.rb in the Thumbshooter 0.1.5 gem for Ruby allows remote attackers to execute arbitrary commands via shell metacharacters in a URL.
124
+ * [CVE-2013-1911](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-1911): lib/ldoce/word.rb in the ldoce 0.0.2 gem for Ruby allows remote attackers to execute arbitrary commands via shell metacharacters in (1) an mp3 URL or (2) file name.
125
+ * [CVE-2013-1933](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-1933): The extract_from_ocr function in lib/docsplit/text_extractor.rb in the Karteek Docsplit (karteek-docsplit) gem 0.5.4 for Ruby allows context-dependent attackers to execute arbitrary commands via shell metacharacters in a PDF filename.
126
+ * [CVE-2013-1947](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-1947): kelredd-pruview gem 0.3.8 for Ruby allows context-dependent attackers to execute arbitrary commands via shell metacharacters in a filename argument to (1) document.rb, (2) video.rb, or (3) video_image.rb.
127
+ * [CVE-2013-1948](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-1948): converter.rb in the md2pdf gem 0.0.1 for Ruby allows context-dependent attackers to execute arbitrary commands via shell metacharacters in a filename.
128
+ * [CVE-2013-2065](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-2065): Native functions exposed to Ruby with DL or Fiddle do not check the taint values set on the objects passed in. This can result in tainted objects being accepted as input when a SecurityError exception should be raised.
129
+ * [CVE-2013-2090](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-2090): Ruby Gem Creme Fraiche version 0.6 suffers from a remote command injection vulnerability due to unsanitized input.
130
+ * [CVE-2013-2105](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-2105): The Show In Browser (show_in_browser) gem 0.0.3 for Ruby allows local users to inject arbitrary web script or HTML via a symlink attack on /tmp/browser.html.
131
+ * [CVE-2013-2119](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-2119): Phusion Passenger gem before 3.0.21 and 4.0.x before 4.0.5 for Ruby allows local users to cause a denial of service (prevent application start) or gain privileges by pre-creating a temporary "config" file in a directory with a predictable name in /tmp/ before it is used by the gem.
132
+ * [CVE-2013-2512](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-2512): ftpd Gem for Ruby contains a flaw that is triggered when handling a specially crafted option or filename that contains a shell character. This may allow a remote attacker to inject arbitrary commands
133
+ * [CVE-2013-2513](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-2513): flash_tool Gem for Ruby contains a flaw that is triggered during the handling of downloaded files that contain shell characters. With a specially crafted file, a context-dependent attacker can execute arbitrary commands.
134
+ * [CVE-2013-2516](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-2516): fileutils Gem for Ruby contains a flaw in file_utils.rb. The issue is triggered when handling a specially crafted URL containing a command after a delimiter (;). This may allow a remote attacker to potentially execute arbitrary commands.
135
+ * [CVE-2013-2615](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-2615): lib/entry_controller.rb in the fastreader Gem 1.0.8 for Ruby allows remote attackers to execute arbitrary commands via shell metacharacters in a URL.
136
+ * [CVE-2013-2616](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-2616): lib/mini_magick.rb in the MiniMagick Gem 1.3.1 for Ruby allows remote attackers to execute arbitrary commands via shell metacharacters in a URL.
137
+ * [CVE-2013-2617](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-2617): lib/curl.rb in the Curl Gem for Ruby allows remote attackers to execute arbitrary commands via shell metacharacters in a URL.
138
+ * [CVE-2013-3221](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-3221): The Active Record component in Ruby on Rails 2.3.x, 3.0.x, 3.1.x, and 3.2.x does not ensure that the declared data type of a database column is used during comparisons of input values to stored values in that column, which makes it easier for remote attackers to conduct data-type injection attacks against Ruby on Rails applications via a crafted value, as demonstrated by unintended interaction between the "typed XML" feature and a MySQL database.
139
+ * [CVE-2013-4164](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-4164): Any time a string is converted to a floating point value, a specially crafted string can cause a heap overflow. This can lead to a denial of service attack via segmentation faults and possibly arbitrary code execution. Any program that converts input of unknown origin to floating point values (especially common when accepting JSON) are vulnerable.
140
+ * [CVE-2013-4203](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-4203): The self.run_gpg function in lib/rgpg/gpg_helper.rb in the rgpg gem before 0.2.3 for Ruby allows remote attackers to execute arbitrary commands via shell metacharacters in unspecified vectors.
141
+ * [CVE-2013-4389](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-4389): Multiple format string vulnerabilities in log_subscriber.rb files in the log subscriber component in Action Mailer in Ruby on Rails 3.x before 3.2.15 allow remote attackers to cause a denial of service via a crafted e-mail address that is improperly handled during construction of a log message.
142
+ * [CVE-2013-4413](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-4413): Wicked Gem for Ruby contains a flaw that is due to the program failing to properly sanitize input passed via the 'the_step' parameter upon submission to the render_redirect.rb script. This may allow a remote attacker to gain access to arbitrary files.
143
+ * [CVE-2013-4457](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-4457): The Cocaine gem 0.4.0 through 0.5.2 for Ruby allows context-dependent attackers to execute arbitrary commands via a crafted has object, related to recursive variable interpolation.
144
+ * [CVE-2013-4478](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-4478): Sup before 0.13.2.1 and 0.14.x before 0.14.1.1 allows remote attackers to execute arbitrary commands via shell metacharacters in the filename of an email attachment.
145
+ * [CVE-2013-4479](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-4479): lib/sup/message_chunks.rb in Sup before 0.13.2.1 and 0.14.x before 0.14.1.1 allows remote attackers to execute arbitrary commands via shell metacharacters in the content_type of an email attachment.
146
+ * [CVE-2013-4489](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-4489): There is a remote code execution vulnerability in the code search feature of GitLab provided by the grit gem.
147
+ * [CVE-2013-4491](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-4491): Cross-site scripting (XSS) vulnerability in actionpack/lib/action_view/helpers/translation_helper.rb in the internationalization component in Ruby on Rails 3.x before 3.2.16 and 4.x before 4.0.2 allows remote attackers to inject arbitrary web script or HTML via a crafted string that triggers generation of a fallback string by the i18n gem.
148
+ * [CVE-2013-4492](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-4492): Cross-site scripting (XSS) vulnerability in exceptions.rb in the i18n gem before 0.6.6 for Ruby allows remote attackers to inject arbitrary web script or HTML via a crafted I18n::MissingTranslationData.new call.
149
+ * [CVE-2013-4562](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-4562): Because of the way that omniauth-facebook supports setting a per-request state parameter by storing it in the session, it is possible to circumvent the automatic CSRF protection. Therefore the CSRF added in 1.4.1 should be considered broken. If you are currently providing a custom state, you will need to store and retrieve this yourself (for example, by using the session store) to use 1.5.0.
150
+ * [CVE-2013-4593](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-4593): omniauth-facebook Gem for Ruby contains a flaw that is due to the application supporting passing the access token via the URL. This may allow a remote attacker to bypass authentication and authenticate as another user.
151
+ * [CVE-2013-5647](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-5647): lib/sounder/sound.rb in the sounder gem 1.0.1 for Ruby allows remote attackers to execute arbitrary commands via shell metacharacters in a filename.
152
+ * [CVE-2013-5671](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-5671): fog-dragonfly Gem for Ruby contains a flaw that is due to the program failing to properly sanitize input passed via the imagemagickutils.rb script. This may allow a remote attacker to execute arbitrary commands.
153
+ * [CVE-2013-6414](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-6414): actionpack/lib/action_view/lookup_context.rb in Action View in Ruby on Rails 3.x before 3.2.16 and 4.x before 4.0.2 allows remote attackers to cause a denial of service (memory consumption) via a header containing an invalid MIME type that leads to excessive caching.
154
+ * [CVE-2013-6415](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-6415): Cross-site scripting (XSS) vulnerability in the number_to_currency helper in actionpack/lib/action_view/helpers/number_helper.rb in Ruby on Rails before 3.2.16 and 4.x before 4.0.2 allows remote attackers to inject arbitrary web script or HTML via the unit parameter.
155
+ * [CVE-2013-6416](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-6416): Cross-site scripting (XSS) vulnerability in the simple_format helper in actionpack/lib/action_view/helpers/text_helper.rb in Ruby on Rails 4.x before 4.0.2 allows remote attackers to inject arbitrary web script or HTML via a crafted HTML attribute.
156
+ * [CVE-2013-6417](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-6417): actionpack/lib/action_dispatch/http/request.rb in Ruby on Rails before 3.2.16 and 4.x before 4.0.2 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 that leverages (1) third-party Rack middleware or (2) custom Rack middleware. NOTE: this vulnerability exists because of an incomplete fix for CVE-2013-0155.
157
+ * [CVE-2013-6421](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-6421): The unpack_zip function in archive_unpacker.rb in the sprout gem 0.7.246 for Ruby allows context-dependent attackers to execute arbitrary commands via shell metacharacters in a (1) filename or (2) path.
158
+ * [CVE-2013-6459](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-6459): Cross-site scripting (XSS) vulnerability in the will_paginate gem before 3.0.5 for Ruby allows remote attackers to inject arbitrary web script or HTML via vectors involving generated pagination links.
159
+ * [CVE-2013-6460](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-6460): There is a vulnerability in Nokogiri when using JRuby where the parser can enter an infinite loop and exhaust the process memory. Nokogiri users on JRuby using the native Java extension. Attackers can send XML documents with carefully crafted documents which can cause the XML processor to enter an infinite loop, causing the server to run out of memory and crash.
160
+ * [CVE-2013-6461](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-6461): There is an entity expansion vulnerability in Nokogiri when using JRuby. Nokogiri users on JRuby using the native Java extension. Attackers can send
161
+ XML documents with carefully crafted entity expansion strings which can cause the server to run out of memory and crash.
162
+ * [CVE-2013-7086](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-7086): The message function in lib/webbynode/notify.rb in the Webbynode gem 1.0.5.3 and earlier for Ruby allows context-dependent attackers to execute arbitrary commands via shell metacharacters in a growlnotify message.
163
+ * [CVE-2014-0036](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-0036): 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.
164
+ * [CVE-2014-0080](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-0080): SQL injection vulnerability in activerecord/lib/active_record/connection_adapters/postgresql/cast.rb in Active Record in Ruby on Rails 4.0.x before 4.0.3, and 4.1.0.beta1, when PostgreSQL is used, allows remote attackers to execute "add data" SQL commands via vectors involving (backslash) characters that are not properly handled in operations on array columns.
165
+ * [CVE-2014-0081](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-0081): Multiple cross-site scripting (XSS) vulnerabilities in actionview/lib/action_view/helpers/number_helper.rb in Ruby on Rails before 3.2.17, 4.0.x before 4.0.3, and 4.1.x before 4.1.0.beta2 allow remote attackers to inject arbitrary web script or HTML via the (1) format, (2) negative_format, or (3) units parameter to the (a) number_to_currency, (b) number_to_percentage, or (c) number_to_human helper.
166
+ * [CVE-2014-0082](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-0082): actionpack/lib/action_view/template/text.rb in Action View in Ruby on Rails 3.x before 3.2.17 converts MIME type strings to symbols during use of the :text option to the render method, which allows remote attackers to cause a denial of service (memory consumption) by including these strings in headers.
167
+ * [CVE-2014-0130](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-0130): The implicit render functionality allows controllers to render a template, even if there is no explicit action with the corresponding name. This module does not perform adequate input sanitization which could allow an attacker to use a specially crafted request to retrieve arbitrary files from the rails application server.
168
+ * [CVE-2014-1233](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-1233): The paratrooper-pingdom gem 1.0.0 for Ruby allows local users to obtain the App-Key, username, and password values by listing the curl process.
169
+ * [CVE-2014-1234](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-1234): The paratrooper-newrelic gem 1.0.1 for Ruby allows local users to obtain the X-Api-Key value by listing the curl process.
170
+ * [CVE-2014-2322](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-2322): Arabic Prawn Gem for Ruby contains a flaw in the ib/string_utf_support.rb file. The issue is due to the program failing to sanitize user input. This may allow a remote attacker to inject arbitrary commands.
171
+ * [CVE-2014-2525](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-2525):
172
+ * [CVE-2014-2538](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-2538): rack-ssl Gem for Ruby contains a flaw that allows a reflected cross-site scripting (XSS) attack. This flaw exists because the program does not validate input passed via error messages before returning it to users. This may allow a context-dependent attacker to create a specially crafted request that would execute arbitrary script code in a user's browser session within the trust relationship between their browser and the server.
173
+ * [CVE-2014-3482](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-3482): Ruby on Rails contains a flaw that may allow carrying out an SQL injection attack. The issue is due to the PostgreSQL adapter for Active Record not properly sanitizing user-supplied input when quoting bitstrings. This may allow a remote attacker to inject or manipulate SQL queries in the back-end database, allowing for the manipulation or disclosure of arbitrary data.
174
+ * [CVE-2014-3483](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-3483): Ruby on Rails contains a flaw that may allow carrying out an SQL injection attack. The issue is due to the PostgreSQL adapter for Active Record not properly sanitizing user-supplied input when quoting ranges. This may allow a remote attacker to inject or manipulate SQL queries in the back-end database, allowing for the manipulation or disclosure of arbitrary data.
175
+ * [OSVDB-105971](http://osvdb.org/show/osvdb/105971): sfpagent Gem for Ruby contains a flaw that is triggered as JSON[body] input is not properly sanitized when handling module names with shell metacharacters. This may allow a context-dependent attacker to execute arbitrary commands.
176
+ * OSVDB-105971: sfpagent Gem for Ruby contains a flaw that is triggered as JSON[body] input is not properly sanitized when handling module names with shell metacharacters. This may allow a context-dependent attacker to execute arbitrary commands.
177
+ * [OSVDB-108569](http://osvdb.org/show/osvdb/108569): backup_checksum Gem for Ruby contains a flaw in /lib/backup/cli/utility.rb that is triggered as the program displays password information in plaintext in the process list. This may allow a local attacker to gain access to password information.
178
+ * OSVDB-108569: backup_checksum Gem for Ruby contains a flaw in /lib/backup/cli/utility.rb that is triggered as the program displays password information in plaintext in the process list. This may allow a local attacker to gain access to password information.
179
+ * [OSVDB-108570](http://osvdb.org/show/osvdb/108570): backup_checksum Gem for Ruby contains a flaw in /lib/backup/cli/utility.rb that is triggered when handling metacharacters. This may allow a remote attacker to execute arbitrary commands.
180
+ * OSVDB-108570: backup_checksum Gem for Ruby contains a flaw in /lib/backup/cli/utility.rb that is triggered when handling metacharacters. This may allow a remote attacker to execute arbitrary commands.
181
+ * [OSVDB-108530](http://osvdb.org/show/osvdb/108530): kajam Gem for Ruby contains a flaw in /dataset/lib/dataset/database/postgresql.rb that is triggered when handling metacharacters. This may allow a remote attacker to execute arbitrary commands.
182
+ * OSVDB-108530: kajam Gem for Ruby contains a flaw in /dataset/lib/dataset/database/postgresql.rb that is triggered when handling metacharacters. This may allow a remote attacker to execute arbitrary commands.
183
+ * [OSVDB-108563](http://osvdb.org/show/osvdb/108563): gyazo Gem for Ruby contains a flaw in client.rb that is triggered when handling metacharacters. This may allow a remote attacker to execute arbitrary commands.
184
+ * OSVDB-108563: gyazo Gem for Ruby contains a flaw in client.rb that is triggered when handling metacharacters. This may allow a remote attacker to execute arbitrary commands.
185
+ * Owasp Ror CheatSheet: Command Injection: Ruby offers a function called "eval" which will dynamically build new Ruby code based on Strings. It also has a number of ways to call system commands. While the power of these commands is quite useful, extreme care should be taken when using them in a Rails based application. Usually, its just a bad idea. If need be, a whitelist of possible values should be used and any input should be validated as thoroughly as possible. The Ruby Security Reviewer's Guide has a section on injection and there are a number of OWASP references for it, starting at the top: Command Injection.
186
+ * Owasp Ror CheatSheet: Cross Site Request Forgery: Ruby on Rails has specific, built in support for CSRF tokens. To enable it, or ensure that it is enabled, find the base ApplicationController and look for the protect_from_forgery directive. Note that by default Rails does not provide CSRF protection for any HTTP GET request.
187
+ * Owasp Ror CheatSheet: Session management: By default, Ruby on Rails uses a Cookie based session store. What that means is that unless you change something, the session will not expire on the server. That means that some default applications may be vulnerable to replay attacks. It also means that sensitive information should never be put in the session.
188
+ * Owasp Ror CheatSheet: Mass Assignement in model: Although the major issue with Mass Assignment has been fixed by default in base Rails specifically when generating new projects, it still applies to older and upgraded projects so it is important to understand the issue and to ensure that only attributes that are intended to be modifiable are exposed.
189
+ * Owasp Ror CheatSheet: Security Related Headers: To set a header value, simply access the response.headers object as a hash inside your controller (often in a before/after_filter). Rails 4 provides the "default_headers" functionality that will automatically apply the values supplied. This works for most headers in almost all cases.
190
+ * Owasp Ror CheatSheet: Check for safe redirect and forward: Web applications often require the ability to dynamically redirect users based
191
+ on client-supplied data. To clarify, dynamic redirection usually entails the
192
+ client including a URL in a parameter within a request to the application. Once
193
+ received by the application, the user is redirected to the URL specified in the
194
+ request.
195
+
196
+ For example: http://www.example.com/redirect?url=http://www.example_commerce_site.com/checkout
197
+
198
+ The above request would redirect the user to http://www.example.com/checkout.
199
+
200
+ The security concern associated with this functionality is leveraging an
201
+ organization's trusted brand to phish users and trick them into visiting a
202
+ malicious site, in our example, "badhacker.com".
203
+
204
+ Example: http://www.example.com/redirect?url=http://badhacker.com
205
+
206
+ The most basic, but restrictive protection is to use the :only_path option.
207
+ Setting this to true will essentially strip out any host information.
208
+ * Owasp Ror CheatSheet: Sensitive Files: Many Ruby on Rails apps are open source and hosted on publicly available source code repositories. Whether that is the case or the code is committed to a corporate source control system, there are certain files that should be either excluded or carefully managed.
209
+ * Not revised code: Analyzing comments, it seems your code is waiting from some review from you. Please consider take action before putting it in production.
210
+ This check will analyze the source code looking for the following patterns: XXX, TO_CHECK, CHECKME, CHECK and FIXME
211
+
212
+
213
+ _Last updated: Tue 08 Jul 17:59:10 CEST 2014_
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Paolo Perego
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,354 @@
1
+ # Codesake::Dawn - The security code scanner for Ruby
2
+
3
+ Codesake::Dawn is a source code scanner designed to review your code for
4
+ security issues.
5
+
6
+ Codesake::Dawn is able to scan your ruby standalone programs but its main usage
7
+ is to deal with web applications. It supports applications written using majors
8
+ MVC (Model View Controller) frameworks, like:
9
+
10
+ * [Ruby on Rails](http://rubyonrails.org)
11
+ * [Sinatra](http://www.sinatrarb.com)
12
+ * [Padrino](http://www.padrinorb.com)
13
+
14
+ ---
15
+
16
+ [![Gem Version](https://badge.fury.io/rb/codesake-dawn.png)](http://badge.fury.io/rb/codesake-dawn)
17
+ [![Build Status](https://travis-ci.org/codesake/codesake-dawn.png?branch=master)](https://travis-ci.org/codesake/codesake-dawn)
18
+ [![Dependency Status](https://gemnasium.com/codesake/codesake-dawn.png)](https://gemnasium.com/codesake/codesake-dawn)
19
+ [![Coverage Status](https://coveralls.io/repos/codesake/codesake-dawn/badge.png)](https://coveralls.io/r/codesake/codesake-dawn)
20
+ [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/codesake/codesake-dawn/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
21
+ [![Inline docs](http://inch-ci.org/github/codesake/codesake-dawn.png?branch=master)](http://inch-ci.org/github/codesake/codesake-dawn)
22
+
23
+ ---
24
+
25
+ Codesake::Dawn version 1.2 has 180 security checks loaded in its knowledge
26
+ base. Most of them are CVE bulletins applying to gems or the ruby interpreter
27
+ itself. There are also some check coming from Owasp Ruby on Rails cheatsheet.
28
+
29
+ ## An overall introduction
30
+
31
+ When you run Codesake::Dawn on your code it parses your project Gemfile.lock
32
+ looking for the gems used and it tries to detect the ruby interpreter version
33
+ you are using or you declared in your ruby version management tool you like
34
+ most (RVM, rbenv, ...).
35
+
36
+ Then the tool tries to detect the MVC framework your web application uses and
37
+ it applies the security check accordingly. There checks designed to match rails
38
+ application or checks that are appliable to any ruby code.
39
+
40
+ Codesake::Dawn can also understand the code in your views and to backtrack
41
+ sinks to spot cross site scripting and sql injections introduced by the code
42
+ you actually wrote. In the project roadmap this is the code most of the future
43
+ development effort will be focused on.
44
+
45
+ Codesake::Dawn security scan result is a list of vulnerabilities with some
46
+ mitigation actions you want to follow in order to build a stronger web
47
+ application.
48
+
49
+ ## Installation
50
+
51
+ codesake-dawn rubygem is cryptographically signed. To be sure the gem you
52
+ install hasn’t been tampered, you must first add ```paolo@codesake.com```
53
+ public signing certificate as trusted to your gem specific keyring.
54
+
55
+ ```
56
+ $ gem cert --add <(curl -Ls https://raw.githubusercontent.com/codesake/codesake-dawn/master/certs/paolo_at_codesake_dot_com.pem)
57
+ ```
58
+
59
+ You can install latest Codesake::Dawn version, fetching it from
60
+ [Rubygems](https://rubygems.org) by typing:
61
+
62
+ ```
63
+ $ gem install codesake-dawn -P MediumSecurity
64
+ ```
65
+
66
+ The MediumSecurity trust profile will verify signed gems, but allow the
67
+ installation of unsigned dependencies. This is necessary because not all of
68
+ Codesake::Dawn’s dependencies are signed, so we cannot use HighSecurity.
69
+
70
+ In order to install a release candidate version, the gem install command line
71
+ is the following:
72
+
73
+ ```
74
+ $ gem install codesake-dawn --pre -P MediumSecurity
75
+ ```
76
+
77
+ If you want to add dawn to your project Gemfile, you must add the following:
78
+
79
+ group :development do
80
+ gem 'codesake-dawn', :require=>false
81
+ end
82
+
83
+ And then upgrade your bundle
84
+
85
+ $ bundle install
86
+
87
+ You may want to build it from source, so you have to check it out from github first:
88
+
89
+ $ git clone https://github.com/codesake/codesake-dawn.git
90
+ $ cd codesake-dawn
91
+ $ bundle install
92
+ $ rake install
93
+
94
+ And the codesake-dawn gem will be built in a pkg directory and then installed
95
+ on your system. Please note that you have to manage dependencies on your own
96
+ this way. It makes sense only if you want to hack the code or something like
97
+ that.
98
+
99
+ ## Usage
100
+
101
+ You can start your code review with Codesake::Dawn very easily. Simply tell the tool
102
+ where the project root directory.
103
+
104
+ Underlying MVC framework is autodetected by Codesake::Dawn using target Gemfile.lock
105
+ file. If autodetect fails for some reason, the tool will complain about it and
106
+ you have to specify if it's a rails, sinatra or padrino web application by
107
+ hand.
108
+
109
+ Basic usage is to specify some optional command line option to fit best your
110
+ needs, and to specify the target directory where your code is stored.
111
+
112
+ ```
113
+ $ dawn [options] target
114
+ ```
115
+
116
+ In case of need, there is a quick command line option reference running ```dawn -h``` at your OS prompt.
117
+
118
+ ```
119
+ $ dawn -h
120
+ Usage: dawn [options] target_directory
121
+
122
+ Examples:
123
+ $ dawn a_sinatra_webapp_directory
124
+ $ dawn -C the_rails_blog_engine
125
+ $ dawn -C --json a_sinatra_webapp_directory
126
+ $ dawn --ascii-tabular-report my_rails_blog_ecommerce
127
+ $ dawn --html -F my_report.html my_rails_blog_ecommerce
128
+
129
+ -r, --rails force dawn to consider the target a rails application
130
+ -s, --sinatra force dawn to consider the target a sinatra application
131
+ -p, --padrino force dawn to consider the target a padrino application
132
+ -G, --gem-lock force dawn to scan only for vulnerabilities affecting dependencies in Gemfile.lock
133
+ -a, --ascii-tabular-report cause dawn to format findings using table in ascii art
134
+ -j, --json cause dawn to format findings using json
135
+ -C, --count-only dawn will only count vulnerabilities (useful for scripts)
136
+ -z, --exit-on-warn dawn will return number of found vulnerabilities as exit code
137
+ -F, --file filename tells dawn to write output to filename
138
+ -c, --config-file filename tells dawn to load configuration from filename
139
+
140
+ Disable security check family
141
+
142
+ --disable-cve-bulletins disable all CVE security checks
143
+ --disable-code-quality disable all code quality checks
144
+ --disable-code-style disable all code style checks
145
+ --disable-owasp-ror-cheatsheet disable all Owasp Ruby on Rails cheatsheet checks
146
+ --disable-owasp-top-10 disable all Owasp Top 10 checks
147
+
148
+ Flags useful to query Codesake::Dawn
149
+
150
+ -S, --search-knowledge-base [check_name] search check_name in the knowledge base
151
+ --list-knowledge-base list knowledge-base content
152
+ --list-known-families list security check families contained in dawn's knowledge base
153
+ --list-known-framework list ruby MVC frameworks supported by dawn
154
+
155
+ Service flags
156
+
157
+ -D, --debug enters dawn debug mode
158
+ -V, --verbose the output will be more verbose
159
+ -v, --version show version information
160
+ -h, --help show this help
161
+ ```
162
+
163
+ ### Rake task
164
+
165
+ To include Codesake::Dawn in your rake task list, you simply have to put this line in your ```Rakefile```
166
+
167
+ ```
168
+ require 'codesake/dawn/tasks'
169
+ ```
170
+
171
+ Then executing ```$ rake -T``` you will have a ```dawn:run``` task you want to execute.
172
+
173
+ ```
174
+ $ rake -T
175
+ ...
176
+ rake dawn:run # Execute codesake-dawn on the current directory
177
+ ...
178
+ ```
179
+
180
+ ### Interacting with the knowledge base
181
+
182
+ You can dump all security checks in the knowledge base this way
183
+
184
+ ```
185
+ $ dawn --list-knowledge-base
186
+ ```
187
+
188
+ Useful in scripts, you can use ```--search-knowledge-base``` or ```-S``` with
189
+ as parameter the check name you want to see if it's implemented as a security
190
+ control or not.
191
+
192
+ ```
193
+ $ dawn -S CVE-2013-6421
194
+ 07:59:30 [*] dawn v1.1.0 is starting up
195
+ CVE-2013-6421 found in knowledgebase.
196
+
197
+ $ dawn -S this_test_does_not_exist
198
+ 08:02:17 [*] dawn v1.1.0 is starting up
199
+ this_test_does_not_exist not found in knowledgebase
200
+ ```
201
+
202
+ ### Codesake::Dawn security scan in action
203
+
204
+ As output, Codesake::Dawn will put all security checks that are failed during the scan.
205
+
206
+ This the result of Codedake::Dawn running against a
207
+ [Sinatra 1.4.2 web application](https://github.com/thesp0nge/railsberry2013) wrote for a talk I
208
+ delivered in 2013 at [Railsberry conference](http://www.railsberry.com).
209
+
210
+ As you may see, Codesake::Dawn first detects MVC running the application by
211
+ looking at Gemfile.lock, than it discards all security checks not appliable to
212
+ Sinatra (49 security checks, in version 1.0, especially designed for Ruby on
213
+ Rails) and it applies them.
214
+
215
+ ```
216
+ $ dawn ~/src/hacking/railsberry2013
217
+ 18:40:27 [*] dawn v1.1.0 is starting up
218
+ 18:40:27 [$] dawn: scanning /Users/thesp0nge/src/hacking/railsberry2013
219
+ 18:40:27 [$] dawn: sinatra v1.4.2 detected
220
+ 18:40:27 [$] dawn: applying all security checks
221
+ 18:40:27 [$] dawn: 109 security checks applied - 0 security checks skipped
222
+ 18:40:27 [$] dawn: 1 vulnerabilities found
223
+ 18:40:27 [!] dawn: CVE-2013-1800 check failed
224
+ 18:40:27 [$] dawn: Severity: high
225
+ 18:40:27 [$] dawn: Priority: unknown
226
+ 18:40:27 [$] dawn: Description: 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.
227
+ 18:40:27 [$] dawn: Solution: Please use crack gem version 0.3.2 or above. Correct your gemfile
228
+ 18:40:27 [$] dawn: Evidence:
229
+ 18:40:27 [$] dawn: Vulnerable crack gem version found: 0.3.1
230
+ 18:40:27 [*] dawn is leaving
231
+ ```
232
+
233
+ ---
234
+
235
+ When you run Codesake::Dawn on a web application with up to date dependencies,
236
+ it's likely to return a friendly _no vulnerabilities found_ message. Keep it up
237
+ working that way!
238
+
239
+ This is Codesake::Dawn running against a Padrino web application I wrote for [a
240
+ scorecard quiz game about application security](http://scorecard.armoredcode.com).
241
+ Italian language only. Sorry.
242
+
243
+ ```
244
+ 18:42:39 [*] dawn v1.1.0 is starting up
245
+ 18:42:39 [$] dawn: scanning /Users/thesp0nge/src/CORE_PROJECTS/scorecard
246
+ 18:42:39 [$] dawn: padrino v0.11.2 detected
247
+ 18:42:39 [$] dawn: applying all security checks
248
+ 18:42:39 [$] dawn: 109 security checks applied - 0 security checks skipped
249
+ 18:42:39 [*] dawn: no vulnerabilities found.
250
+ 18:42:39 [*] dawn is leaving
251
+ ```
252
+
253
+ If you need a fancy HTML report about your scan, just ask it to Codesake::Dawn
254
+ with the ```--html``` flag used with the ```--file``` since I wanto to save the
255
+ HTML to disk.
256
+
257
+ ```
258
+ $ dawn /Users/thesp0nge/src/hacking/rt_first_app --html --file report.html
259
+
260
+ 09:00:54 [*] dawn v1.1.0 is starting up
261
+ 09:00:54 [*] dawn: report.html created (2952 bytes)
262
+ 09:00:54 [*] dawn is leaving
263
+ ```
264
+
265
+ ---
266
+
267
+ ## Useful links
268
+
269
+ Project homepage: [http://dawn.codesake.com](http://dawn.codesake.com)
270
+
271
+ Twitter profile: [@dawnscanner](https://twitter.com/dawnscanner)
272
+
273
+ Github repository: [https://github.com/codesake/codesake\-dawn](https://github.com/codesake/codesake-dawn)
274
+
275
+ The list of knowledge base content: [http://dawn.codesake.com/knowledge-base](http://dawn.codesake.com/knowledge-base)
276
+
277
+ Mailing list: [https://groups.google.com/forum/#!forum/codesake-dawn](https://groups.google.com/forum/#!forum/codesake-dawn)
278
+
279
+ ## Support us
280
+
281
+ Feedbacks are great and we really love to hear your voice.
282
+
283
+ If you're a proud codesake-dawn user, if you find it useful, if you integrated
284
+ it in your release process and if you want to openly support the project you
285
+ can put your reference here. Just open an
286
+ [issue](https://github.com/codesake-dawn/issues/new) with a statement saying
287
+ how do you feel the tool and your company logo if any.
288
+
289
+ More easily you can drop an email to [paolo@codesake.com](mailto:paolo@codesake.com) sending a
290
+ statement about your success story and I'll put on the
291
+ [website](http://dawn.codesake.com/success-stories).
292
+
293
+ Thank you.
294
+
295
+ ## Thanks to
296
+
297
+ [saten](https://github.com/saten): first issue posted about a typo in the README
298
+
299
+ [presidentbeef](https://github.com/presidentbeef): for his outstanding work that inspired me creating dawn and for double check comparison matrix. Issue #2 is yours :)
300
+
301
+ [marinerJB](https://github.com/marinerJB): for misc bug reports and further ideas
302
+
303
+ [Matteo](https://github.com/matteocollina): for ideas on API and their usage with [github.com](https://github.com) hooks
304
+
305
+ ## Contribute to Codesake::Dawn
306
+
307
+ Are you interested in contributing to Codesake::Dawn project? Great, here is
308
+ some very basic rules in order to make rocking pull requests.
309
+
310
+ First of all, I use the branching model described in [this
311
+ post](http://nvie.com/posts/a-successful-git-branching-model/). There are two
312
+ major branches:
313
+
314
+ * master: it contains in every moment the code for the latest codesake-dawn
315
+ released gem. You can't make branches from here unless you're working on a
316
+ bugfix.
317
+ * development: it contains the unstable code that is going to be the next
318
+ codesake-dawn realease. You start from here. Pick a task on the Roadmap.md
319
+ and create a separated branch to work on your feature to. When you're ready
320
+ (remember to include also spec files), submit your pull request. If the code
321
+ will be fine, it will be merged into the development tree ready to be include
322
+ in upcoming gem version.
323
+
324
+ No branch from master it would be analyzed unless they are related to bugfix.
325
+ In this case, the branch name must be something like _issue\_#xx\_description_
326
+
327
+ ## LICENSE
328
+
329
+ Copyright (c) 2013, 2014 Paolo Perego
330
+
331
+ MIT License
332
+
333
+ Permission is hereby granted, free of charge, to any person obtaining
334
+ a copy of this software and associated documentation files (the
335
+ "Software"), to deal in the Software without restriction, including
336
+ without limitation the rights to use, copy, modify, merge, publish,
337
+ distribute, sublicense, and/or sell copies of the Software, and to
338
+ permit persons to whom the Software is furnished to do so, subject to
339
+ the following conditions:
340
+
341
+ The above copyright notice and this permission notice shall be
342
+ included in all copies or substantial portions of the Software.
343
+
344
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
345
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
346
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
347
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
348
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
349
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
350
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
351
+
352
+
353
+
354
+