CVE-2020-11082: Kaminari Cross-Site Scripting Vulnerability
MODERATECVE-2020-11082 is a MODERATE (CVSS 6.4) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Kaminari libraries in the RubyGems ecosystem. The issue involves cross-site scripting in kaminari. Remediation is available by upgrading affected packages to version 1.2.1.
CVE-2020-11082 at a Glance
Security Impact
CVSS: 6.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:L/A:L).
How to Fix CVE-2020-11082
To remediate this vulnerability, upgrade all affected Kaminari dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade kaminari to 1.2.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for kaminari
How to Check if You Are Affected
To determine whether your application is affected by CVE-2020-11082, inspect your project dependencies for Kaminari:
inspect dependencies for kaminari
Analyze the terminal output to locate any version of Kaminari in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Kaminari, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2020-11082 Affected Kaminari Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
kaminari
|
RubyGems |
< 1.2.1
|
1.2.1
|
References
Frequently Asked Questions
What is CVE-2020-11082?
Which Kaminari versions are affected?
What version fixes CVE-2020-11082?
Is kaminari affected?
What is the CVSS score of CVE-2020-11082?
What CWE is associated with CVE-2020-11082?
How can I check RubyGems dependencies for CVE-2020-11082?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-r5jw-62xg-j433",
"modified" : "2021-09-23T13:55:11Z",
"published" : "2020-05-28T21:10:11Z",
"aliases" : [ "CVE-2020-11082" ],
"summary" : "Cross-Site Scripting in Kaminari",
"details" : "### Impact\nIn Kaminari before 1.2.1, there is a vulnerability that would allow an attacker to inject arbitrary code into pages with pagination links. This has been fixed in 1.2.1.\n\n### Releases\nThe 1.2.1 gem including the patch has already been released.\nAll past released versions are affected by this vulnerability.\n\n### Workarounds\nApplication developers who can't update the gem can workaround by overriding the `PARAM_KEY_EXCEPT_LIST` constant.\n\n```ruby\nmodule Kaminari::Helpers\n PARAM_KEY_EXCEPT_LIST = [:authenticity_token, :commit, :utf8, :_method, :script_name, :original_script_name].freeze\nend\n```\n\n### Credits\nThanks to Daniel Mircea for finding the issue and sending a patch via GitHub. Also thanks to Aditya Prakash for reporting the vulnerability.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "kaminari"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.2.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/kaminari/kaminari/security/advisories/GHSA-r5jw-62xg-j433"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-11082"
}, {
"type" : "WEB",
"url" : "https://github.com/github/advisory-review/pull/1020"
}, {
"type" : "WEB",
"url" : "https://github.com/kaminari/kaminari/commit/8dd52a1aed3d2fa2835d836de23fc0d8c4ff5db8"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/kaminari/kaminari"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/kaminari/CVE-2020-11082.yml"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2021/09/msg00011.html"
}, {
"type" : "WEB",
"url" : "https://www.debian.org/security/2021/dsa-5005"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-05-28T21:05:32Z",
"nvd_published_at" : "2020-05-28T21:15:00Z"
}
}