{"id":"CVE-2022-27777","aliases":["CVE-2022-27777","GHSA-ch3h-j2vf-95pv"],"related":[],"kind":"vulnerability","state":"published","title":"XSS Vulnerability in Action View tag helpers","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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.\n\nVersions Affected:  ALL\nNot affected:       NONE\nFixed Versions:     7.0.2.4, 6.1.5.1, 6.0.4.8, 5.2.7.1\n\n## Impact\n\nIf 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.\n\nImpacted code will look something like this:\n\n```\ncheck_box_tag('thename', 'thevalue', false, aria: { malicious_input => 'thevalueofaria' })\n```\n\nWhere the \"malicious_input\" variable contains untrusted data.\n\nAll users running an affected release should either upgrade or use one of the workarounds immediately.\n\n## Releases\n\nThe FIXED releases are available at the normal locations.\n\n## Workarounds\n\nEscape the untrusted data before using it as a key for tag helper methods.","format":"markdown","source":"ghsa"},{"lang":"es","text":"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","source":"nvd"}],"published":"2022-04-27T22:32:49.000Z","modified":"2026-06-17T04:37:29.363Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"7.0.2.4, 6.1.5.1, 6.0.4.8, 5.2.7.1","status":"affected"}],"product":"https://github.com/rails/rails","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"5.2.7.1"}],"ecosystem":"RubyGems","package":"actionview","purl":"pkg:gem/actionview","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.0.0","status":"affected","fixed":"6.0.4.8"}],"ecosystem":"RubyGems","package":"actionview","purl":"pkg:gem/actionview","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.1.0","status":"affected","fixed":"6.1.5.1"}],"ecosystem":"RubyGems","package":"actionview","purl":"pkg:gem/actionview","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"7.0.0","status":"affected","fixed":"7.0.2.4"}],"ecosystem":"RubyGems","package":"actionview","purl":"pkg:gem/actionview","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"5.2.7.1"},{"status":"affected","introduced":"6.0.0","fixed":"6.0.4.8"},{"status":"affected","introduced":"6.1.0","fixed":"6.1.5.1"},{"status":"affected","introduced":"7.0.0","fixed":"7.0.2.4"}],"vendor":"rubyonrails","product":"actionpack","cpe":"cpe:2.3:a:rubyonrails:actionpack:*:*:*:*:*:ruby:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"10.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://discuss.rubyonrails.org/t/cve-2022-27777-possible-xss-vulnerability-in-action-view-tag-helpers/80534","tags":["exploit","patch","vendor-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2022/09/msg00002.html","tags":["mailing-list","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.debian.org/security/2023/dsa-5372","tags":["vendor-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-27777","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/rails/rails/commit/649516ce0feb699ae06a8c5e81df75d460cc9a85","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/rails/rails","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionview/CVE-2022-27777.yml","tags":["web"],"sources":["ghsa"]},{"url":"https://groups.google.com/g/ruby-security-ann/c/9wJPEDv-iRw","tags":["web"],"sources":["ghsa"]},{"url":"https://rubyonrails.org/2022/4/26/Rails-7-0-2-4-6-1-5-1-6-0-4-8-and-5-2-7-1-have-been-released","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"hackerone","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-27777","url":"https://www.cve.org/CVERecord?id=CVE-2022-27777","licence":"CVE Terms of Use","modified":"2024-08-03T05:32:59.808Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-ch3h-j2vf-95pv","url":"https://github.com/advisories/GHSA-ch3h-j2vf-95pv","licence":"CC-BY-4.0","modified":"2024-02-16T08:19:34.160Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-27777","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-27777","licence":"Public domain","modified":"2026-06-17T04:37:29.363Z"}],"updatedAt":"2026-11-25T22:58:11.962Z","epss":{"score":0.01657,"percentile":0.77329,"date":"2026-12-01T12:00:22.000Z"}}