CVE-2009-4214 Moderate severity vulnerability that affects rails
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.
| Package | Affected | Fixed in |
|---|---|---|
rails RubyGems | All versions | 2.2.2 |
rails RubyGems | All versions | 2.2.2 |
rails RubyGems | From 2.3.0 | 2.3.5 |
rails RubyGems | From 2.3.0 | 2.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.
Other vulnerabilities in Rubyonrails Rails
- CVE-2013-0277 Active Record contains deserialization of arbitrary YAML
- CVE-2017-17916 SQL injection in n/a
- CVE-2017-17917 SQL injection in n/a
- CVE-2026-33195 Rails Active Storage has possible Path Traversal in DiskService
- CVE-2024-26142 Rails possible ReDoS vulnerability in Accept header parsing in Action Dispatch
Sources
Also known as CVE-2009-4132, DEBIAN-CVE-2009-4214, GHSA-9p3v-wf2w-v29c.