{"id":"CVE-2022-23518","state":"PUBLISHED","title":"Improper neutralization of data URIs allows XSS in rails-html-sanitizer","description":"rails-html-sanitizer is responsible for sanitizing HTML fragments in Rails applications. Versions >= 1.0.3, < 1.4.4 are vulnerable to cross-site scripting via data URIs when used in combination with Loofah >= 2.1.0. This issue is patched in version 1.4.4.","publishedAt":"2022-12-14T16:22:34.460Z","updatedAt":"2025-11-03T21:45:59.030Z","severity":{"score":6.1,"label":"Medium","version":"3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","source":"GitHub_M"},"assigner":"GitHub_M","products":["rails rails-html-sanitizer"],"affected":[{"vendor":"rails","product":"rails-html-sanitizer","versions":[{"version":">= 1.0.3, < 1.4.4","status":"affected"}]}],"references":["https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-mcvf-2q2m-x72m","https://github.com/rails/rails-html-sanitizer/issues/135","https://hackerone.com/reports/1694173","https://lists.debian.org/debian-lts-announce/2023/09/msg00012.html","https://lists.debian.org/debian-lts-announce/2024/09/msg00045.html"],"weaknesses":["CWE-79"],"ingestedAt":"2026-10-29T19:49:40.939Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/23xxx/CVE-2022-23518.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-23518","state":"PUBLISHED","datePublished":"2022-12-14T16:22:34.460Z","dateUpdated":"2025-11-03T21:45:59.030Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","requesterUserId":"c184a3d9-dc98-4c48-a45b-d2d88cf0ac74","dateReserved":"2022-01-19T21:23:53.779Z"},"containers":{"cna":{"title":"Improper neutralization of data URIs allows XSS in rails-html-sanitizer","descriptions":[{"lang":"en","value":"rails-html-sanitizer is responsible for sanitizing HTML fragments in Rails applications. Versions >= 1.0.3, < 1.4.4 are vulnerable to cross-site scripting via data URIs when used in combination with Loofah >= 2.1.0. This issue is patched in version 1.4.4."}],"affected":[{"vendor":"rails","product":"rails-html-sanitizer","versions":[{"version":">= 1.0.3, < 1.4.4","status":"affected"}]}],"references":[{"url":"https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-mcvf-2q2m-x72m","name":"https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-mcvf-2q2m-x72m","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/rails/rails-html-sanitizer/issues/135","name":"https://github.com/rails/rails-html-sanitizer/issues/135","tags":["x_refsource_MISC"]},{"url":"https://hackerone.com/reports/1694173","name":"https://hackerone.com/reports/1694173","tags":["x_refsource_MISC"]},{"url":"https://lists.debian.org/debian-lts-announce/2023/09/msg00012.html"}],"metrics":[{"cvssV3_0":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":6.1,"baseSeverity":"MEDIUM","confidentialityImpact":"LOW","integrityImpact":"LOW","privilegesRequired":"NONE","scope":"CHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","version":"3.0"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-79","lang":"en","description":"CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2023-09-13T16:06:20.153Z"},"source":{"advisory":"GHSA-mcvf-2q2m-x72m","discovery":"UNKNOWN"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-mcvf-2q2m-x72m","name":"https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-mcvf-2q2m-x72m","tags":["x_refsource_CONFIRM","x_transferred"]},{"url":"https://github.com/rails/rails-html-sanitizer/issues/135","name":"https://github.com/rails/rails-html-sanitizer/issues/135","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://hackerone.com/reports/1694173","name":"https://hackerone.com/reports/1694173","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://lists.debian.org/debian-lts-announce/2023/09/msg00012.html","tags":["x_transferred"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/09/msg00045.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T21:45:59.030Z"}}]}}}