# CVE-2026-73648: rails-html-sanitizer: Possible XSS vulnerability with certain configurations

> Attackers can execute scripts or track users via SVG elements in Rails applications using non-default allowed tags.

- **Severity:** Medium 5.1 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 13 Aug 2026
- **Updated:** 13 Aug 2026
- **Also known as:** DEBIAN-CVE-2026-73648, GHSA-cj75-f6xr-r4g7, SUSE-SU-2026:4445-1, UBUNTU-CVE-2026-73648

## What is CVE-2026-73648?

CVE-2026-73648 is a medium-severity cross-site scripting vulnerability in rails-html-sanitizer, published on 13 Aug 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

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.

Weakness: CWE-79 (Improper Neutralization of Input During Web Page Generation)

## Which versions are affected by CVE-2026-73648?

2 open source packages ship an affected version, including rails-html-sanitizer.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `rails-html-sanitizer` | RubyGems | From 1.0.3 | 1.7.1 |
| `rails-html-sanitizer` | RubyGems | From 1.0.3 | 1.7.1 |
| `rubygem-rails-html-sanitizer` | SUSE:Linux Enterprise High Availability Extension 15 SP4 | All versions | 1.0.4-150000.4.9.1 |
| `rubygem-rails-html-sanitizer` | SUSE:Linux Enterprise High Availability Extension 15 SP5 | All versions | 1.0.4-150000.4.9.1 |
| `rubygem-rails-html-sanitizer` | SUSE:Linux Enterprise High Availability Extension 15 SP6 | All versions | 1.0.4-150000.4.9.1 |
| `rubygem-rails-html-sanitizer` | SUSE:Linux Enterprise High Availability Extension 15 SP7 | All versions | 1.0.4-150000.4.9.1 |

## How do I fix CVE-2026-73648?

Upgrade rails-html-sanitizer to 1.7.1 or later.

## Is CVE-2026-73648 being exploited?

There is no known exploitation of CVE-2026-73648 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-73648 and fix it if it is affected.

What it is: CVE-2026-73648 is a medium-severity cross-site scripting vulnerability in rails-html-sanitizer, published on 13 Aug 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-73648 in the wild and no public exploit code.

Affected packages and fixed versions:
- rails-html-sanitizer (RubyGems): affected from 1.0.3; fixed in 1.7.1
- rails-html-sanitizer (RubyGems): affected from 1.0.3; fixed in 1.7.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-73648/ (Markdown: https://insights.sbomify.com/CVE-2026-73648/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-73648
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-73648
- OSV: https://osv.dev/vulnerability/CVE-2026-73648

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-73648/
Summaries are generated and may contain mistakes; the official description above is the record.
