Executive brief
feedparser is a widely-used Python library that parses RSS and Atom feeds from online sources. A cross-site scripting (XSS) vulnerability in the library allows attackers to inject malicious scripts into feed content by exploiting improper handling of nested CDATA sections. When a victim views a maliciously crafted feed, the injected code executes in their browser, potentially compromising account credentials, stealing session data, or performing unauthorized actions on their behalf.
Technical details
The vulnerability is a reflected cross-site scripting (XSS) flaw in feedparser.py that stems from insufficient sanitization of nested CDATA stanzas. An attacker can craft a malicious RSS or Atom feed containing specially formatted nested CDATA sections that cause the parser to emit unescaped HTML or JavaScript. The attack requires the victim to parse and view the malicious feed content, typically via an application that uses feedparser as a backend. No authentication is required, and the vulnerability affects all versions prior to 5.0. The issue has been patched in feedparser 5.0 and later.
Affected products
- Python Feedparser Developers feedparser < 5.0
Timeline
- 2011-04-11: disclosed: CVE-2009-5065 published
- 2011: patched: Fixed in version 5.0