Possible XSS vulnerability with certain configurations of rails-html-sanitizer 1.6.0
rails-html-sanitizer is responsible for sanitizing HTML fragments in Rails applications. There is a possible XSS vulnerability with certain configurations of Rails::HTML::Sanitizer 1.6.0 when used with Rails >= 7.1.0. A possible XSS vulnerability with certain configurations of Rails::HTML::Sanitizer may allow an attacker to inject content if HTML5 sanitization is enabled and the application developer has overridden the sanitizer's allowed tags for the the "noscript" element. This vulnerability is fixed in 1.6.1.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2024-53989
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 08:24 UTC · Revision 1
Source evidence
Possible XSS vulnerability with certain configurations of rails-html-sanitizer 1.6.0
core-osv · Original sourcePublished 2 Dec 2024, 21:07 UTC
rails-html-sanitizer is responsible for sanitizing HTML fragments in Rails applications. There is a possible XSS vulnerability with certain configurations of Rails::HTML::Sanitizer 1.6.0 when used with Rails >= 7.1.0. A possible XSS vulnerability with certain configurations of Rails::HTML::Sanitizer may allow an attacker to inject content if HTML5 sanitization is enabled and the application developer has overridden the sanitizer's allowed tags for the the "noscript" element. This vulnerability is fixed in 1.6.1.
osv:CVE-2024-53989
Complete source record
{
"id": "a174113a48bbfac25f1888006f7365ce0947e48da4bb2cccdef9d3a10412fddd",
"url": "https://osv.dev/vulnerability/CVE-2024-53989",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Possible XSS vulnerability with certain configurations of rails-html-sanitizer 1.6.0",
"summary": "rails-html-sanitizer is responsible for sanitizing HTML fragments in Rails applications. There is a possible XSS vulnerability with certain configurations of Rails::HTML::Sanitizer 1.6.0 when used with Rails >= 7.1.0. A possible XSS vulnerability with certain configurations of Rails::HTML::Sanitizer may allow an attacker to inject content if HTML5 sanitization is enabled and the application developer has overridden the sanitizer's allowed tags for the the \"noscript\" element. This vulnerability is fixed in 1.6.1.",
"evidence": "osv:CVE-2024-53989",
"products": [],
"severity": "low",
"structured": {
"id": "CVE-2024-53989",
"aliases": [
"CVE-2024-53989",
"GHSA-rxv5-gxqc-xx8g"
],
"metrics": [
{
"type": "CVSS_V4",
"score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/rails/rails-html-sanitizer",
"type": "GIT",
"events": [
{
"introduced": "19fd6cd66f31316642e758bf01a410f3fd128f42"
},
{
"fixed": "5e96b19bbb934284e675109851bd82429622bb6e"
},
{
"fixed": "16251735e36ebdc302e2f90f2a39cad56879414f"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "1.6.0"
},
{
"fixed": "1.6.1"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"fixed": "16251735e36ebdc302e2f90f2a39cad56879414f"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"1.6.0",
"v1.6.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-53989.json"
}
}
],
"modified": "2026-10-28T02:30:27.092108235Z",
"provider": "osv",
"references": [
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/53xxx/CVE-2024-53989.json",
"https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-rxv5-gxqc-xx8g",
"https://nvd.nist.gov/vuln/detail/CVE-2024-53989",
"https://github.com/rails/rails-html-sanitizer/commit/16251735e36ebdc302e2f90f2a39cad56879414f"
],
"provider_metadata": {
"cwe_ids": [
"CWE-79"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/53xxx/CVE-2024-53989.json"
}
},
"related_cves": [
{
"value": "CVE-2024-53989",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 493789,
"published_at": "2024-12-02T21:07:04.296+00:00"
}