ruby.rails.security.audit.rails-check-render-dos-cve.rails-check-render-dos

Author
unknown
Download Count*
License
The render method in Rails versions 3.0.0 - 3.0.20, 3.1.0 - 3.1.12, and 3.2.0 - 3.2.16 are vulnerable to a denial of service attack (CVE-2014-0082), which could lead to service downtime. Upgrade to 3.2.17 or higher instead.
Run Locally
Run in CI
Defintion
rules:
- id: rails-check-render-dos
patterns:
- pattern-inside: |
class $CONTROLLER < $BIGCONTROLLER
...
end
- pattern: |
render :$TEXT
message: The render method in Rails versions 3.0.0 - 3.0.20, 3.1.0 - 3.1.12, and
3.2.0 - 3.2.16 are vulnerable to a denial of service attack
(CVE-2014-0082), which could lead to service downtime. Upgrade to 3.2.17
or higher instead.
languages:
- generic
severity: WARNING
metadata:
cwe:
- "CWE-20: Improper Input Validation"
owasp:
- A03:2021 - Injection
technology:
- rails
category: security
source-rule-url: https://github.com/presidentbeef/brakeman/blob/main/lib/brakeman/checks/check_render_dos.rb
references:
- https://groups.google.com/g/rubyonrails-security/c/LMxO_3_eCuc/m/ozGBEhKaJbIJ
- https://nvd.nist.gov/vuln/detail/CVE-2014-0082
cwe2022-top25: true
cwe2021-top25: true
subcategory:
- audit
likelihood: LOW
impact: LOW
confidence: LOW
license: Commons Clause License Condition v1.0[LGPL-2.1-only]
Examples
rails-check-render-dos-cve.rb
class Text < ApplicationController
# ruleid: rails-check-render-dos
render :hello
end
class Text < ApplicationController
# ok
send :hello
end
Short Link: https://sg.run/A5Yg