Skip to content
Heist/ feed
Back to feed
Medium

rails-html-sanitizer: Possible XSS vulnerability with certain configurations

Type: advisorySources: OSV

rails-html-sanitizer is responsible for sanitizing HTML fragments in Rails applications. From 1.0.3 until 1.7.1, Rails::HTML::PermitScrubber restricted SVG reference elements in SVG_ALLOW_LOCAL_HREF only when they used xlink:href, even though browsers also accept the plain href attribute. Applications with non-default allowed tags that included SVG use or feImage elements could therefore permit external references; a same-origin external SVG referenced by use could execute scripts in the sanitized document's context, while feImage could load external images for tracking. Applications using the default allowed tags are not affected. This issue is fixed in version 1.7.1.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-73648
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 08:31 UTC · Revision 1

Source evidence

rails-html-sanitizer: Possible XSS vulnerability with certain configurations

core-osv · Original source

Published 13 Aug 2026, 18:00 UTC

rails-html-sanitizer is responsible for sanitizing HTML fragments in Rails applications. From 1.0.3 until 1.7.1, Rails::HTML::PermitScrubber restricted SVG reference elements in SVG_ALLOW_LOCAL_HREF only when they used xlink:href, even though browsers also accept the plain href attribute. Applications with non-default allowed tags that included SVG use or feImage elements could therefore permit external references; a same-origin external SVG referenced by use could execute scripts in the sanitized document's context, while feImage could load external images for tracking. Applications using the default allowed tags are not affected. This issue is fixed in version 1.7.1.

osv:CVE-2026-73648
Complete source record
{
  "id": "1d8c6498a70d6e7e1ac5ce3904f4b6ca2d559f3fa407bc82f96aa44bc6beffc0",
  "url": "https://osv.dev/vulnerability/CVE-2026-73648",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "rails-html-sanitizer: Possible XSS vulnerability with certain configurations",
    "summary": "rails-html-sanitizer is responsible for sanitizing HTML fragments in Rails applications. From 1.0.3 until 1.7.1, Rails::HTML::PermitScrubber restricted SVG reference elements in SVG_ALLOW_LOCAL_HREF only when they used xlink:href, even though browsers also accept the plain href attribute. Applications with non-default allowed tags that included SVG use or feImage elements could therefore permit external references; a same-origin external SVG referenced by use could execute scripts in the sanitized document's context, while feImage could load external images for tracking. Applications using the default allowed tags are not affected. This issue is fixed in version 1.7.1.",
    "evidence": "osv:CVE-2026-73648",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2026-73648",
      "aliases": [
        "CVE-2026-73648",
        "GHSA-cj75-f6xr-r4g7"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/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": "5c4354db7524b1df891df0a3e29877ce9f7575ca"
                },
                {
                  "fixed": "4f37e3d9e620c627198487739d73d325c2124d18"
                },
                {
                  "fixed": "74dcb8053e6da9921246ce71b06ad9fd65b19586"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "1.0.3"
                      },
                      {
                        "fixed": "1.7.1"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "74dcb8053e6da9921246ce71b06ad9fd65b19586"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "4f37e3d9e620c627198487739d73d325c2124d18"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v1.7.1"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v1.7.0",
            "v1.6.1",
            "v1.6.0",
            "v1.6.0.rc2",
            "v1.6.0.rc1",
            "v1.5.0",
            "v1.4.2",
            "v1.4.1",
            "v1.4.0",
            "v1.3.0",
            "v1.2.0",
            "v1.1.0",
            "v1.0.4",
            "v1.0.3"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-73648.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:33.824667749Z",
      "provider": "osv",
      "references": [
        "https://github.com/rails/rails-html-sanitizer/releases/tag/v1.7.1",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/73xxx/CVE-2026-73648.json",
        "https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-cj75-f6xr-r4g7",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-73648",
        "https://github.com/rails/rails-html-sanitizer/commit/74dcb8053e6da9921246ce71b06ad9fd65b19586",
        "https://github.com/rails/rails-html-sanitizer/pull/223"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-79"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/73xxx/CVE-2026-73648.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-73648",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 501146,
  "published_at": "2026-08-13T18:00:21.583+00:00"
}