QuiteRSS / quiterss

Free news feeds reader
https://quiterss.org
Other
1.01k stars 123 forks source link

HTML code is rendered in preview mode - vulnerability #1477

Open RomanTatar opened 3 years ago

RomanTatar commented 3 years ago

QuiteRSS 0.19.4 There is similar issue related to JavaScript https://github.com/QuiteRSS/quiterss/issues/1439 This issue is about HTML

Steps to reproduce Fetch article with HTML code. For example CVE-2020-21976 with RSS source:

<item>
<title>CVE-2020-21976</title>
<description>An arbitrary file upload in the &lt;input type=&quot;file&quot; name=&quot;user_image&quot;&gt; component of NewsOne CMS v1.1.0 allows attackers to webshell and execute arbitrary commands. (CVSS:9.0) (Last Update:2021-08-19)</description>
<link>http://www.cvedetails.com/cve/CVE-2020-21976/</link>
<pubDate>2021-08-11</pubDate>
</item>
<item>

Actual result HTML code <input type="file" name="user_image"> in <description> is rendered in preview of the article image

When article is loaded in internal browser there is no problem image

My settings in Options - Browser - General - Content: Load images - checked (HTML is rendered even when unchecked) Enable JavaScript - unchecked Enable plug-ins - unchecked

Expected result Code should not be rendered by default Add "Enable HTML" checkbox like there is for JavaScript ? (uncheck would show raw text) Maybe with subcheckbox "Allow only safe tags", which would sanitize <title>, <description>, <link>, <pubDate> tags ?