Sha256: 11cd01661e1951b4eabb592ed9820f4268d00ddeed2b846ebba8d0e6e7067bde

Contents?: true

Size: 952 Bytes

Versions: 25

Compression:

Stored size: 952 Bytes

Contents

require 'brakeman/checks/base_check'

class Brakeman::CheckSymbolDoSCVE < Brakeman::BaseCheck
  Brakeman::Checks.add self

  @description = "Checks for versions with ActiveRecord symbol denial of service vulnerability"

  def run_check
    fix_version = case
      when version_between?('2.0.0', '2.3.17')
        '2.3.18'
      when version_between?('3.1.0', '3.1.11')
        '3.1.12'
      when version_between?('3.2.0', '3.2.12')
        '3.2.13'
      else
        nil
      end

    if fix_version && active_record_models.any?
      warn :warning_type => "Denial of Service",
        :warning_code => :CVE_2013_1854,
        :message => "Rails #{rails_version} has a denial of service vulnerability in ActiveRecord: upgrade to #{fix_version} or patch",
        :confidence => :medium,
        :gem_info => gemfile_or_environment,
        :link => "https://groups.google.com/d/msg/rubyonrails-security/jgJ4cjjS8FE/BGbHRxnDRTIJ"
    end
  end
end

Version data entries

25 entries across 25 versions & 3 rubygems

Version Path
brakeman-4.3.1 lib/brakeman/checks/check_symbol_dos_cve.rb
brakeman-lib-4.3.1 lib/brakeman/checks/check_symbol_dos_cve.rb
brakeman-min-4.3.1 lib/brakeman/checks/check_symbol_dos_cve.rb
brakeman-4.3.0 lib/brakeman/checks/check_symbol_dos_cve.rb
brakeman-min-4.3.0 lib/brakeman/checks/check_symbol_dos_cve.rb
brakeman-lib-4.3.0 lib/brakeman/checks/check_symbol_dos_cve.rb
brakeman-4.2.1 lib/brakeman/checks/check_symbol_dos_cve.rb
brakeman-min-4.2.1 lib/brakeman/checks/check_symbol_dos_cve.rb
brakeman-lib-4.2.1 lib/brakeman/checks/check_symbol_dos_cve.rb
brakeman-4.2.0 lib/brakeman/checks/check_symbol_dos_cve.rb
brakeman-lib-4.2.0 lib/brakeman/checks/check_symbol_dos_cve.rb
brakeman-min-4.2.0 lib/brakeman/checks/check_symbol_dos_cve.rb
brakeman-4.1.1 lib/brakeman/checks/check_symbol_dos_cve.rb
brakeman-lib-4.1.1 lib/brakeman/checks/check_symbol_dos_cve.rb
brakeman-min-4.1.1 lib/brakeman/checks/check_symbol_dos_cve.rb
brakeman-4.1.0 lib/brakeman/checks/check_symbol_dos_cve.rb
brakeman-lib-4.1.0 lib/brakeman/checks/check_symbol_dos_cve.rb
brakeman-min-4.1.0 lib/brakeman/checks/check_symbol_dos_cve.rb
brakeman-4.0.1 lib/brakeman/checks/check_symbol_dos_cve.rb
brakeman-min-4.0.1 lib/brakeman/checks/check_symbol_dos_cve.rb