{"api_version":"1","generated_at":"2026-07-23T19:17:38+00:00","cve":"CVE-2022-24722","urls":{"html":"https://cve.report/CVE-2022-24722","api":"https://cve.report/api/cve/CVE-2022-24722.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2022-24722","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2022-24722"},"summary":{"title":"CVE-2022-24722","description":"VIewComponent is a framework for building view components in Ruby on Rails. Versions prior to 2.31.2 and 2.49.1 contain a cross-site scripting vulnerability that has the potential to impact anyone using translations with the view_component gem. Data received via user input and passed as an interpolation argument to the `translate` method is not properly sanitized before display. Versions 2.31.2 and 2.49.1 have been released and fully mitigate the vulnerability. As a workaround, avoid passing user input to the `translate` function, or sanitize the inputs before passing them.","state":"PUBLIC","assigner":"security-advisories@github.com","published_at":"2022-03-02 23:15:00","updated_at":"2022-03-10 15:32:00"},"problem_types":["CWE-79"],"metrics":[],"references":[{"url":"https://github.com/github/view_component/releases/tag/v2.31.2","name":"https://github.com/github/view_component/releases/tag/v2.31.2","refsource":"MISC","tags":[],"title":"Release v2.31.2 · github/view_component · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/github/view_component/releases/tag/v2.49.1","name":"https://github.com/github/view_component/releases/tag/v2.49.1","refsource":"MISC","tags":[],"title":"Release v2.49.1 · github/view_component · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/github/view_component/commit/3f82a6e62578ff6f361aba24a1feb2caccf83ff9","name":"https://github.com/github/view_component/commit/3f82a6e62578ff6f361aba24a1feb2caccf83ff9","refsource":"MISC","tags":[],"title":"Fix XSS vulnerability when using HTML-safe translations and interpola… · github/view_component@3f82a6e · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/github/view_component/security/advisories/GHSA-cm9w-c4rj-r2cf","name":"https://github.com/github/view_component/security/advisories/GHSA-cm9w-c4rj-r2cf","refsource":"CONFIRM","tags":[],"title":"Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in view_component · Advisory · github/view_component · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-24722","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-24722","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2022","cve_id":"24722","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"github","cpe5":"viewcomponent","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"ruby_on_rails","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"CVE_data_meta":{"ASSIGNER":"security-advisories@github.com","ID":"CVE-2022-24722","STATE":"PUBLIC","TITLE":"Cross-site Scripting in view_component"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"view_component","version":{"version_data":[{"version_value":">= 2.31.0, < 2.31.2"},{"version_value":">= 2.32.0, < 2.49.1"}]}}]},"vendor_name":"github"}]}},"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","value":"VIewComponent is a framework for building view components in Ruby on Rails. Versions prior to 2.31.2 and 2.49.1 contain a cross-site scripting vulnerability that has the potential to impact anyone using translations with the view_component gem. Data received via user input and passed as an interpolation argument to the `translate` method is not properly sanitized before display. Versions 2.31.2 and 2.49.1 have been released and fully mitigate the vulnerability. As a workaround, avoid passing user input to the `translate` function, or sanitize the inputs before passing them."}]},"impact":{"cvss":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":8.1,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","version":"3.1"}},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')"}]}]},"references":{"reference_data":[{"name":"https://github.com/github/view_component/security/advisories/GHSA-cm9w-c4rj-r2cf","refsource":"CONFIRM","url":"https://github.com/github/view_component/security/advisories/GHSA-cm9w-c4rj-r2cf"},{"name":"https://github.com/github/view_component/commit/3f82a6e62578ff6f361aba24a1feb2caccf83ff9","refsource":"MISC","url":"https://github.com/github/view_component/commit/3f82a6e62578ff6f361aba24a1feb2caccf83ff9"},{"name":"https://github.com/github/view_component/releases/tag/v2.31.2","refsource":"MISC","url":"https://github.com/github/view_component/releases/tag/v2.31.2"},{"name":"https://github.com/github/view_component/releases/tag/v2.49.1","refsource":"MISC","url":"https://github.com/github/view_component/releases/tag/v2.49.1"}]},"source":{"advisory":"GHSA-cm9w-c4rj-r2cf","discovery":"UNKNOWN"}},"nvd":{"publishedDate":"2022-03-02 23:15:00","lastModifiedDate":"2022-03-10 15:32:00","problem_types":["CWE-79"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"CHANGED","confidentialityImpact":"LOW","integrityImpact":"LOW","availabilityImpact":"NONE","baseScore":6.1,"baseSeverity":"MEDIUM"},"exploitabilityScore":2.8,"impactScore":2.7},"baseMetricV2":{"cvssV2":{"version":"2.0","vectorString":"AV:N/AC:M/Au:N/C:N/I:P/A:N","accessVector":"NETWORK","accessComplexity":"MEDIUM","authentication":"NONE","confidentialityImpact":"NONE","integrityImpact":"PARTIAL","availabilityImpact":"NONE","baseScore":4.3},"severity":"MEDIUM","exploitabilityScore":8.6,"impactScore":2.9,"acInsufInfo":false,"obtainAllPrivilege":false,"obtainUserPrivilege":false,"obtainOtherPrivilege":false,"userInteractionRequired":true}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:github:viewcomponent:*:*:*:*:*:ruby_on_rails:*:*","versionStartIncluding":"2.32.0","versionEndExcluding":"2.49.1","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:github:viewcomponent:*:*:*:*:*:ruby_on_rails:*:*","versionStartIncluding":"2.31.0","versionEndExcluding":"2.31.2","cpe_name":[]}]}]}},"legacy_mitre":{"record":{"CveYear":"2022","CveId":"24722","Ordinal":"228215","Title":"CVE-2022-24722","CVE":"CVE-2022-24722","Year":"2022"},"notes":[{"CveYear":"2022","CveId":"24722","Ordinal":"1","NoteData":"** RESERVED ** This candidate has been reserved by an organization or individual that will use it when announcing a new security problem. When the candidate has been publicized, the details for this candidate will be provided.","Type":"Description","Title":null}]}}}