CVE-2009-5065
Description
Cross-site scripting (XSS) vulnerability in feedparser.py in Universal Feed Parser (aka feedparser or python-feedparser) before 5.0 allows remote attackers to inject arbitrary web script or HTML via vectors involving nested CDATA stanzas.
Predictions
Heuristic predictions, AS-IS, for prioritization only.
Mitigations
No mitigations published for this CVE yet.
The vendor-content worker queues fetches as references arrive (check back in a few minutes). Or โ if you've already worked around this in production โ publish your fix to the community-verified tier.
โ Propose a mitigation on Community โ Mitigations published via the community go through AI scoring + 2 human reviewers + 7-day silent objection window before landing here withsource_tier=community-verified.
Exploits
Public proof-of-concept code below. AS-IS, for defenders and authorised testing only.
Exploit-DB
python-feedparser 5.0 - '/feedparser/feedparser.py' Cross-Site Scripting
source: https://www.securityfocus.com/bid/47177/info
python-feedparser is prone to a cross-site scripting vulnerability because it fails to properly sanitize user-supplied input.
An attacker may leverage this issue to execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site. This can allow the attacker to steal cookie-based authentication credentials and launch other attacks.
<!--
Description: ensure nested CDATA sections are sanitized properly
Expect: bozo and entries[0]['content'][0]['value'] == u'<![CDATA[]]>'
-->
<rss xmlns:content="http://www.example.com/rss/1.0/modules/content/" version="2.0">
<channel>
<item>
<content:encoded><![CDATA[<![CDATA[<script></script>]]>]]></content:encoded>
</item>
</channel>
</rss
OS impact
Debian Fixed 5 releases
| Version | Status | Fixed in |
|---|---|---|
| trixie | Fixed | 5.0.1-1 |
| sid | Fixed | 5.0.1-1 |
| forky | Fixed | 5.0.1-1 |
| bullseye | Fixed | 5.0.1-1 |
| bookworm | Fixed | 5.0.1-1 |
Package impact
| Ecosystem | Package | Vulnerable | Fixed |
|---|---|---|---|
| PyPI | feedparser | <5.0 | 5.0 |
Application impact
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| mark_pilgrim | feedparser | {"endIncluding":"4.1"} | |
| mark_pilgrim | feedparser | 3.0 | |
| mark_pilgrim | feedparser | 3.0.1 | |
| mark_pilgrim | feedparser | 3.1 | |
| mark_pilgrim | feedparser | 3.2 | |
| mark_pilgrim | feedparser | 3.3 | |
| mark_pilgrim | feedparser | 4.0 | |
| mark_pilgrim | feedparser | 4.0.1 | |
| mark_pilgrim | feedparser | 4.0.2 | |
References
- https://nvd.nist.gov/vuln/detail/CVE-2009-5065
- https://bugzilla.novell.com/show_bug.cgi?id=680074
- https://bugzilla.redhat.com/show_bug.cgi?id=684877
- https://github.com/advisories/GHSA-3mwg-gp5g-fv3q
- https://github.com/kurtmckee/feedparser
- https://github.com/pypa/advisory-database/tree/main/vulns/feedparser/PYSEC-2011-18.yaml
- https://web.archive.org/web/20200228153921/http://www.securityfocus.com/bid/47177
- https://web.archive.org/web/20210329050642/http://www.mandriva.com/security/advisories?name=MDVSA-2011:082
- http://code.google.com/p/feedparser/issues/detail?id=195
- http://lists.opensuse.org/opensuse-updates/2011-04/msg00026.html
- http://support.novell.com/security/cve/CVE-2009-5065.html
- http://secunia.com/advisories/44074
- http://www.mandriva.com/security/advisories?name=MDVSA-2011:082
- http://www.securityfocus.com/bid/47177
- https://security-tracker.debian.org/tracker/CVE-2009-5065
CWEs
CWE-79
Community-verified mitigations for this CVE will appear above when contributors publish them.
Verify integrity in audit chain (admin only). AS-IS.