Exploited now
Vulnerability WatchVulnerabilities, exploits & advisories — updated every 15 minutes
Alerts

Home › CVE › Ruby

CVE-2026-126079 — rails

Medium · CVSS 6.1EPSS 0.3% First seen November 10, 2026

One of 9 rails vulnerabilities published together by NVD: our article covers all of them.

RubyWebVulnerabilities

Analysis

Rails Action View XSS flaw (CVE-2026-126079) affects highlight and simple_format with HTML5 sanitizer

CVE-2026-126079 is a medium-severity (CVSS 6.1) cross-site scripting issue in Rails Action View. It affects applications using the HTML5 sanitizer that pass untrusted text to the highlight or simple_format helpers, and it is fixed in Rails 8.1.4.1 and 8.0.5.2.

Key points

  • Rails Action View XSS flaw rated MEDIUM (CVSS 6.1)
  • Affects apps using the HTML5 sanitizer, which is the default for load_defaults 7.1 or later on CRuby
  • Triggered through highlight or simple_format when untrusted text is involved
  • Fixed in Rails 8.1.4.1 and 8.0.5.2; Nokogiri 1.19.5 is also required
  • Exploitation status and workarounds have not been published in the sources

CVE-2026-126079 is a cross-site scripting (XSS) vulnerability in Action View, the Rails component that handles view templates and HTML helpers. It is rated MEDIUM with a CVSS score of 6.1.

What's affected

The flaw affects Rails versions before 8.1.4.1 and 8.0.5.2. The problem only arises when the HTML5 sanitizer is in use. The NVD entry says this sanitizer is the default on CRuby for applications using load_defaults 7.1 or later. The underlying cause is in Nokogiri before 1.19.5, which serializes unescaped content inside attribute values.

The risk applies to applications that pass untrusted text to the highlight helper, or to simple_format with html_options. The highlight helper splits sanitized HTML on tag boundaries to insert matches, and simple_format splits it into paragraphs on blank lines. A stray > or blank line inside an attribute value can cause markup that the sanitizer had rendered inert to be emitted as live elements in the html_safe output.

How serious is it

The NVD describes the impact as possible XSS. Because the output is marked html_safe, Rails will not escape it again, so the injected elements reach the browser. The sources do not describe the attack conditions in more detail, and they do not say whether the flaw is being exploited in the wild or whether public proof-of-concept code exists. Those details have not been published in the material available here.

What to do

Upgrade Rails to 8.1.4.1 or 8.0.5.2, depending on your release line. Also update Nokogiri to 1.19.5 or later, since the affected serialization sits in that dependency. The sources do not list other versions or workarounds, so do not assume that older branches are safe. Review every call to highlight and simple_format that receives user-supplied input, and check any use of html_options. Until you have patched, consider escaping or validating untrusted text before it reaches these helpers, and watch for unexpected markup in rendered pages.

Recommended actions

  1. Upgrade Rails to 8.1.4.1 or 8.0.5.2 according to your release branch.
  2. Update Nokogiri to 1.19.5 or later.
  3. Find all uses of highlight and simple_format that receive user-supplied text, and check html_options usage.
  4. Until patched, validate or escape untrusted input before passing it to these helpers.
  5. Monitor vendor advisories for exploitation details and any additional fixed versions.

Written with AI assistance from the sources listed on this page; check the vendor advisory before acting.

Summary

Action View is a framework for handling view template lookup and rendering and provides view helpers for building HTML. Prior to 8.1.4.1 and 8.0.5.2, with the HTML5 sanitizer (Rails::HTML5::Sanitizer, the default vendor on CRuby for applications using load_defaults 7.1 or later), Nokogiri before 1.19.5 serializes unescaped inside attribute values. The Action View text helpers highlight and simple_format sanitize their input and then process the resulting HTML as a string: highlight splits it on tag boundaries to insert matches, and simple_format splits it into paragraphs on blank lines. An unescaped > or a blank line inside an attribute value could cause markup in that value, which the sanitizer left inert, to be emitted as live elements in the helper's html_safe output, possibly leading to XSS. Applications that use the HTML5 sanitizer and pass untrusted text to highlight, or to simple_format with html_options, are affected. This issue is fixed in versions 8.1.4.1 and 8.0.5.2.

Description: NIST National Vulnerability Database (public domain)

Severity breakdown

Medium · 6.1 CVSS 3.1 base score from the CNA (github.com)

An attacker without an account can exploit this over the network if a user is tricked into an action.

Attack from
the network (remotely)
Attack complexity
low (no special conditions)
Login needed
no
User action needed
yes, someone must click, open or visit something
Scope
reaches beyond the vulnerable component (e.g. from a sandbox or VM to the host)
Impact
low on confidentiality and integrity, none on availability

Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Affected and fixed versions

ProductAffected versionsFixed in
actionview (RubyGems)≥ 8.1.0.beta1, < 8.1.4.18.1.4.1
< 8.0.5.28.0.5.2
rails< 8.0.5.2, >= 8.1, < 8.1.4.1—

From the GitHub Advisory Database and the vendor's CVE record; confirm with the vendor advisory before relying on a version number.

References by type

Vendor advisories

Patches and fixed releases

Other references

Details from NVD (public domain), the GitHub Advisory Database (CC BY 4.0).

Affected

  • rails

What to do

  • Follow the vendor advisory and the references below for fixed versions and workarounds.

Frequently asked questions

What is CVE-2026-126079?

CVE-2026-126079 is a medium-severity (CVSS 6.1) cross-site scripting issue in Rails Action View. It affects applications using the HTML5 sanitizer that pass untrusted text to the highlight or simpleformat helpers, and it is fixed in Rails 8.1.4.1 and 8.0.5.2. Weakness type: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (CWE-79).

How severe is CVE-2026-126079?

CVE-2026-126079 has a CVSS 3.1 base score of 6.1 (medium), from the CNA (github.com). An attacker without an account can exploit this over the network if a user is tricked into an action.

Is CVE-2026-126079 being exploited?

Not as far as is known: CVE-2026-126079 is not in CISA's Known Exploited Vulnerabilities catalog as of November 28, 2026. EPSS estimates a 0.3% chance that it is exploited in the next 30 days.

Which versions are affected by CVE-2026-126079?

actionview (RubyGems) ≥ 8.1.0.beta1, < 8.1.4.1 (fixed in 8.1.4.1); actionview (RubyGems) < 8.0.5.2 (fixed in 8.0.5.2); rails < 8.0.5.2, >= 8.1, < 8.1.4.1.

How do I fix CVE-2026-126079?

Upgrade Rails to 8.1.4.1 or 8.0.5.2 according to your release branch. Update Nokogiri to 1.19.5 or later. Find all uses of highlight and simpleformat that receive user-supplied text, and check htmloptions usage.

Timeline & sources

References

Related vulnerabilities & news