6.1medium
XSS Vulnerability in Action View tag helpers
- Severity
- 6.1medium CVSS:3.1 by NVD
- Exploit likelihood
- 1.66% (higher than 77% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- hackerone
- Also known as
- GHSA-ch3h-j2vf-95pv
Description
A XSS Vulnerability in Action View tag helpers >= 5.2.0 and < 5.2.0 which would allow an attacker to inject content if able to control input into specific attributes.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| https://github.com/rails/rails | 7.0.2.4, 6.1.5.1, 6.0.4.8, 5.2.7.1 | CVE List |
| actionview (RubyGems) | before 5.2.7.1, from 6.0.0 before 6.0.4.8, from 6.1.0 before 6.1.5.1, from 7.0.0 before 7.0.2.4 | GitHub Advisory Database |
| rubyonrails actionpack | before 5.2.7.1, from 6.0.0 before 6.0.4.8, from 6.1.0 before 6.1.5.1, from 7.0.0 before 7.0.2.4 | NVD |
| debian debian_linux | 10.0 | NVD |
All scores
| GitHub | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | 4.3medium CVSS:2.0 | AV:N/AC:M/Au:N/C:N/I:P/A:N |
Classification
What each source says
CVE List
A XSS Vulnerability in Action View tag helpers >= 5.2.0 and < 5.2.0 which would allow an attacker to inject content if able to control input into specific attributes.
GitHub Advisory Database
There is a possible XSS vulnerability in Action View tag helpers. Passing untrusted input as hash keys can lead to a possible XSS vulnerability. This vulnerability has been assigned the CVE identifier CVE-2022-27777.
Versions Affected: ALL Not affected: NONE Fixed Versions: 7.0.2.4, 6.1.5.1, 6.0.4.8, 5.2.7.1
Impact
If untrusted data is passed as the hash key for tag attributes, there is a possibility that the untrusted data may not be properly escaped which can lead to an XSS vulnerability.
Impacted code will look something like this:
check_box_tag('thename', 'thevalue', false, aria: { malicious_input => 'thevalueofaria' })
Where the "malicious_input" variable contains untrusted data.
All users running an affected release should either upgrade or use one of the workarounds immediately.
Releases
The FIXED releases are available at the normal locations.
Workarounds
Escape the untrusted data before using it as a key for tag helper methods.
NVD (es)
Una vulnerabilidad de tipo XSS en Action View tag helpers versiones posteriores a 5.2.0 incluyéndola y versiones anteriores a 5.2.0, que permitiría a un atacante inyectar contenido si es capaz de controlar la entrada en atributos específicos
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-27777 changed 2024-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-ch3h-j2vf-95pv changed 2024-02-16 | CC-BY-4.0 |
| NVD | CVE-2022-27777 changed 2026-06-17 | Public domain |