Rails 5.0 Vulnerabilities
In order to calculate Rails 5.0 vulnerabilities we created an application using
the latest patch version of Rails 5.0 and we ran bundler-audit
to find all known vulnerabilities.
In order to calculate Rails 5.0 vulnerabilities we created an application using
the latest patch version of Rails 5.0 and we ran bundler-audit
to find all known vulnerabilities.
Here we list the security risks related to a sample Rails 5.0 application.
There is a possible XSS vulnerability in ActionView's JavaScript literal escape helpers. Views that use the j or escape_javascript methods may be susceptible to XSS attacks.
Versions Affected: All. Not affected: None. Fixed Versions: 6.0.2.2, 5.2.4.2
There is a possible XSS vulnerability in the j and escape_javascript methods in ActionView. These methods are used for escaping JavaScript string literals. Impacted code will look something like this:
<script>let a = `<%= j unknown_input %>`</script>
or
<script>let a = `<%= escape_javascript unknown_input %>`</script>
The 6.0.2.2 and 5.2.4.2 releases are available at the normal locations.
For those that can't upgrade, the following monkey patch may be used:
ActionView::Helpers::JavaScriptHelper::JS_ESCAPE_MAP.merge!(
{
"`" => "\\`",
"$" => "\\$"
}
)
module ActionView::Helpers::JavaScriptHelper
alias :old_ej :escape_javascript
alias :old_j :j
def escape_javascript(javascript)
javascript = javascript.to_s
if javascript.empty?
result = ""
else
result = javascript.gsub(/(\\|<\/|\r\n|\342\200\250|\342\200\251|[\n\r"']|[`]|[$])/u, JS_ESCAPE_MAP)
end
javascript.html_safe? ? result.html_safe : result
end
alias :j :escape_javascript
end
Reported by bundler-audit. Criticality: High.
Solution: update to ~> 5.2.4, >= 5.2.4.3, >= 6.0.3.1.
For full impact, workarounds, and patches, see the linked advisory.
Reported by bundler-audit. Criticality: Medium.
Solution: update to ~> 5.2.4, >= 5.2.4.3, >= 6.0.3.1.
For full impact, workarounds, and patches, see the linked advisory.
Reported by bundler-audit. Criticality: Medium.
Solution: update to ~> 5.2.4, >= 5.2.4.3, >= 6.0.3.1.
For full impact, workarounds, and patches, see the linked advisory.
Reported by bundler-audit. Criticality: Critical.
Solution: update to ~> 5.2.4, >= 5.2.4.3, >= 6.0.3.1.
For full impact, workarounds, and patches, see the linked advisory.
Reported by bundler-audit. Criticality: Medium.
Solution: update to ~> 5.2.4, >= 5.2.4.4, >= 6.0.3.3.
For full impact, workarounds, and patches, see the linked advisory.
Reported by bundler-audit. Criticality: Medium.
Solution: update to ~> 5.2.4, >= 5.2.4.5, ~> 6.0.3, >= 6.0.3.5, >= 6.1.2.1.
For full impact, workarounds, and patches, see the linked advisory.
Reported by bundler-audit. Criticality: High.
Solution: update to ~> 5.2.4.6, ~> 5.2.6, ~> 6.0.3, >= 6.0.3.7, >= 6.1.3.2.
For full impact, workarounds, and patches, see the linked advisory.
Reported by bundler-audit. Criticality: High.
Solution: update to ~> 5.2.4.6, ~> 5.2.6, ~> 6.0.3, >= 6.0.3.7, >= 6.1.3.2.
For full impact, workarounds, and patches, see the linked advisory.
Reported by bundler-audit. Criticality: High.
Solution: update to ~> 5.2.6, >= 5.2.6.2, ~> 6.0.4, >= 6.0.4.6, ~> 6.1.4, >= 6.1.4.6, >= 7.0.2.2.
For full impact, workarounds, and patches, see the linked advisory.
Reported by bundler-audit. Criticality: Medium.
Solution: update to ~> 5.2.7, >= 5.2.7.1, ~> 6.0.4, >= 6.0.4.8, ~> 6.1.5, >= 6.1.5.1, >= 7.0.2.4.
For full impact, workarounds, and patches, see the linked advisory.
Reported by bundler-audit. Criticality: Critical.
Solution: update to ~> 5.2.8, >= 5.2.8.1, ~> 6.0.5, >= 6.0.5.1, ~> 6.1.6, >= 6.1.6.1, >= 7.0.3.1.
For full impact, workarounds, and patches, see the linked advisory.
Reported by bundler-audit. Criticality: Unknown.
Solution: update to ~> 5.2.8, ~> 6.1.7, >= 6.1.7.1, >= 7.0.4.1.
For full impact, workarounds, and patches, see the linked advisory.
Reported by bundler-audit. Criticality: Unknown.
Solution: update to ~> 5.2.8, ~> 6.1.7, >= 6.1.7.1, >= 7.0.4.1.
For full impact, workarounds, and patches, see the linked advisory.
Reported by bundler-audit. Criticality: High.
Solution: update to ~> 5.2.8, ~> 6.1.7, >= 6.1.7.1, >= 7.0.4.1.
For full impact, workarounds, and patches, see the linked advisory.
Reported by bundler-audit. Criticality: Unknown.
Solution: update to ~> 5.2.8, ~> 6.1.7, >= 6.1.7.1, >= 7.0.4.1.
For full impact, workarounds, and patches, see the linked advisory.
Reported by bundler-audit. Criticality: Medium.
Solution: update to ~> 6.1.7, >= 6.1.7.3, >= 7.0.4.3.
For full impact, workarounds, and patches, see the linked advisory.
Reported by bundler-audit. Criticality: Medium.
Solution: update to ~> 6.1.7.4, >= 7.0.5.1.
For full impact, workarounds, and patches, see the linked advisory.
Reported by bundler-audit. Criticality: Unknown.
Solution: update to ~> 6.1.7.9, ~> 7.0.8, >= 7.0.8.5, ~> 7.1.4, >= 7.1.4.1, >= 7.2.1.1.
For full impact, workarounds, and patches, see the linked advisory.
Reported by bundler-audit. Criticality: Unknown.
Solution: update to ~> 6.1.7.9, ~> 7.0.8, >= 7.0.8.5, ~> 7.1.4, >= 7.1.4.1, >= 7.2.1.1.
For full impact, workarounds, and patches, see the linked advisory.
Reported by bundler-audit. Criticality: Unknown.
Solution: update to ~> 6.1.7.9, ~> 7.0.8, >= 7.0.8.5, ~> 7.1.4, >= 7.1.4.1, >= 7.2.1.1.
For full impact, workarounds, and patches, see the linked advisory.
Reported by bundler-audit. Criticality: Unknown.
Solution: update to ~> 7.1.5, >= 7.1.5.2, ~> 7.2.2, >= 7.2.2.2, >= 8.0.2.1.
For full impact, workarounds, and patches, see the linked advisory.
Reported by bundler-audit. Criticality: Unknown.
Solution: update to ~> 7.2.3, >= 7.2.3.1, ~> 8.0.4, >= 8.0.4.1, >= 8.1.2.1.
For full impact, workarounds, and patches, see the linked advisory.
Reported by bundler-audit. Criticality: Unknown.
Solution: update to ~> 7.2.3, >= 7.2.3.1, ~> 8.0.4, >= 8.0.4.1, >= 8.1.2.1.
For full impact, workarounds, and patches, see the linked advisory.
Reported by bundler-audit. Criticality: Unknown.
Solution: update to ~> 7.2.3, >= 7.2.3.1, ~> 8.0.4, >= 8.0.4.1, >= 8.1.2.1.
For full impact, workarounds, and patches, see the linked advisory.
Reported by bundler-audit. Criticality: Unknown.
Solution: update to ~> 7.2.3, >= 7.2.3.1, ~> 8.0.4, >= 8.0.4.1, >= 8.1.2.1.
For full impact, workarounds, and patches, see the linked advisory.