phpList / phplist3

Fully functional Open Source email marketing manager for creating, sending, integrating, and analysing email campaigns and newsletters.
https://www.phplist.org
GNU Affero General Public License v3.0
745 stars 269 forks source link

Cross Site Scripting Vulnerability on "Import Mail" feature in PHP List #667

Closed Songohan22 closed 4 years ago

Songohan22 commented 4 years ago

Describe the bug An authenticated malicious user can take advantage of a Stored XSS vulnerability in the "Import Mail" feature. To Reproduce Steps to reproduce the behavior:

  1. Log into the panel.
  2. Go to "/admin/?page=import&tk=6adb3efa27ad1baa355bd3b62671c46b"
  3. Click "import by uploading a file with emails"
  4. Insert payload: <svg/on
  5. Click "Save "
  6. View the preview to trigger XSS.
  7. View the preview to get in request and such Stored XSS

Expected behavior The removal of script tags is not sufficient to prevent an XSS attack. You must HTML Entity encode any output that is stored back to the page.

Impact Commonly include transmitting private data, like cookies or other session information, to the attacker, redirecting the victim to web content controlled by the attacker, or performing other malicious operations on the user’s machine under the guise of the vulnerable site.

Screenshots image image image

Desktop (please complete the following information):

PHP List Version 3.5.5

Songohan22 commented 4 years ago

Hi @suaP Please review it! Thanks

michield commented 4 years ago

Resolved with https://github.com/phpList/phplist3/commit/9c4515c9be32b6cf13f7da67a27db85877083189