CVE-2009-4214 Moderate severity vulnerability that affects rails

Medium 4.3 Published Updated

Remote attackers can inject arbitrary web script or HTML via non-printing ASCII characters in the strip_tags function, affecting Ruby on Rails applications.

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

What is CVE-2009-4214?

CVE-2009-4214 is a medium-severity cross-site scripting vulnerability in Rubyonrails Rails, published on 7 Dec 2009. 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

Cross-site scripting (XSS) vulnerability in the strip_tags function in Ruby on Rails before 2.2.s, and 2.3.x before 2.3.5, allows remote attackers to inject arbitrary web script or HTML via vectors involving non-printing ASCII characters, related to HTML::Tokenizer and actionpack/lib/action_controller/vendor/html-scanner/html/node.rb.

Weakness: CWE-79

Which versions are affected by CVE-2009-4214?

4 open source packages ship an affected version, including rails. It affects 2 products.

PackageAffectedFixed in
rails RubyGemsAll versions2.2.2
rails RubyGemsAll versions2.2.2
rails RubyGemsFrom 2.3.02.3.5
rails RubyGemsFrom 2.3.02.3.5

Products include Rubyonrails Rails, Rubyonrails Ruby on Rails.

How do I fix CVE-2009-4214?

Upgrade rails to a fixed version for your release line: 2.2.2 or 2.3.5.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2009-4214 being exploited?

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

All Rubyonrails Rails vulnerabilities

Sources

Also known as CVE-2009-4132, DEBIAN-CVE-2009-4214, GHSA-9p3v-wf2w-v29c.

Is CVE-2009-4214 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free